Changeset 1904

Show
Ignore:
Timestamp:
09/13/98 18:54:34 (16 years ago)
Author:
ucacoxh
Message:

- Added loopback for OSS and Luigi's driver. This may not work on all cards.

Location:
rat/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/auddev_luigi.c

    r1901 r1904  
    319319} 
    320320 
    321  
    322321/* Gain and volume values are in the range 0 - MAX_AMP */ 
    323322void 
     
    349348 
    350349void 
     350audio_loopback(int audio_fd, int gain) 
     351{ 
     352        if (audio_fd < 0) { 
     353                return; 
     354        } 
     355        gain = gain << 8 | gain; 
     356        if (ioctl(audio_fd, MIXER_WRITE(SOUND_MIXER_IMIX), &gain) == -1) { 
     357                perror("loopback"); 
     358        } 
     359} 
     360 
     361 
     362void 
    351363audio_set_oport(int audio_fd, int port) 
    352364{ 
  • rat/trunk/auddev_oss.c

    r1901 r1904  
    289289} 
    290290 
     291void 
     292audio_loopback(int audio_fd, int gain) 
     293{ 
     294        if (audio_fd < 0)  { 
     295                return; 
     296        } 
     297        gain = gain << 8 | gain; 
     298        if (ioctl(audio_fd, MIXER_WRITE(SOUND_MIXER_IMIX), &gain) == -1) { 
     299                perror("loopback"); 
     300        } 
     301} 
     302 
    291303int 
    292304audio_get_volume(int audio_fd)