Hey all,

Having some trouble with channels groups and single shot sounds. First a bit of background, our sound effects are in .vag format (for single shot) and .at3 (for music and looping samples, not sure why but I can’t get .vag files to loop).

The problem I’m having is when adding a single shot sound to a channel group, it’s not taking on the volume of that group, yet the results from getAudibility return what I’d expect (reurn is 0.0 but sound still at full volume)

Basic setup goes something like this:
FMOD CreateSound

FMOD PlaySound(paused)
Assign to channel group & get Audibility
Unpause sound

FMOD Close etc..

What could be causing this? as the channel group and the audibility are returning what I’d expect, but the sound is still audible regardless of the channel group setting.

I can post code if this will clear anything up, but just wanting to make sure the basic logic is correct. I’ve also tried loading the sounds in software mode, but I get an error that .vag files must be loaded in hardware.

Thanks in advance for the help

EDIT: Another thing to add, I was (just changed now) only using setVolume and not overrideVolume. Could this make the difference?

EDIT 2: Ok, overrideVolume doesn’t work either. In fact now I’m getting 1.0 returned from getAudibility when it should be 0.0.

Also just thought I’d mention, it works perfectly for looping sounds, just not for single shot sounds.

Another test/hack I tried has to get the audibility of the channel and then set that channel’s volume to the returned result (all while the sound was pause). The result of this was the sound would play for a split second, and then play at the correct volume.

Here is how I play my sounds and add them to channel groups
[code:22no8unk] FMOD_RESULT res;
res = m_pFMODSystem->playSound(FMOD_CHANNEL_FREE, p_pSample->m_pSample, true, &p_pSample->m_pChannel );
ERRCHECK( res );

    if( p_pSample->m_bMusic == true ) {
        printf( "Adding to BGM group\n" );
        p_pSample->m_pChannel->setChannelGroup( m_pcgBGM );
    else {
        printf( "Adding to SFX group\n" );
        p_pSample->m_pChannel->setChannelGroup( m_pcgSFX );

        float fTemp;
        p_pSample->m_pChannel->getAudibility( &fTemp );
        printf( "SFX Aud: %.3f\n", fTemp );

        p_pSample->m_pChannel->setVolume( fTemp );


p_pSample is a wrapper struct containing the FMOD::Sound * and the FMOD::Channel pointer of a given sound
[code:22no8unk]struct CFMODSound {

... functions to call FMOD functions, just basic wrappers

FMOD::Sound* m_pSample;     // The sound sample 
FMOD::Channel* m_pChannel;  // the channel the sample is playing on
std::string m_strFilename;  // Filename of the sample, for debugging purposes
int         m_iRefCount;    // To fix early loading/unloading
bool        m_bMusic;       // Used to indicate which group to add sound to when playing


Final Edit: Ok, fixed it now. Only have one special channel group to handle the BGM volume and everything else is handled by the master channel group. Probably the way I should have done it in the first place 😳

  • You must to post comments

ok, good to see you’re up and running, but are you using 4.04.06?
There was a fix recently to do with channelgroups, maybe that was related.
If you get that behaviour maybe the bug is still there, just only visible with new channelgroups that are not the master.

  • You must to post comments

The version I’m running currently is 4.03.09 so it may be the reason. Will get the boss to get the latest version as I’m guessing you’ll need a bunch of details I don’t have.

Not really needed now as I’ve fixed it enough to do what we need, but it’s always nicer to have the latest version 😀

  • You must to post comments

ah, yeah 4.04.06 has a number of fixes since that version.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.