Changeset 5276:0eb24ca6810e in roaraudio for roard/driver_jack.c


Ignore:
Timestamp:
11/20/11 18:36:49 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

merged VIO's _nonblock() into _ctl() (Closes: #135)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/driver_jack.c

    r5259 r5276  
    6565 inst->write    = driver_jack_write; 
    6666 inst->lseek    = NULL; // no seeking on this device 
    67  inst->nonblock = driver_jack_nonblock; 
    6867 inst->sync     = driver_jack_sync; 
    6968 inst->ctl      = driver_jack_ctl; 
     
    157156} 
    158157 
    159 int     driver_jack_nonblock(struct roar_vio_calls * vio, int state) { 
    160  struct driver_jack * self = vio->inst; 
    161  // control if read and write calls should block untill all data is read or written. 
    162  // state could be: 
    163  //  ROAR_SOCKET_BLOCK    - Block untill the data is read or written 
    164  //  ROAR_SOCKET_NONBLOCK - Return as soon as possible 
    165  return -1; 
    166 } 
    167  
    168158int     driver_jack_sync    (struct roar_vio_calls * vio) { 
    169159 struct driver_jack * self = vio->inst; 
     
    200190    return 0; 
    201191   break; 
    202    case ROAR_VIO_CTL_GET_AUINFO: 
    203    case ROAR_VIO_CTL_SET_AUINFO: 
     192  case ROAR_VIO_CTL_NONBLOCK: 
     193 // control if read and write calls should block untill all data is read or written. 
     194 // state is in *(int*)data and could be: 
     195 //  ROAR_SOCKET_BLOCK    - Block untill the data is read or written 
     196 //  ROAR_SOCKET_NONBLOCK - Return as soon as possible 
     197   break; 
     198  case ROAR_VIO_CTL_GET_AUINFO: 
     199  case ROAR_VIO_CTL_SET_AUINFO: 
    204200    // get or set audio info, data is a struct roar_audio_info*. 
    205201    return -1; 
    206202   break; 
    207    case ROAR_VIO_CTL_GET_DBLKSIZE: 
    208    case ROAR_VIO_CTL_SET_DBLKSIZE: 
     203  case ROAR_VIO_CTL_GET_DBLKSIZE: 
     204  case ROAR_VIO_CTL_SET_DBLKSIZE: 
    209205     // get or set block size used, data is uint_least32_t*, number of bytes. 
    210206    return -1; 
    211207   break; 
    212    case ROAR_VIO_CTL_GET_DBLOCKS: 
    213    case ROAR_VIO_CTL_SET_DBLOCKS: 
     208  case ROAR_VIO_CTL_GET_DBLOCKS: 
     209  case ROAR_VIO_CTL_SET_DBLOCKS: 
    214210     // get or set number of blocks used, data is uint_least32_t*. 
    215211    return -1; 
    216212   break; 
    217    case ROAR_VIO_CTL_SET_SSTREAM: 
     213  case ROAR_VIO_CTL_SET_SSTREAM: 
    218214    // set server stream object for this stream, data is struct roar_stream_server* 
    219215    return -1; 
    220216   break; 
    221    case ROAR_VIO_CTL_SET_SSTREAMID: 
     217  case ROAR_VIO_CTL_SET_SSTREAMID: 
    222218    // set stream ID for this stream, data is int* 
    223219    return -1; 
    224220   break; 
    225    case ROAR_VIO_CTL_SET_VOLUME: 
     221  case ROAR_VIO_CTL_SET_VOLUME: 
    226222    // set volume for this device, data is struct roar_mixer_settings* 
    227223    return -1; 
    228224   break; 
    229    case ROAR_VIO_CTL_GET_DELAY: 
     225  case ROAR_VIO_CTL_GET_DELAY: 
    230226    // get delay of this stream, data is uint_least32_t*, in bytes 
    231227    // there is more about delay. please ask. 
Note: See TracChangeset for help on using the changeset viewer.