Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Sound Programming in Game

97256449725644 Posts: 32Member
Hi.
I have developed a doom style 3d engine in Borland C++, and have the graphics part almost complete. I now want to add atmosphere to the game and the best way to do this is by adding sounds. I have followed many tutorials on the web and downloaded lots of examples including the ones from this site, but all the sound programms that I have written and seen don't do. They cause the game to freeze until the sound is played, the the motion continues. This is fine for tiny sounds but looks real odd when opening a door.
I was wondering if anyone had written a game and had successfully implemented sound in C++, and was willing to give me a hand.

Thanks
Ciaran

Comments

  • gautamgautam Posts: 642Member
    Hi,

    I suggest you use DirectSound for sound.(DirectX).

    : Hi.
    : I have developed a doom style 3d engine in Borland C++, and have the graphics part almost complete. I now want to add atmosphere to the game and the best way to do this is by adding sounds. I have followed many tutorials on the web and downloaded lots of examples including the ones from this site, but all the sound programms that I have written and seen don't do. They cause the game to freeze until the sound is played, the the motion continues. This is fine for tiny sounds but looks real odd when opening a door.
    : I was wondering if anyone had written a game and had successfully implemented sound in C++, and was willing to give me a hand.
    :
    : Thanks
    : Ciaran
    :


  • 97256449725644 Posts: 32Member
    The programming I have done is all in Dos, and I don't think DirectX will work with this. Am I right?

    : Hi,
    :
    : I suggest you use DirectSound for sound.(DirectX).
    :
    : : Hi.
    : : I have developed a doom style 3d engine in Borland C++, and have the graphics part almost complete. I now want to add atmosphere to the game and the best way to do this is by adding sounds. I have followed many tutorials on the web and downloaded lots of examples including the ones from this site, but all the sound programms that I have written and seen don't do. They cause the game to freeze until the sound is played, the the motion continues. This is fine for tiny sounds but looks real odd when opening a door.
    : : I was wondering if anyone had written a game and had successfully implemented sound in C++, and was willing to give me a hand.
    : :
    : : Thanks
    : : Ciaran
    : :
    :
    :


  • gautamgautam Posts: 642Member
    No it won't, then you will have to go low level(assmebly), you can't write an interface for all sound cards - one or two will do, or you could use the bell.


    : The programming I have done is all in Dos, and I don't think DirectX will work with this. Am I right?
    :
    : : Hi,
    : :
    : : I suggest you use DirectSound for sound.(DirectX).
    : :
    : : : Hi.
    : : : I have developed a doom style 3d engine in Borland C++, and have the graphics part almost complete. I now want to add atmosphere to the game and the best way to do this is by adding sounds. I have followed many tutorials on the web and downloaded lots of examples including the ones from this site, but all the sound programms that I have written and seen don't do. They cause the game to freeze until the sound is played, the the motion continues. This is fine for tiny sounds but looks real odd when opening a door.
    : : : I was wondering if anyone had written a game and had successfully implemented sound in C++, and was willing to give me a hand.
    : : :
    : : : Thanks
    : : : Ciaran
    : : :
    : :
    : :
    :
    :


  • AmanteAmante Posts: 52Member
    I never done it.
    I don't know exactly how to do it, but i think you should progarm the DMA of the SoundBalster.

    : No it won't, then you will have to go low level(assmebly), you can't write an interface for all sound cards - one or two will do, or you could use the bell.
    :
    :
    : : The programming I have done is all in Dos, and I don't think DirectX will work with this. Am I right?
    : :
    : : : Hi,
    : : :
    : : : I suggest you use DirectSound for sound.(DirectX).
    : : :
    : : : : Hi.
    : : : : I have developed a doom style 3d engine in Borland C++, and have the graphics part almost complete. I now want to add atmosphere to the game and the best way to do this is by adding sounds. I have followed many tutorials on the web and downloaded lots of examples including the ones from this site, but all the sound programms that I have written and seen don't do. They cause the game to freeze until the sound is played, the the motion continues. This is fine for tiny sounds but looks real odd when opening a door.
    : : : : I was wondering if anyone had written a game and had successfully implemented sound in C++, and was willing to give me a hand.
    : : : :
    : : : : Thanks
    : : : : Ciaran
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :


  • RagnaroKRagnaroK Posts: 94Member
    Try the page from Steven Don.

    You should find some DMA routs there in the sound section

    http://www.shdon.com

  • 97256449725644 Posts: 32Member
    : Try the page from Steven Don.
    :
    : You should find some DMA routs there in the sound section
    :
    : http://www.shdon.com
    :


    Thank you all for your help. Much appreciated.
    Ciaran.

Sign In or Register to comment.