0
0

The basic issue is that I want to call SetPosition to start an event playing from somewhere other than the start. I’m using the FMOD Designer API, version 4.6.20.

So here’s a snippet of code that I hope explains it better:

int numChannels = 0;
ms_system->getChannelsPlaying( &numChannels );

// numChannels contains 14 at this point.

FMOD::EVENT_INFO info;
m_event->getInfo( NULL, NULL, &info );
numChannels = info.channelsplaying;

// Where m_event is an FMOD::Event* setup earlier. numChannels set to 2 at this point, so all okay so far.

FMOD::ChannelGroup* pChannelGroup = 0;
FMOD::Channel* pChannel = 0;
FMOD::EventCategory *pCategory = 0;

m_event->getCategory( &pCategory );
pCategory->getChannelGroup( &pChannelGroup );

pChannelGroup->getNumChannels( &numChannels ) );

// numChannels set to 0 at this point! Why not 2? So the loop below does nothing

for( int channelCounter = numChannels -1 ; channelCounter >= 0; –channelCounter )
{
pChannelGroup->getChannel ( channelCounter, &pChannel );
pChannel->setPosition( intPosition, FMOD_TIMEUNIT_SENTENCE_MS );
}

I’ve also tried setting the event’s ChannelGroup via ms_system->createChannelGroup( 0, &m_channelgroup ) and calling getNumChannels on that, but that also returns 0.

Grateful for any help. Thanks.

  • You must to post comments
0
0

Hi,
Please check the ‘time offset’ effect in fmod designer, you should never be operating on channels in the event API.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.