hi, i think im missing something pretty obvious. im making dj software so i’d like to have a stereo audio file playing through 2 stereo channels and be able to adjust the levels independantly of each other (1 will be headphones/monitors). the only way i know how to do it is to specify the soundcard driver as the file is loaded, so i would be loading the file twice, 1 for each stereo channel. obviously that seems a little silly.
is there anyway to route the same audio file to multiple hardware outputs? like some kind of mix bus?
- cool mr croc asked 6 years ago
it will be the same sound card, just 4 different speaker channels. im using a mini mac with its onboard soundcard and an external audio interface with 6 outputs. i thought it may be a simple case of selecting the appropriate speaker mode (raw i think) then using pan matrices in setspeakerlevels to play on all of my 4 speaker channels, but im not sure how to specify that the left channel plays on channel 0 and 2, while the right channel plays on channel 1 and 3.
edit: just tried it and it just works, played around with the multispeaker example and this clue was in 1 of the comments
By default a stereo sound would play in all right and all left speakers
so i just do this and im away
result = channel->setSpeakerMix(1.0f, 1.0f, 1.0f, 1.0f, 0, 0, 0, 0);
Perhaps I am not quite sure what you want to achieve.
If you simply want to play a sound and control the levels you can use something like setPan, or for more control setInputChannelMix for setting the incoming levels from the sound, or perhaps setSpeakerMix for the outgoing levels, or setSpeakerLevels if you want to totally control the pan matrix.
But if you are talking about splitting out a sound so it plays on multiple devices, i.e. two different sound cards, then you will need multiple System objects.
im not entirley sure i believe that. if a 2d sound can be played as a 3d positional sound through 5.1 speakers then im pretty sure the same principal applies. it says in the fmod introduction
Now FMOD has a full multichannel mixer, even 2D sounds can be played in 5.1 (or 7.1!). Sounds can even swap their channel assignments around so left and right of a stereo sound are swapped around, mixed or all placed in the rear left speaker for example.
The way this is available is FMOD supports pan matrices. Any input sound channel can be redirected to any output speaker, and on top of this percentages/fractional levels are supported, so there are no absolute speaker assignments.
i think maybe ill just have to set aside some time, set up my audio interface and play around.
Please login first to submit.