Changeset 406:91700c05712e in roaraudio for libroarpulse/simple.c
- Timestamp:
- 08/10/08 01:22:56 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/simple.c
r405 r406 15 15 int *error /**< A pointer where the error code is stored when the routine returns NULL. It is OK to pass NULL here. */ 16 16 ) { 17 return NULL; 17 struct roarpulse_simple * s = malloc(sizeof(struct roarpulse_simple)); 18 int (*roarfunc)(int rate, int channels, int bits, int codec, char * server, char * name) = roar_simple_play; 19 int codec = -1; 20 21 if ( !s ) 22 return NULL; 23 24 if ( dir == PA_STREAM_PLAYBACK ) { 25 roarfunc = roar_simple_play; 26 } else if ( dir == PA_STREAM_RECORD ) { 27 roarfunc = roar_simple_record; 28 } else { 29 free(s); 30 return NULL; 31 } 32 33 s->data_fh = roarfunc(ss->rate, ss->channels, 16 /* does PulseAudio support something diffrent? */, 34 codec, (char*)server, (char*)name); 35 36 return (pa_simple*) s; 18 37 } 19 38
Note: See TracChangeset
for help on using the changeset viewer.