View Full Version : sound problems

06-02-2003, 10:50 PM
H everybody...

I need to know how the h... I can play music (mp3 or Wav) in a DOS program.

This is because I've been programming a game but the sound is missing, so if anyone can help me, thanks anyway.

06-03-2003, 03:14 PM
Okay, I suposse you didn't understand.

let's say I want to make my own function in C (TC or BC) in DOS that plays a WAV file. what value should i use in the outport() function?. outport(0x10) , 0x60, or what function should i use ?. that's the point.

I already know the WAV format but what i need to know is how can i put the sound in my speakers...

thanks anyway...

06-03-2003, 04:32 PM
The way to send it to your sound card will be dependant on which sound card it is.

06-04-2003, 10:53 AM
theres always the system speaker... sound(x);

06-20-2003, 11:31 AM
Programming a sound engine in DOS is no simple feat. Unless you are fairly adept at assembly or very good at C, I would not attempt it. But if you like self-inflicted pain you can check out www.creative.com and go to their developer center. They have the old DOS manuals (legacy manuals) there which will tell you how to code for the older sound cards. Note that most modern cards do not support DOS at all so this information might not help. Also some of Creative's so-called backward compatibility with DOS does not always work very well. To program a DOS sound engine you should NOT be in a DOS session or you will get some very wacky results.

There is a lot to coding for sound cards and in DOS you will run into multiple thousands of different ways to program various cards. Nearly impossible without using 3rd party drivers and some sound cards which claim to be SB compatible will not work when using SB code with them - thus the only good thing about DOS sound engines is that they are now a thing of the past.

You will need to check out some websites that explain DSP programming, DMA programming, interrupt service routines, SB programming (again www.creative.com), etc.

07-16-2003, 04:22 PM
This is a src, not in C, but it is a source that play a wav file... If somebody want to translate it in C...

Have a good Day

C'est un code en Pascale, Basic et Asm qui permet de lire un .wav.
Si quelqu'un veut le traduire se serais super.

Bonne journée