Thread: sound problems

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    2

    Exclamation sound problems

    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.

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    2

    Unhappy still sound problems

    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...

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    The way to send it to your sound card will be dependant on which sound card it is.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    46
    theres always the system speaker... sound(x);

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    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.

  6. #6
    Registered User
    Join Date
    Jul 2003
    Posts
    2

    This may help you

    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Setting up sound in Knoppix
    By Pyroteh in forum Tech Board
    Replies: 0
    Last Post: 08-13-2005, 10:04 PM
  2. DirectX Question
    By bladerunner627 in forum Game Programming
    Replies: 2
    Last Post: 04-04-2005, 11:55 AM
  3. Sound range issues
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 04-03-2005, 08:51 PM
  4. Sound Problems
    By RoD in forum Tech Board
    Replies: 5
    Last Post: 09-27-2002, 07:11 PM
  5. Sound card interrupt problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-05-2001, 04:38 AM