Changeset 813:0f0fd9b1fadd in roaraudio for libroar
- Timestamp:
- 09/17/08 23:10:41 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/cdrom.c
r811 r813 35 35 #include "libroar.h" 36 36 37 int roar_cdrom_open (struct roar_connection * con, struct roar_cdrom * cdrom, char * device) { 38 if ( cdrom == NULL ) 39 return -1; 40 41 memset((void*)cdrom, 0, sizeof(struct roar_cdrom)); 42 43 if ( device == NULL ) 44 device = roar_cdromdevice(); 45 46 if ( device == NULL ) 47 return -1; 48 49 strncpy(cdrom->device, device, ROAR_CDROM_MAX_DEVLEN); 50 51 cdrom->con = con; // we do not care here if it is set or not as we can operate in local only mode 52 53 cdrom->stream = -1; 54 cdrom->fh = -1; 55 56 return 0; 57 } 58 59 int roar_cdrom_close(struct roar_cdrom * cdrom) { 60 if ( cdrom == NULL ) 61 return -1; 62 63 if ( cdrom->fh != -1 ) 64 close(cdrom->fh); 65 66 memset((void*)cdrom, 0, sizeof(struct roar_cdrom)); 67 68 return 0; 69 } 70 71 int roar_cdrom_stop (struct roar_cdrom * cdrom); 72 int roar_cdrom_play (struct roar_cdrom * cdrom, int track); 73 37 74 //ll
Note: See TracChangeset
for help on using the changeset viewer.