News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Direct Sound structures

Started by zemtex, February 01, 2011, 12:35:20 AM

Previous topic - Next topic

zemtex

Howdy. (I am tempted to say, what would assembly be without this forum  :bdg)

I've created a IDirectSound8 interface, set cooperative level and now I am supposed to create a primary and secondary buffer.

My problem is not really a coding problem, but a decision problem. I am stuck at the creation of the primary buffer.

The DSBUFFERDESC and the lpwfxFormat section. I do not really understand what to choose, there are two options (WAVEFORMATEX or WAVEFORMATEXTENSIBLE)

Which should I choose, do anyone have a template for creating a "normal" variant to play common wave files. It is in my understanding that the C++ library already use templates, I couldnt locate any such templates in the include files. Anyone?
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

dedndave

QuoteThe WAVEFORMATEXTENSIBLE structure defines the format of waveform-audio data for formats
having more than two channels or higher sample resolutions than allowed by WAVEFORMATEX.

judging from that, it sounds like the simpler structure would be sufficient in most cases

japheth

#2
Here's a sample with WAVEFORMATEX and how to read a .WAV file:

http://www.japheth.de/WinInc/DSound1.html

EDIT: this was post #1000!

zemtex

Alright, but now that MS has dropped the hardware layer of directsound3d, i've been thinking about moving towards OpenAL. What is your opinion on that?
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

japheth

Quote from: zemtex on February 01, 2011, 07:24:46 AM
Alright, but now that MS has dropped the hardware layer of directsound3d, i've been thinking about moving towards OpenAL. What is your opinion on that?

I have none (yet). However, depending on what you want to achieve you might also consider SDL.