Changeset 2688:28dc20af019f in roaraudio
- Timestamp:
- 09/13/09 02:33:49 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/codecfilter_raum.c
r2685 r2688 26 26 27 27 #ifdef ROAR_HAVE_LIBRAUM 28 #include <raum.h> 29 30 int cf_raum_pcb_open (struct cont_fw_parent_inst * self, 31 int codec, 32 struct roar_stream_server * stream, 33 struct roar_codecfilter * filter) { 34 struct roar_stream * s = ROAR_STREAM(stream); 35 RAUMState * state; 36 int flags = 0; 37 38 if ( stream == NULL ) 39 return -1; 40 41 switch (s->dir) { 42 case ROAR_DIR_COMPLEX_IN: 43 case ROAR_DIR_PLAY: 44 flags = O_RDONLY; 45 break; 46 case ROAR_DIR_COMPLEX_OUT: 47 case ROAR_DIR_MONITOR: 48 case ROAR_DIR_OUTPUT: 49 flags = O_WRONLY; 50 break; 51 default: 52 return -1; 53 } 54 55 state = RAUMOpenVIO(&(stream->vio), flags); 56 57 if ( state == NULL ) 58 return -1; 59 60 cont_fw_set_uinst(self, state); 61 62 return 0; 63 } 64 65 int cf_raum_pcb_close (struct cont_fw_parent_inst * self) { 66 void * state; 67 68 if ( cont_fw_get_uinst(self, &state) == -1 ) 69 return -1; 70 71 return RAUMClose(state); 72 } 28 73 29 74 CONT_FW_SETUP_TYPE(cf_raum_setup) { 75 self->pcb.open = cf_raum_pcb_open; 76 self->pcb.close = cf_raum_pcb_close; 30 77 return 0; 31 78 }
Note: See TracChangeset
for help on using the changeset viewer.