Changeset 1362 for portaudio/branches
- Timestamp:
- 02/28/08 16:43:57 (9 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
portaudio/branches/v19-devel/src/hostapi/alsa/pa_linux_alsa.c
r1278 r1362 3531 3531 #endif 3532 3532 3533 static PaError GetAlsaStreamPointer( PaStream* s, PaAlsaStream** stream ) 3534 { 3535 PaError result = paNoError; 3536 PaUtilHostApiRepresentation* hostApi; 3537 PaAlsaHostApiRepresentation* alsaHostApi; 3538 3539 PA_ENSURE( PaUtil_ValidateStreamPointer( s ) ); 3540 PA_ENSURE( PaUtil_GetHostApiRepresentation( &hostApi, paALSA ) ); 3541 alsaHostApi = (PaAlsaHostApiRepresentation*)hostApi; 3542 3543 PA_UNLESS( PA_STREAM_REP( s )->streamInterface == &alsaHostApi->callbackStreamInterface 3544 || PA_STREAM_REP( s )->streamInterface == &alsaHostApi->blockingStreamInterface, 3545 paIncompatibleStreamHostApi ); 3546 3547 *stream = (PaAlsaStream*)s; 3548 error: 3549 return paNoError; 3550 } 3551 3533 3552 PaError PaAlsa_GetStreamInputCard(PaStream* s, int* card) { 3534 PaAlsaStream *stream = (PaAlsaStream *) s; 3553 PaAlsaStream *stream; 3554 PaError result = paNoError; 3535 3555 snd_pcm_info_t* pcmInfo; 3536 PaError result = paNoError; 3556 3557 PA_ENSURE( GetAlsaStreamPointer( s, &stream ) ); 3537 3558 3538 3559 /* XXX: More descriptive error? */ … … 3548 3569 3549 3570 PaError PaAlsa_GetStreamOutputCard(PaStream* s, int* card) { 3550 PaAlsaStream *stream = (PaAlsaStream *) s; 3571 PaAlsaStream *stream; 3572 PaError result = paNoError; 3551 3573 snd_pcm_info_t* pcmInfo; 3552 PaError result = paNoError; 3574 3575 PA_ENSURE( GetAlsaStreamPointer( s, &stream ) ); 3553 3576 3554 3577 /* XXX: More descriptive error? */
