* BMediaRoster::GetAudio*() should return B_NAME_NOT_FOUND when nothing is set
* In this case, SoundRecorder shows a different error message, more informative, confer bug #134 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28303 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -125,7 +125,10 @@ RecorderWindow::RecorderWindow() :
|
|||||||
|
|
||||||
fInitCheck = InitWindow();
|
fInitCheck = InitWindow();
|
||||||
if (fInitCheck != B_OK) {
|
if (fInitCheck != B_OK) {
|
||||||
ErrorAlert("connect to media server", fInitCheck);
|
if (fInitCheck == B_NAME_NOT_FOUND)
|
||||||
|
ErrorAlert("find default audio hardware", fInitCheck);
|
||||||
|
else
|
||||||
|
ErrorAlert("connect to media server", fInitCheck);
|
||||||
PostMessage(B_QUIT_REQUESTED);
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
} else
|
} else
|
||||||
Show();
|
Show();
|
||||||
|
|||||||
@@ -224,31 +224,31 @@ DefaultManager::Get(media_node_id *nodeid, char *input_name, int32 *inputid, nod
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case VIDEO_INPUT: // output: nodeid
|
case VIDEO_INPUT: // output: nodeid
|
||||||
if (fPhysicalVideoIn == -1)
|
if (fPhysicalVideoIn == -1)
|
||||||
return B_ERROR;
|
return B_NAME_NOT_FOUND;
|
||||||
*nodeid = fPhysicalVideoIn;
|
*nodeid = fPhysicalVideoIn;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
case AUDIO_INPUT: // output: nodeid
|
case AUDIO_INPUT: // output: nodeid
|
||||||
if (fPhysicalAudioIn == -1)
|
if (fPhysicalAudioIn == -1)
|
||||||
return B_ERROR;
|
return B_NAME_NOT_FOUND;
|
||||||
*nodeid = fPhysicalAudioIn;
|
*nodeid = fPhysicalAudioIn;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
case VIDEO_OUTPUT: // output: nodeid
|
case VIDEO_OUTPUT: // output: nodeid
|
||||||
if (fPhysicalVideoOut == -1)
|
if (fPhysicalVideoOut == -1)
|
||||||
return B_ERROR;
|
return B_NAME_NOT_FOUND;
|
||||||
*nodeid = fPhysicalVideoOut;
|
*nodeid = fPhysicalVideoOut;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
case AUDIO_OUTPUT: // output: nodeid
|
case AUDIO_OUTPUT: // output: nodeid
|
||||||
if (fPhysicalAudioOut == -1)
|
if (fPhysicalAudioOut == -1)
|
||||||
return B_ERROR;
|
return B_NAME_NOT_FOUND;
|
||||||
*nodeid = fPhysicalAudioOut;
|
*nodeid = fPhysicalAudioOut;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
case AUDIO_OUTPUT_EX: // output: nodeid, input_name, input_id
|
case AUDIO_OUTPUT_EX: // output: nodeid, input_name, input_id
|
||||||
if (fPhysicalAudioOut == -1)
|
if (fPhysicalAudioOut == -1)
|
||||||
return B_ERROR;
|
return B_NAME_NOT_FOUND;
|
||||||
*nodeid = fPhysicalAudioOut;
|
*nodeid = fPhysicalAudioOut;
|
||||||
*inputid = fPhysicalAudioOutInputID;
|
*inputid = fPhysicalAudioOutInputID;
|
||||||
strcpy(input_name, fPhysicalAudioOutInputName);
|
strcpy(input_name, fPhysicalAudioOutInputName);
|
||||||
@@ -256,7 +256,7 @@ DefaultManager::Get(media_node_id *nodeid, char *input_name, int32 *inputid, nod
|
|||||||
|
|
||||||
case AUDIO_MIXER: // output: nodeid
|
case AUDIO_MIXER: // output: nodeid
|
||||||
if (fAudioMixer == -1)
|
if (fAudioMixer == -1)
|
||||||
return B_ERROR;
|
return B_NAME_NOT_FOUND;
|
||||||
*nodeid = fAudioMixer;
|
*nodeid = fAudioMixer;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user