Need a direct music tutorial.

Started by
5 comments, last by kingpinzs 20 years, 1 month ago
Need a direct music tutorial. I am trying to play background music wav file and I cant find any good c++ direct music tutorials. does any one know were I could get some?
Advertisement
I just switched to OpenAL and Ogg Vorbis and could not be HAPPIER with the results. Stream music (basically MP3) in the background, etc. Plus OpenAL far outperforms DirectSound in regard to features and CPU usage.

It took me about a day to understand the stuff and write the engine.

www.devmaster.net <-- openAL tutorials
www.openal.org <-- get openAL dll''s
www.vorbis.org <-- get vorbis dll''s
I am have been looking for tutorials on adding back ground music in wav or mp3 format but I cant find very meny tutorials on this subject. I am wanting to use direct x so I wont have to pay any roltys and know that it will work on almost any windows system.
My game is programed in windows gdi for now I am going to translate it into direct x 9 later.

So does any have or know were to get a simple directx audio tutorials?
is there a way just to make it so I can just simply load one wave file and loop it in directx aduio.
Just looping a WAVE file is about 20 lines of code; I suggest you research it yourself.

However, saying "use Ogg/Vorbis with OpenAL" when someone is asking about DirectMusic is not helpful. DirectSound, I could understand, but DirectMusic is something totally different. Like, it comes with authoring tools, can synthesize scores based on state machine transitions, can integrate sound effect, sequencing and score all in one package, and a bunch of other things that OpenAL doesn''t pretend to do. (That''s fine; OpenAL isn''t SUPPOSED to do those things)
enum Bool { True, False, FileNotFound };
The thing is I need tutorials to learn from and I cant find any good ones that are just on playing one file and looping it. I found tutorials on loading lots of sounds and do complicated things to them but not anything really simple. It looks like direct show is the easiest but I can’t find anything to compare it with. I don’t want to make a sound core I just want to play one file.
sdk stuff is decent enough

This topic is closed to new replies.

Advertisement