implemented a workaround to avoid connecting with the multiaudio add-on in mono

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4459 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2003-09-03 00:57:38 +00:00
parent d48f9c63eb
commit e9e1d6d9e8

View File

@ -412,16 +412,21 @@ DefaultManager::ConnectMixerToOutput()
goto finish;
}
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 6; i++) {
switch (i) {
case 0:
printf("DefaultManager: Trying connect in native format\n");
printf("DefaultManager: Trying connect in native format (1)\n");
if (B_OK != roster->GetFormatFor(input, &format)) {
ERROR("DefaultManager: GetFormatFor failed\n");
continue;
}
// XXX BeOS R5 multiaudio node bug workaround
if (format.u.raw_audio.channel_count == 1) {
printf("##### WARNING! DefaultManager: ignored mono format\n");
continue;
}
break;
case 1:
printf("DefaultManager: Trying connect in format 1\n");
memset(&format, 0, sizeof(format));
@ -447,9 +452,19 @@ DefaultManager::ConnectMixerToOutput()
break;
case 4:
// BeOS R5 multiaudio node bug workaround
printf("DefaultManager: Trying connect in native format (2)\n");
if (B_OK != roster->GetFormatFor(input, &format)) {
ERROR("DefaultManager: GetFormatFor failed\n");
continue;
}
break;
case 5:
printf("DefaultManager: Trying connect in format 4\n");
memset(&format, 0, sizeof(format));
break;
}
rv = roster->Connect(output.source, input.destination, &format, &newoutput, &newinput);
if (rv == B_OK)