Changeset 1307
- Timestamp:
- 12/16/07 10:40:10 (8 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
portaudio/branches/v19-devel/src/hostapi/oss/pa_unix_oss.c
r1296 r1307 1488 1488 1489 1489 /* Looks like the only safe way to stop audio without reopening the device is SNDCTL_DSP_POST. 1490 * Also disable capture/playback till the stream is started again */ 1490 * Also disable capture/playback till the stream is started again. 1491 */ 1492 int captureErr = 0, playbackErr = 0; 1491 1493 if( stream->capture ) 1492 1494 { 1493 ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_POST, 0 ), paUnanticipatedHostError ); 1495 if( (captureErr = ioctl( stream->capture->fd, SNDCTL_DSP_POST, 0 )) < 0 ) 1496 { 1497 PA_DEBUG(( "%s: Failed to stop capture device, error: %d\n", __FUNCTION__, captureErr )); 1498 } 1494 1499 } 1495 1500 if( stream->playback && !stream->sharedDevice ) 1496 1501 { 1497 ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_POST, 0 ), paUnanticipatedHostError ); 1502 if( (playbackErr = ioctl( stream->playback->fd, SNDCTL_DSP_POST, 0 )) < 0 ) 1503 { 1504 PA_DEBUG(( "%s: Failed to stop playback device, error: %d\n", __FUNCTION__, playbackErr )); 1505 } 1506 } 1507 1508 if( captureErr || playbackErr ) 1509 { 1510 result = paUnanticipatedHostError; 1498 1511 } 1499 1512
