/usr/include/plib/sm.h is in libplib-dev 1.8.5-5.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | /*
PLIB - A Suite of Portable Game Libraries
Copyright (C) 1998,2002 Steve Baker
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For further information visit http://plib.sourceforge.net
$Id: sm.h 1732 2002-11-30 00:41:50Z sjbaker $
*/
#ifndef __SM_H__
#define __SM_H__ 1
#include "slPortability.h"
#ifdef SL_USING_OSS_AUDIO
#define SMMIXER_DEFAULT_DEVICE "/dev/mixer"
#elif defined(UL_WIN32)
#define SMMIXER_DEFAULT_DEVICE "mixer"
#else
#endif
# define SM_TRUE 1
# define SM_FALSE 0
typedef unsigned char Uchar ;
typedef unsigned short Ushort ;
class smMixer
{
private:
int devices ;
int error ;
int fd ;
#ifdef SL_USING_OSS_AUDIO
int ioctl ( int cmd, int param = 0 )
{
if ( error ) return param ;
if ( ::ioctl ( fd, cmd, & param ) == -1 )
{
perror ( "smMixer: ioctl" ) ;
error = SM_TRUE ;
}
return param ;
}
#endif
void open ( const char *device ) ;
void close () ;
public:
/* Tom */
smMixer ();
smMixer ( const char *device );
~smMixer ();
int notWorking () const ;
int not_working () const { return notWorking () ; } /* Originally a typo! */
/* Volume controls are in integer percentages */
int getVolume ( int channel );
void setVolume ( int channel, int volume );
void getVolume ( int channel, int *left, int *right );
void setVolume ( int channel, int left, int right );
void setTreble ( int treble );
void setBass ( int bass );
void setMasterVolume ( int volume );
void setSynthVolume ( int volume );
void setPCMVolume ( int volume );
void setSpeakerVolume( int volume );
void setLineVolume ( int volume );
void setMicVolume ( int volume );
void setCDVolume ( int volume );
void setMasterVolume ( int left, int right );
void setSynthVolume ( int left, int right );
void setPCMVolume ( int left, int right );
void setSpeakerVolume( int left, int right );
void setLineVolume ( int left, int right );
void setMicVolume ( int left, int right );
void setCDVolume ( int left, int right );
} ;
#endif
|