Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Playing MP3s in TGF.


Gunn

Recommended Posts

I had posted this on playing MP3s using the MCI object.

Okay. Set the device to either "Waveaudio" or "mciqtz.drv". (I recommend the first.) Now, in the events, tell the MCI object, at whatever time you want the MP3 to start playing, to "Open themp3.mp3" and then to "Play themp3.mp3". If you want it to repeat, then instead of "Play themp3.mp3", use "Play themp3.mp3 repeat". The MP3 has to be in the same folder as the game. (I believe.) When you are done with the MP3, use "close themp3.mp3". If this doesn't work, then let me know.

That works with any click product that has the MCI object.

Link to comment
Share on other sites

I'm certain there's a tutorial on using DMC2. If not, download the extension, put bass.dll (if i'm not mistaken) in your C:\Windows\System directory. At the start of your frame, InitBass(), set your sample rate to 44100, bitrate to 128kbps (i don't even know if you have to do that), copy your mp3 file into your game directory, open the file, and play it.

Reply if you need any more help.

Link to comment
Share on other sites

I'm certain there's a tutorial on using DMC2. If not, download the extension, put bass.dll (if i'm not mistaken) in your C:\Windows\System directory. At the start of your frame, InitBass(), set your sample rate to 44100, bitrate to 128kbps (i don't even know if you have to do that), copy your mp3 file into your game directory, open the file, and play it.

Reply if you need any more help.

DMC2 is buggy and not as efficient as DirectShow, which is what I would recommend. Also, the bass.dll file is subject to copyright restrictions. It's best to avoid using DMC2 if you can.

Link to comment
Share on other sites

RedEchidna,

I did what you said but Its still not working. I think I'm getting confused of how to put it in the event editor.

OK, when I say to tell it to do something, choose "Send Command" or whatever it's called, and use the stuff in quotes as the perimeter. Include the quotes.

If you want some stuff to copy, look in the spoiler:

Object setup

Device name: Waveaudio

Rest can be left at default

Events

Event 1:

Start of frame

-------------MCI: Send command "Open mymp3.mp3"

-------------+MCI: Send command "Play mymp3.mp3 repeat"

Event 2:

End of frame

------------MCI: Send command "Close mymp3.mp3"

And to make it stop when a MIDI plays: (Optional)

Event 3:

XSound and music object: No music is playing

-------------------------------------------MCI: Send command "Close mymp3.mp3"

Replace "Mymp3.mp3" with the MP3 name. Include the ".mp3" part.

Link to comment
Share on other sites

  • 4 years later...
  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...