Changeset 2359:72bb3b910149 in roaraudio
- Timestamp:
- 08/14/09 22:46:32 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarsndio/libroarsndio.c
r2357 r2359 36 36 struct sio_hdl * sio_open(char * name, unsigned mode, int nbio_flag) { 37 37 struct sio_hdl * hdl = NULL; 38 int is_midi = 0; 38 39 39 40 if ( (hdl = malloc(sizeof(struct sio_hdl))) == NULL ) … … 47 48 break; 48 49 case MIO_OUT: 50 is_midi = 1; 51 hdl->dir = ROAR_DIR_MIDI_IN; 52 break; 49 53 case MIO_IN: 54 is_midi = 1; 55 hdl->dir = ROAR_DIR_MIDI_OUT; 56 break; 50 57 case SIO_REC: 51 58 case SIO_PLAY|SIO_REC: … … 67 74 if ( name != NULL ) 68 75 hdl->device = strdup(name); 76 77 if ( is_midi ) { 78 hdl->info.codec = ROAR_CODEC_MIDI; 79 hdl->info.bits = 8; 80 hdl->info.channels = 16; 81 hdl->info.rate = 96; 82 if ( !sio_start(hdl) ) { 83 sio_close(hdl); 84 return NULL; 85 } 86 } 69 87 70 88 return hdl;
Note: See TracChangeset
for help on using the changeset viewer.