Changeset 5388:e5cc8e03a3e1 in roaraudio for roard


Ignore:
Timestamp:
01/17/12 11:27:07 (8 years ago)
Author:
phi
Branch:
default
Message:

Added support for refcount based VIOs as well as dynamically allocated VIOs (non-stack or global VIOs) (Closes: #127)

Location:
roard
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • roard/beep.c

    r5381 r5388  
    6161 
    6262 memset(vio, 0, sizeof(struct roar_vio_calls)); 
    63  
     63 vio->flags = ROAR_VIO_FLAGS_NONE; 
     64 vio->refc  = 1; 
    6465 vio->inst  = inst; 
    6566 vio->read  = beep_read; 
  • roard/container_framework.c

    r5381 r5388  
    169169 
    170170 memset(vio, 0, sizeof(struct roar_vio_calls)); 
    171  vio->inst = inst; 
    172  
     171 vio->flags = ROAR_VIO_FLAGS_NONE; 
     172 vio->refc  = 1; 
     173 vio->inst  = inst; 
    173174 vio->read  = cont_fw_read; 
    174175 vio->write = cont_fw_write; 
     
    238239int     cont_pvio_open    (struct roar_vio_calls * vio, void * inst) { 
    239240 memset(vio, 0, sizeof(struct roar_vio_calls)); 
     241 vio->flags = ROAR_VIO_FLAGS_NONE; 
     242 vio->refc  = 1; 
    240243 
    241244 vio->inst  = inst; 
  • roard/driver.c

    r5381 r5388  
    220220    if ( g_driver[i].open == NULL ) { // this is the null driver 
    221221     memset(calls, 0, sizeof(struct roar_vio_calls)); 
     222     calls->flags = ROAR_VIO_FLAGS_NONE; 
     223     calls->refc  = 1; 
    222224     calls->read  = roar_vio_null_rw; 
    223225     calls->write = roar_vio_null_rw; 
  • roard/driver_alsa.c

    r5381 r5388  
    225225 
    226226 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     227 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     228 inst->refc     = 1; 
    227229 
    228230 inst->inst     = (void*) interface; 
  • roard/driver_ao.c

    r5381 r5388  
    131131 
    132132 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     133 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     134 inst->refc     = 1; 
    133135 inst->inst     = (void*) aodevice; 
    134136 inst->write    = driver_ao_write; 
  • roard/driver_artsc.c

    r5381 r5388  
    119119 
    120120 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     121 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     122 inst->refc     = 1; 
    121123 
    122124 inst->inst     = (void*) self; 
  • roard/driver_jack.c

    r5381 r5388  
    6161 // set up VIO: 
    6262 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     63 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     64 inst->refc     = 1; 
    6365 
    6466 inst->read     = driver_jack_read; 
  • roard/driver_oss.c

    r5381 r5388  
    3535 
    3636 memset(vio, 0, sizeof(struct roar_vio_calls)); 
     37 vio->flags    = ROAR_VIO_FLAGS_NONE; 
     38 vio->refc     = 1; 
    3739 
    3840 vio->write    = driver_oss_write; 
  • roard/driver_portaudio.c

    r5381 r5388  
    120120 
    121121 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     122 inst->flags = ROAR_VIO_FLAGS_NONE; 
     123 inst->refc  = 1; 
    122124 
    123125 inst->inst  = self; 
  • roard/driver_pulsesimple.c

    r5381 r5388  
    121121 
    122122 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     123 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     124 inst->refc     = 1; 
    123125 
    124126 inst->inst     = self; 
  • roard/driver_rsound.c

    r5381 r5388  
    167167 
    168168 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     169 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     170 inst->refc     = 1; 
    169171 
    170172 inst->inst     = self; 
  • roard/driver_shout.c

    r5381 r5388  
    199199 
    200200 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     201 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     202 inst->refc     = 1; 
    201203 inst->inst     = (void*)shout; 
    202204 inst->write    = driver_shout_write; 
  • roard/driver_sndio.c

    r5381 r5388  
    3232 
    3333 memset(vio, 0, sizeof(struct roar_vio_calls)); 
     34 vio->flags    = ROAR_VIO_FLAGS_NONE; 
     35 vio->refc     = 1; 
    3436 
    3537 vio->close    = driver_sndio_close_vio; 
  • roard/driver_sysclock.c

    r5381 r5388  
    3939 memset(self, 0, sizeof(struct driver_sysclock)); 
    4040 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     41 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     42 inst->refc     = 1; 
    4143 
    4244 inst->inst     = self; 
  • roard/driver_wmm.c

    r5381 r5388  
    188188 // VIO Setup: 
    189189 memset(inst, 0, sizeof(struct roar_vio_calls)); 
     190 inst->flags    = ROAR_VIO_FLAGS_NONE; 
     191 inst->refc     = 1; 
    190192 inst->inst     = self; 
    191193 inst->close    = driver_wmm_close_vio; 
  • roard/sources.c

    r5381 r5388  
    441441 
    442442 memset(&(ss->vio), 0, sizeof(struct roar_vio_calls)); 
     443 ss->vio.flags    = ROAR_VIO_FLAGS_NONE; 
     444 ss->vio.refc     = 1; 
    443445 ss->vio.read     = sources_radionoise_read; 
    444446 ss->vio.close    = sources_radionoise_return_zero; 
Note: See TracChangeset for help on using the changeset viewer.