Changeset 5241:766eead707a5 in roaraudio


Ignore:
Timestamp:
11/12/11 18:38:56 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

some small updates for the CDRom API

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/cdrom.h

    r4708 r5241  
    6363}; 
    6464 
    65 int roar_cdrom_open (struct roar_connection * con, struct roar_cdrom * cdrom, char * device); 
     65int roar_cdrom_open (struct roar_connection * con, struct roar_cdrom * cdrom, const char * device); 
    6666int roar_cdrom_close(struct roar_cdrom * cdrom); 
    6767int roar_cdrom_stop (struct roar_cdrom * cdrom); 
  • libroar/cdrom.c

    r4708 r5241  
    8787 } 
    8888 
    89  // new close our backups: 
     89 // now close our backups: 
    9090 close(fh[0]); 
    9191 close(fh[1]); 
     
    109109} 
    110110 
    111 int roar_cdrom_open (struct roar_connection * con, struct roar_cdrom * cdrom, char * device) { 
     111int roar_cdrom_open (struct roar_connection * con, struct roar_cdrom * cdrom, const char * device) { 
    112112#ifdef ROAR_HAVE_CDROM 
    113113 int flags; 
     
    212212int roar_cdrom_play (struct roar_cdrom * cdrom, int track) { 
    213213#ifdef ROAR_HAVE_CDROM 
     214 struct roar_vio_calls vio; 
     215 struct roar_stream stream[1]; 
    214216 int stream_fh; 
    215  struct roar_stream stream[1]; 
    216217 
    217218 if ( cdrom == NULL ) 
     
    228229 if ( cdrom->play_local ) { 
    229230 
    230   if ( (stream_fh = roar_simple_new_stream_obj(cdrom->con, stream, ROAR_CDROM_STREAMINFO, ROAR_DIR_PLAY)) == -1 ) { 
     231  if ( roar_vio_simple_new_stream_obj(&vio, cdrom->con, stream, ROAR_CDROM_STREAMINFO, ROAR_DIR_PLAY) == -1 ) { 
     232   return -1; 
     233  } 
     234 
     235  if ( roar_vio_ctl(&vio, ROAR_VIO_CTL_GET_WRITE_FH, &stream_fh) == -1 ) { 
     236   roar_vio_close(&vio); 
    231237   return -1; 
    232238  } 
     
    237243  } 
    238244 
    239   close(stream_fh); 
     245  roar_vio_close(&vio); 
    240246 
    241247  return -1; 
Note: See TracChangeset for help on using the changeset viewer.