My question is the topic name, specifically i am trying to determine if anything in the music category is currently playing.

int music_channel_count = 0;

FMOD::EventCategory* music_category = NULL;
fmodwrap::error::check( fmod_system_->getCategory( detail::music_category_name, &music_category ) );

if( music_category != NULL )
    FMOD::ChannelGroup* music_channel_group = NULL;
    fmodwrap::error::check( music_category->getChannelGroup( &music_channel_group ) );

    if( music_channel_group != NULL )
        fmodwrap::error::check( music_channel_group->getNumChannels( &music_channel_count ) );

is_music_playing_ = music_channel_count > 0;


that’s the code i thought might work, but it’s not showing a music_channel_count greater than

however that could also be due to other complications, so i want to ask whether the code above "should" work to determine if a member of that category is currently playing.

or is there a simpler way im missing?

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.