Changeset 1385
- Timestamp:
- 06/05/08 17:13:54 (3 months ago)
- Files:
-
- 1 modified
-
portaudio/trunk/src/hostapi/oss/pa_unix_oss.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
portaudio/trunk/src/hostapi/oss/pa_unix_oss.c
r1380 r1385 783 783 } 784 784 785 /** Open input and output devices. 786 * 787 * @param idev: Returned input device file descriptor. 788 * @param odev: Returned output device file descriptor. 789 */ 785 790 static PaError OpenDevices( const char *idevName, const char *odevName, int *idev, int *odev ) 786 791 { 787 792 PaError result = paNoError; 788 793 int flags = O_NONBLOCK, duplex = 0; 789 int enableBits = 0;790 794 *idev = *odev = -1; 791 795 … … 807 811 ENSURE_( *idev = open( idevName, flags ), paDeviceUnavailable ); 808 812 PA_ENSURE( ModifyBlocking( *idev, 1 ) ); /* Blocking */ 809 810 /* Initially disable */811 enableBits = ~PCM_ENABLE_INPUT;812 ENSURE_( ioctl( *idev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );813 813 } 814 814 if( odevName ) … … 818 818 ENSURE_( *odev = open( odevName, flags ), paDeviceUnavailable ); 819 819 PA_ENSURE( ModifyBlocking( *odev, 1 ) ); /* Blocking */ 820 821 /* Initially disable */822 enableBits = ~PCM_ENABLE_OUTPUT;823 ENSURE_( ioctl( *odev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );824 820 } 825 821 else … … 974 970 } 975 971 972 /** Configure stream component device parameters. 973 */ 976 974 static PaError PaOssStreamComponent_Configure( PaOssStreamComponent *component, double sampleRate, unsigned long 977 975 framesPerBuffer, StreamMode streamMode, PaOssStreamComponent *master ) … … 1435 1433 return result; 1436 1434 1435 /* The OSS reference instructs us to clear direction bits before setting them.*/ 1436 if( stream->playback ) 1437 ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError ); 1438 if( stream->capture ) 1439 ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError ); 1440 1437 1441 if( stream->playback ) 1438 1442 {
