home *** CD-ROM | disk | FTP | other *** search
/ M.u.C.S. Disc 2000 / MUCS2000.iso / sound / mp2 / src / gem / mp2extra.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-21  |  728 b   |  31 lines

  1. #include <tos.h>
  2.  
  3. #include "snddefs.h"
  4. #include "mp2audio.h"
  5.  
  6. /* Function in this module */
  7. void mute(int mode);
  8.  
  9. void mute(int mode)
  10. {
  11.     static int ltatten, rtatten, ltgain, rtgain;
  12.  
  13.     if (mode) { /* mode==MUTE */
  14.         /* Save old settings */
  15.         ltatten = (int) soundcmd(LTATTEN, -1);
  16.         rtatten = (int) soundcmd(RTATTEN, -1);
  17.         ltgain = (int) soundcmd(LTGAIN, -1);
  18.         rtgain = (int) soundcmd(RTGAIN, -1);
  19.         soundcmd(LTATTEN, 0x00f0);
  20.         soundcmd(RTATTEN, 0x00f0);
  21.         soundcmd(RTGAIN, 0x0000);
  22.         soundcmd(LTGAIN, 0x0000);
  23.     } else { /* mode==MUTE_RESTORE */
  24.         /* Restore old settings */
  25.         soundcmd(LTATTEN, ltatten);
  26.         soundcmd(RTATTEN, rtatten);
  27.         soundcmd(LTGAIN, ltgain);
  28.         soundcmd(RTGAIN, rtgain);
  29.     }
  30. }
  31.