0
0

Hi,

I’ve been looking over the docs, and can’t find a way to get the channel number that a channel object refers to.

I’m writing some code that needs to know the channel number that a sound is played on once it is started with FSOUND_FREE

Is there a way to do this?

I was thinking it would be something like Channel::GetChannelNumber, which would return a value from 0 to max_channels-1

I suppose I could iterate over all the available channels, call System::GetChannel, and check that the pointers are the same, but that seems a bit yuck… And how would this work for virtual channels?

cheers

  • You must to post comments
0
0

This sounds a bit fragile. What about supplying a macro that does the cast-shift-mask.

Also, I think it would be good to mention somewhere in the docs (if it is not there somewhere I haven’t looked) that pointers to Channels are not pointers. It’s a bit puzzling until you realize what goes on. For instance in the System::playSound() section.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.