Changeset 681

Show
Ignore:
Timestamp:
12/20/09 15:11:46 (2 years ago)
Author:
erikd
Message:

Rename internal OSS and Solaris driver functions for consistency.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sweep/trunk/src/driver_oss.c

    r676 r681  
    9696 
    9797static sw_handle * 
    98 open_dev_dsp (int monitoring, int flags) 
     98oss_open (int monitoring, int flags) 
    9999{ 
    100100  char * dev_name; 
     
    134134 
    135135static void 
    136 setup_dev_dsp (sw_handle * handle, sw_format * format) 
     136oss_setup (sw_handle * handle, sw_format * format) 
    137137{ 
    138138  int dev_dsp; 
     
    254254 
    255255static int 
    256 wait_dev_dsp (sw_handle * handle) 
     256oss_wait (sw_handle * handle) 
    257257{ 
    258258  return 0; 
     
    260260 
    261261static ssize_t 
    262 read_dev_dsp (sw_handle * handle, sw_audio_t * buf, size_t count) 
     262oss_read (sw_handle * handle, sw_audio_t * buf, size_t count) 
    263263{ 
    264264  gint16 * bbuf; 
     
    300300 
    301301static ssize_t 
    302 write_dev_dsp (sw_handle * handle, sw_audio_t * buf, size_t count, 
     302oss_write (sw_handle * handle, sw_audio_t * buf, size_t count, 
    303303               sw_framecount_t play_offset) 
    304304{ 
     
    352352 
    353353static sw_framecount_t 
    354 offset_dev_dsp (sw_handle * handle) 
     354oss_offset (sw_handle * handle) 
    355355{ 
    356356  count_info info; 
     
    392392 
    393393static void 
    394 reset_dev_dsp (sw_handle * handle) 
     394oss_reset (sw_handle * handle) 
    395395{ 
    396396  if (handle == NULL) { 
     
    407407 
    408408static void 
    409 flush_dev_dsp (sw_handle * handle) 
     409oss_flush (sw_handle * handle) 
    410410{ 
    411411} 
    412412 
    413413void 
    414 drain_dev_dsp (sw_handle * handle) 
     414oss_drain (sw_handle * handle) 
    415415{ 
    416416  if (handle == NULL) { 
     
    429429 
    430430static void 
    431 close_dev_dsp (sw_handle * handle) 
     431oss_close (sw_handle * handle) 
    432432{ 
    433433  close (handle->driver_fd); 
     
    438438  "OSS", 
    439439  oss_get_names, 
    440   open_dev_dsp
    441   setup_dev_dsp, 
    442   wait_dev_dsp
    443   read_dev_dsp
    444   write_dev_dsp
    445   offset_dev_dsp
    446   reset_dev_dsp
    447   flush_dev_dsp
    448   drain_dev_dsp
    449   close_dev_dsp
     440  oss_open
     441  oss_setup, 
     442  oss_wait
     443  oss_read
     444  oss_write
     445  oss_offset
     446  oss_reset
     447  oss_flush
     448  oss_drain
     449  oss_close
    450450  "oss_primary_device", 
    451451  "oss_monitor_device", 
  • sweep/trunk/src/driver_solaris.c

    r676 r681  
    4848#define DEV_AUDIO "/dev/audio" 
    4949 
    50 static sw_handle dev_audio_handle = { 
     50static sw_handle solaris_handle = { 
    5151 0, -1, 0, 0, NULL 
    5252}; 
    5353 
    5454static sw_handle * 
    55 open_dev_audio (int cueing, int flags) 
     55solaris_open (int cueing, int flags) 
    5656{ 
    5757  int dev_audio; 
    58   sw_handle * handle = &dev_audio_handle; 
     58  sw_handle * handle = &solaris_handle; 
    5959 
    6060  if (cueing) return NULL; 
     
    7272 
    7373static void 
    74 setup_dev_audio (sw_handle * handle, sw_format * format) 
     74solaris_setup (sw_handle * handle, sw_format * format) 
    7575{ 
    7676  audio_info_t info; 
     
    8888 
    8989static ssize_t 
    90 write_dev_audio (sw_handle * handle, void * buf, size_t count) 
     90solaris_write (sw_handle * handle, void * buf, size_t count) 
    9191{ 
    9292  return write (handle->driver_fd, buf, count); 
     
    9494 
    9595static void 
    96 reset_dev_audio (sw_handle * handle) 
     96solaris_reset (sw_handle * handle) 
    9797{ 
    9898} 
    9999 
    100100static void 
    101 flush_dev_audio (sw_handle * handle) 
     101solaris_flush (sw_handle * handle) 
    102102{ 
    103103  if (ioctl(handle->driver_fd, I_FLUSH, FLUSHW) == -1) 
     
    106106 
    107107static void 
    108 drain_dev_audio (sw_handle * handle) 
     108solaris_drain (sw_handle * handle) 
    109109{ 
    110110  if(ioctl(handle->driver_fd, AUDIO_DRAIN, 0) == -1) 
     
    113113 
    114114static void 
    115 close_dev_audio (sw_handle * handle) 
     115solaris_close (sw_handle * handle) 
    116116{ 
    117117  close (handle->driver_fd); 
     
    122122  "Solaris", 
    123123  NULL, /* config */ 
    124   open_dev_audio
    125   setup_dev_audio
     124  solaris_open
     125  solaris_setup
    126126  NULL, 
    127   write_dev_audio
    128   reset_dev_audio
    129   flush_dev_audio
    130   drain_dev_audio
    131   close_dev_audio
     127  solaris_write
     128  solaris_reset
     129  solaris_flush
     130  solaris_drain
     131  solaris_close
    132132  "solaris_primary_device", 
    133133  "solaris_monitor_device",