Changeset 5708:8d1c97c7cd44 in roaraudio


Ignore:
Timestamp:
10/24/12 14:34:42 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Fixed roard's 'dmx' driver.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5707 r5708  
    22        * Changed plugin ABI version number for roard. 
    33        * Removed check for libuuid as it is no longer used. 
     4        * Fixed roard's 'dmx' driver. 
    45 
    56v. 1.0beta7 - Tue Oct 23 2012 23:28 CEST 
  • roard/driver_dmx.c

    r5381 r5708  
    3030int driver_dmx_open_vio  (struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream) { 
    3131 struct roar_vio_defaults def; 
     32 struct roar_vio_calls * vio; 
     33 int err; 
    3234 
    3335 if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, O_WRONLY, 0644) == -1 ) 
    3436  return -1; 
     37 
     38 vio = roar_mm_malloc(sizeof(struct roar_vio_calls)); 
     39 if ( vio == NULL ) 
     40  return -1; 
     41 roar_vio_clear_calls(vio); 
    3542 
    3643 if ( fh == -1 ) { 
     
    4148   device = "/dev/dmx"; 
    4249 
    43   if ( roar_vio_open_dstr(inst, device, &def, 1) == -1 ) 
     50  if ( roar_vio_open_dstr(vio, device, &def, 1) == -1 ) { 
     51   err = roar_error; 
     52   roar_mm_free(vio); 
     53   roar_error = err; 
    4454   return -1; 
     55  } 
    4556 } else { 
    46   if ( roar_vio_open_fh(inst, fh) == -1 ) 
     57  if ( roar_vio_open_fh(vio, fh) == -1 ) { 
     58   err = roar_error; 
     59   roar_mm_free(vio); 
     60   roar_error = err; 
    4761   return -1; 
     62  } 
    4863 } 
    4964 
     65 vio->flags |= ROAR_VIO_FLAGS_FREESELF; 
     66 
     67 roar_vio_open_pass(inst, vio); 
    5068 inst->write = driver_dmx_write; 
    5169 inst->ctl   = driver_dmx_ctl; 
     
    6684  return -1; 
    6785 
    68  if ( roar_vio_lseek(vio, 0, SEEK_SET) == (roar_off_t)-1 ) 
     86 if ( roar_vio_lseek(vio->inst, 0, SEEK_SET) == (roar_off_t)-1 ) 
    6987  return -1; 
    7088 
    71  return roar_vio_write(vio, buf, count); 
     89 return roar_vio_write(vio->inst, buf, count); 
    7290} 
    7391 
     
    83101   break; 
    84102  default: 
     103   roar_err_set(ROAR_ERROR_BADRQC); 
    85104   return -1; 
    86105 } 
Note: See TracChangeset for help on using the changeset viewer.