Music playback options for a C#/MDX game

Started by
2 comments, last by nickwinters 18 years, 11 months ago
I've spent a few hours today searching for music playback options for a C#/Managed DX game, and nothing satisfactory has come up. I like DirectSound, but I can't use compressed formats like OGG or MP3, and DirectShow would be fine but I can't get it to loop seamlessly. Does anyone have any suggestions for a solution that will let me use compressed audio (pref. ogg) -and- loop? Thanks, Max
--------------Trans2D - 2D library for C# / Managed DirectX
Advertisement
Well, depends on what you are looking for... You could use a C# Fmod wrapper (if you are a) releasing a free app or b) willing to spend the license fee for it)

Or, you could use a managed implementation of ogg & vorbis. I was able to get a small app working decoding ogg vorbis (& theora) pretty easily... I did however use fmod, but *not* for the decoding (I used managed port of ogg/vorbis), I used it only tosend PCM to sound card. I would have used Tao.OpenAL if I didn't experience problems using it. And, I had troubles getting DirectSound working (from my lack of experience with it) effieicently.

http://www.wreckedgames.com/OggDemo.zip - Win32 Binary
http://www.wreckedgames.com/ogg.zip - Complete Source and needed lib's

It does no loop, but the code could easilybe modified to allow for looping.
Thanks. I think I found a solution, in case anyone else with the same problem is searching and sees this thread: if you look at the FMOD forums on fmod.org, they're offering a public beta of FMOD EX, which includes a C# wrapper and lots of C# examples. The wrapper is written in a very C++ style, which is a little annoying, but it works.
--------------Trans2D - 2D library for C# / Managed DirectX
I used AudioVideoPlayback namespace to play mp3s. Sadly, they've been deprecated as of summer 04.

This topic is closed to new replies.

Advertisement