we now check if current pipe index is a valid one before trying to close it, seems CloseAudio doesn't check itself
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15646 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c6cacf3fb6
commit
4aeaaaae01
@ -166,12 +166,14 @@ echo_stream_set_audioparms(echo_stream *stream, uint8 channels,
|
||||
|
||||
LOG(("echo_stream_set_audioparms\n"));
|
||||
|
||||
close_params.wPipeIndex = stream->pipe;
|
||||
status = stream->card->pEG->CloseAudio(&close_params);
|
||||
if(status!=ECHOSTATUS_OK && status!=ECHOSTATUS_CHANNEL_NOT_OPEN) {
|
||||
PRINT(("echo_stream_set_audioparms : CloseAudio failed\n"));
|
||||
PRINT((" status: %s \n", pStatusStrs[status]));
|
||||
return B_ERROR;
|
||||
if (stream->pipe >= 0) {
|
||||
close_params.wPipeIndex = stream->pipe;
|
||||
status = stream->card->pEG->CloseAudio(&close_params);
|
||||
if(status!=ECHOSTATUS_OK && status!=ECHOSTATUS_CHANNEL_NOT_OPEN) {
|
||||
PRINT(("echo_stream_set_audioparms : CloseAudio failed\n"));
|
||||
PRINT((" status: %s \n", pStatusStrs[status]));
|
||||
return B_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
open_params.bIsCyclic = TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user