Changeset 2508:49c691225a30 in roaraudio


Ignore:
Timestamp:
09/01/09 13:31:31 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

enable roar driver to use light and MIDI subsystem

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/driver.c

    r2507 r2508  
    3232   NULL, driver_esd_close, driver_esd_open_vio}, 
    3333#endif 
    34  { "roar", "RoarAudio driver", "localhost, remote.host.dom", DRV_FLAG_NONE, ROAR_SUBSYS_WAVEFORM, 
     34 { "roar", "RoarAudio driver", "localhost, remote.host.dom", DRV_FLAG_NONE, 
     35   ROAR_SUBSYS_WAVEFORM|ROAR_SUBSYS_MIDI|ROAR_SUBSYS_LIGHT, 
    3536   NULL, driver_roar_close, driver_roar_open_vio}, 
    3637#ifdef ROAR_HAVE_IO_POSIX 
  • roard/driver_roar.c

    r2367 r2508  
    2626 
    2727int driver_roar_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream) { 
     28 int dir = ROAR_DIR_PLAY; 
    2829 
    2930 if ( fh != -1 ) { // this is a connection to a roard, no roar_simple_*() interface avalible for this case 
     
    3132 } 
    3233 
    33  if ( (fh = roar_simple_play(info->rate, info->channels, info->bits, info->codec, device, "roard")) == -1 ) { 
     34 if ( sstream != NULL ) { 
     35  switch (ROAR_STREAM(sstream)->dir) { 
     36   case ROAR_DIR_OUTPUT:    dir = ROAR_DIR_PLAY;     break; 
     37   case ROAR_DIR_MIDI_OUT:  dir = ROAR_DIR_MIDI_IN;  break; 
     38   case ROAR_DIR_LIGHT_OUT: dir = ROAR_DIR_LIGHT_IN; break; 
     39// TODO: we need to know a real pos id for raw streams... 
     40//   case ROAR_DIR_RAW_OUT:   dir = ROAR_DIR_RAW_IN;   break; 
     41   default: 
     42     return -1; 
     43  } 
     44 } 
     45 
     46 if ( (fh = roar_simple_stream(info->rate, info->channels, info->bits, info->codec, device, dir, "roard")) == -1 ) { 
    3447  return -1; 
    3548 } 
Note: See TracChangeset for help on using the changeset viewer.