This commit is contained in:
Alexander Deynichenko
2013-02-25 07:23:44 +04:00
parent 35ff18a6a1
commit 03b62f3315
809 changed files with 211135 additions and 0 deletions

71
doc/sl/index.html Normal file
View File

@@ -0,0 +1,71 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META name="keywords" content="SL, SM, PLIB, OpenGL, sound, library, portable, games, sample, replay, mixer, OSS, Baker, Steve">
<META name="description" content="The PLIB SL Library is targetted towards producing sound effects for games and other realtime applications. The emphasis is on low CPU impact and low latency rather than high quality and fancy MIDI/MOD facilities. The PLIB SM Library controls the audio mixer on a PC sound card.">
<TITLE>The SL Sound and Mixer Libraries.</TITLE>
</HEAD>
<BODY text="#B5A642" link="#8FFF8F" vlink="#18A515" alink="#20336B"
bgcolor="#005000" background="../marble.png">
<H1>The SL Sound and Mixer Libraries.</H1>
By Steve Baker
<H2>Introduction.</H2>
The 'SL' sound library is primarily targetted towards producing sound
effects for games, and isn't really intended for playing music (although
you could certainly use it for doing that). The emphasis is on low
CPU impact and low latency rather than high quality and fancy MIDI/MOD
facilities.
<p>
SL is a part of <A HREF="../index.html">PLIB</A>.
<p>
The 'SL' sound library will eventually become a fully portable freeware
sound library that should run on all major platforms. Right now, SL
runs under:
<ul>
<li>Linux on systems with OSS (the Open Sound System) installed
(it's usually a standard part of the kernel).
<li>Windows NT, 95 and 98.
<li>OpenBSD.
<li>SGI's IRIX.
<li>Other UNIX systems using OSS (which should include Solaris, FreeBSD,
BSD/OS, SCO and others) should be able to run the Linux version of
SL by adding '-DSL_USING_OSS_AUDIO' to the compile command line.
</ul>
At present, there is no support for Apple's MacOS sound systems
- although it is hoped that these will be added in the near future.
<ul>
<li><A HREF="sl.html">The SL Library</A>
deals with all aspects of sample replay for games and
other realtime applications - it is designed such that it can be
ported to other operating systems by replacing just the slDSP
class.
<p>
<li><A HREF="sm.html">The SM Library</A>
controls the audio mixer on a PC sound card and
probably only works 100% correctly within OSS - and then probably
only on fairly 'vanilla' Soundblaster-compatible sound cards.
Portability of SM is patchy - regard it as a bonus.
</ul>
It is due to the relative non-portability of the SM routines
that these are in a separate library. For non-portable
applications, SL and SM can be considered as a single library.
<p>
<A HREF="http://www.4front-tech.com">Download the Open Sound System
drivers (previously known as VoxWare).</A>
<hr>
<table>
<tr>
<td>
<a href="http://validator.w3.org/check/referer"><img border="0" src="../valid-html40.png" alt="Valid HTML 4.0!" height="31" width="88"></a>
<td>
<ADDRESS>
<A HREF="http://www.sjbaker.org">
Steve J. Baker.</A>
&lt;<A HREF="mailto:sjbaker1@airmail.net">sjbaker1@airmail.net</A>&gt;
</ADDRESS>
</table>
</BODY>
</HTML>

BIN
doc/sl/mixer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

1048
doc/sl/sl.html Normal file

File diff suppressed because it is too large Load Diff

BIN
doc/sl/sl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

106
doc/sl/sm.html Normal file
View File

@@ -0,0 +1,106 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META name="keywords" content="SM, PLIB, OpenGL, sound, library, mixer, OSS, Baker, Steve, smMixer">
<META name="description" content="The PLIB SM Library allows one to drive the mixer controls of most PC-style sound cards.">
<TITLE>The SL Mixer Library.</TITLE>
</HEAD>
<BODY text="#B5A642" link="#8FFF8F" vlink="#18A515" alink="#20336B"
bgcolor="#005000" background="../marble.png">
<TABLE>
<TR>
<TD><IMG SRC="mixer.png" ALT="Imagine kitchen mixers here" width=247 height=247></TD>
<TD>
<H1>The SL Mixer Library.</H1>
By Steve Baker
</TD>
</TR>
</TABLE>
<H2>Introduction.</H2>
This library allows one to drive the mixer controls of
most PC-style sound cards. It relies
on <A HREF="http://www.4front-tech.com">the Open Sound
System</A> drivers (formerly known as 'VoxWare')
- which are generally a standard part of the Linux Kernel - and
which is also available on some other UNIX platforms.
<p>
A port of SM to the Windows family of operating systems
is currently underway.
<p>
SM does not work under SGI's IRIX.
<H2>Using the Library.</H2>
To use this library, you must '#include "sm.h"' and link to
libsm.a or libsm.so.
<H2>class smMixer.</H2>
This library comprises a single class 'smMixer'.
<p>
Most programs will only ever create a single smMixer object.
<p>
Here are the member functions:
<pre>
class smMixer
{
public:
smMixer () ;
smMixer ( char *device ) ;
~smMixer () ;
int not_working () ;
/* Volume/Treble/Bass controls are in integer percentages */
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 ) ;
} ;
</pre>
Basically, each of the mixer devices can be driven with either
mono or stereo volume controls, each volume is a expressed as an
integer percentage of maximum.
<p>
By default, "/dev/mixer" is the device used by this class, but
an alternative device may be accessed if it's name is passed
into the constructor.
<p>
The 'not_working()' function returns TRUE if there is any kind of
problem with the driver. Mostly it returns TRUE if your system isn't
set up for audio.
<p>
The driver will not fail if you call it's member functions when
'not_working()' returns TRUE - so programs written for audio
should work OK even on Linux boxes with no audio support.
<hr>
<table>
<tr>
<td>
<a href="http://validator.w3.org/check/referer"><img border="0" src="../valid-html40.png" alt="Valid HTML 4.0!" height="31" width="88"></a>
<td>
<ADDRESS>
<A HREF="http://www.sjbaker.org">
Steve J. Baker.</A>
&lt;<A HREF="mailto:sjbaker1@airmail.net">sjbaker1@airmail.net</A>&gt;
</ADDRESS>
</table>
</BODY>
</HTML>