|
» Sales
» Museum
» Downloads
» Forum
» FAQ
» Links
» Programming
» Emulators
» Terms
» Email
» Newsletter
|
|
Reinventing the wheel
|
|
There are plenty of sound librarys and code resources out there.
For our games we linked to a premade sound blaster library for DJGPP.
To add sound to your programs you need link them to 'libsb.a'
Compile your code using this example command line for the compiler:
gcc -o myprog myprog.c
libsb.a -lemu
and include this compiler directive at the top of your program:
#include "sb_lib.h"
The other header files in the example download must be in the same
directory as sb_lib.h. This will give your prgram access to these
functions in sblib.a :
sb_sample * //new data type
sb_load_sample(char *filename,filetype);//filetype _SB_WAV
sb_install_driver(int frequency)//should return SB_SUCCESS
sb_mix_sample(sb_sample*);//play a sound
sb_free_sample(sb_sample*);
sb_uninstall_driver();
There are probably more funstions in the library, examine the header
if you think you need more functionality.
Download
a working example including libsb
|
|
The library
|
|
This library was written by Joel H. Hunter (1995) If you are him
please mail us!
Legal Stuff:
1> The Sound-Blaster Library for DJGPP V. 2.0 is copyrighted
freeware.
You are free to do with it as you please, with the following conditions:
a) If you change/add to/make better this library, send me your changes!
I will maintain all such patches, and re-release a new, better
library that everyone can enjoy and will benefit from!
b) If you create a new library based on this library, give Eric
and I
credit, and maintain this freeware policy.
The Sound-Blaster Library for DJGPP V. 2.0 is based in part on VAT.
You
can obtain VAT at mack.rt66.com/users/smeagol/vatxxx.zip, and can
contact Eric at smeagol@rt66.com.
c) You MAY use this library in a commercial/shareware application,
however, please let me know about it, give me a little credit,
and send me a copy.
2> USE OF THIS LIBRARY IS STRICTLY AT YOUR OWN RISK! THE AUTHOR
ASSUMES NO
RESPONSIBILITY FOR TIME, MONEY, AND/OR EQUIPMENT LOST DUE TO THE
USE OF THIS LIBRARY.
3> THIS LIBRARY IS NOT GUARANTEED TO WORK SAFELY ON ANY COMPUTER!
4> THIS LIBRARY IS NOT GUARANTEED TO BE SUITABLE FOR ANY SPECIFIC
PURPOSE.
5> IF THE ABOVE RESTRICTIONS DO NOT CONFORM TO THE LAWS OF YOUR
STATE, YOU MUST NOT USE THIS LIBRARY.
|
|
All product names and logos are registered trademarks
of their respective owners.
|
All content © www.retro-games.co.uk
|