Archived

This topic is now archived and is closed to further replies.

Crash

Quick Questions About mp3s And DirectX7

Recommended Posts

Here we go: 1, Is there support for mp3 playback in Direct7? 2, If so is it efficient enough to use within a simple 3D game? 3, If so does anyone know any sites with info on this feature? 4, If not does anyone else know where else I could get source code for loading and playing mp3s for free? Hope someone can help me quickly because I am kinda in a hurry and it will be very much appreciated. Thanks in advance, Crash, "We Must Move Forwards NOT Backwards, Sideways NOT Forwards And Always Twirling Twirling Towards Success." - 2000 "If You Keep Looking Forward Your Gonna End Up Looking Backwards At Yourself Running Sideways!" - 2001

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1) no idea,
2) no idea,
3) no idea,
4) you can check SDL_mixer (http://www.libsdl.org under libraries) to see how it loads and plays mp3, ogg vorbis, etc (or just use SDL_mixer in your project).

Sorry I didn''t code for windows in a long while, so I don''t remember much DX stuff (and I''m sure it has changed since I''ve used it anyway).

Share this post


Link to post
Share on other sites
There isn''t support for mp3 files, but with the right codecs installed, you can playback mp3 encoded wav files.

I can''t remember the name of the/an encoder, but what you would need to do is distribute it with your game so everyone can listen to the files (they are free, but mp3 licensing isn''t remember).

To make the files, you use any semi decent sound program, load the mp3, then do "Save As...", save it as a wav file, but change the encoding to be through mp3, might need to go through an options dialog to get to it though.

The files should be roughly the same size as a normal mp3.

Actually, I think I know a tutorial about it, it is for VB, but it really doesn''t matter:

Here you go:

Mp3s and Direct Sound

Actually, skimming through, you only need Window''s Sound Recorder.

Just remember though, that there are licensing fees for using mp3 in your game.

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites
There are licensing fees? Do these apply if the game is not going to be published? Sorry if that sounds dumb but Ive never tried to use a standard format for my games before.

"We Must Move Forwards NOT Backwards, Sideways NOT Forwards And Always Twirling Twirling Towards Success." - 2000

"If You Keep Looking Forward Your Gonna End Up Looking Backwards At Yourself Running Sideways!" - 2001

Share this post


Link to post
Share on other sites