Similar to this post:
[quote:1wupmjj5][WINDOWS/TS3] Split channel into multiple channels?[/quote:1wupmjj5]
I’m looking for a way to take a single multiple channel file (streamed) and create an individual Channel for each track in the file. I’ve read that this isn’t possible because of file pointer issues and channel stealing.
Maybe there is a different way to deal with this… what I need to do is allow for an individual Track to be delayed or have a DSP on it without affecting the other tracks in the multichannel file. Including the ability to loop a single track w/o looping all the tracks.
What I’m doing now is creating a loop where if I have 8 tracks in a file, I "createStream" 8 times, then create a channel and "setSpeakerLevels" to get my sound to the correct place. This is working, however since the file is loaded 8 times, I actually have 64 channels in memory getting decoded, etc and I’m running into problems w/ keeping up reading/playing the file.
The obvious solution is to split the 8 channel wave file into eight, 1 channel files and work with them as a group. That does work and the reading/loading/playing works fine. But my customers may not have the ability or want to work that way.
Could I implement a custom reader? Maybe "createStream" on my 8 channel file that would feed into a memory buffer, then another "createStream" w/ FMOD_OPENMEMORY??
I know this is pushing the engine pretty hard, but as hard as I’ve pushed, it’s been doing really well.
- CarltonGuc asked 5 years ago
For the case of putting DSP on some (not all of the 8) channels in one stream, you can do this with DSP::setSpeakerActive, FMOD will pass the audio through unaffected for the disabled channels.
To do looping of only one track you will need to to split the file out to 8 mono channels, which (as you say) you could do yourself if need be using FMOD_OPENMEMORY.
If you only need the ability to ensure all 8 start at the same time, using the lockDSP method will work fine. If you want more ‘sample accurate’ control of syncing take a look at setDelay.
FMOD Team — while I may tackle this at sometime, I think the best answer for our customer base is if they want to loop individual tracks, they’re just going to have to split the file into mono tracks. So if you have an idea, I’m interested in options, but it’s not critical.
But, considering that I need to possibly start up 8 or more MONO streams at the same time, what is the best way to do this?
Currently I’m doing:
foreach (Track track in this)
- CarltonGuc answered 5 years ago
Please login first to submit.