Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    386131

Lets try FMOD

Sign in to follow this  
Stompy9999

76 views

So, I got the sound effects working in SDL_mixer, only to encounter another problem. When playing a sound effect, there is a notable delay of about .5-1 second between when it should play the sound and when it actually does. I know it isn't a problem with the sound file, because I specifically chose a sound file that didn't have a delay. After a google search, I found that I'm not the only one who has encountered this problem. However, it seems that no one had a really concrete solution to fix it.

So, I've decided to try using FMOD as my sound library. Another reason for the switch is that FMOD can play Impulse Tracker files, which is the format that Trapper Zoid is creating the Blocky Man music in. Hopefully using FMOD will fix the problem with the music and sound effects.
Sign in to follow this  


5 Comments


Recommended Comments

Darn - that's annoying. That's a deal breaker if I encounter the same problem with SDL_mixer - a noticable delay is unacceptable.

Given the music for BlockyMan is pretty simple I can save it in a variety of different formats: IT, XM, S3M, even MOD or MIDI if those are prefered. I think any of those would work okay for BlockyMan - I'm using synths to give it a retro feel so it's not going to be anything like orchestral quality (not that I could actually do something that good if I wanted to...)

Share this comment


Link to comment
IT should be fine now that I'm switching to FMOD.

As for having to switch to FMOD, it is quite inconvienent, but not horrible. I write my code now by wrapping the underlying libraries in my own wrapper classes. Now I only have to change my Sound and Music wrapper classes to use FMOD rather than SDL_mixer and I'll be set.

The delay with sound was actually something I encountered when I wrote the first blocky man. When the original blocky man is played, the SDL_mixer sound delay is so severe that Blocky Man is coming down from his jump when the sound is played. Hopefully using FMOD will fix this delay.

Share this comment


Link to comment
It simply sounds like you've got your sample buffer too big. What are you setting chunksize to? (The fourth parameter to Mix_OpenAudio.)

I originally copied some sample code that had 4096 which is way too long to get responsive sound effects. Now I'm using 512 as a default (it's configurable) and it works perfectly.

Share this comment


Link to comment
I used to use FMOD when I was working with SDL a few years ago - I even managed to snag me an FMOD shirt from GDC one year from the guys at their booth. I never had a problem with it. Good choice

Share this comment


Link to comment
Quote:
It simply sounds like you've got your sample buffer too big. What are you setting chunksize to? (The fourth parameter to Mix_OpenAudio.)

I originally copied some sample code that had 4096 which is way too long to get responsive sound effects. Now I'm using 512 as a default (it's configurable) and it works perfectly.


This probably would have worked in eliminating or reducing the delay. However, I've already switched to FMOD.

Quote:
Original post by Gaiiden
I used to use FMOD when I was working with SDL a few years ago - I even managed to snag me an FMOD shirt from GDC one year from the guys at their booth. I never had a problem with it. Good choice


I switched to using it just last night, and what a difference! Now I can play all my sound and music without the game's performance taking a hit.

I happened to notice that they gave the FMOD code a C++ redesign, which I definetly approve of.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now