Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Sending signal only to surround channels

0 votes
Hi everyone,

I'd like to send some portion of a signal from a 2.0 audio bus to a 5.1 audio bus — but only to surround speakers (Ls, Rs). Is there a proven method for that in Wwise?


Best regards, Serge.
asked Aug 5, 2019 in General Discussion by Sergey E. (210 points)

1 Answer

0 votes

Hi Serge,

The best way to do that is with a speaker volume matrix callback.

Something like this ( although note i haven't compiled or tested the code ):

// consider using AK::SoundEngine::GetIDFromString to get this id
AkUint32 target_bus_id = 0x123456;

void speaker_volume_matrix_callback( AkSpeakerVolumeMatrixCallbackInfo* info ) {
    AkUniqueID bus_id = info->pMixerContext->GetBusID();
    if ( bus_id != target_bus_id ) {
        // or some other way to making sure you only do this when you need it
    AKASSERT( info->outputConfig.uNumChannels == 6 );
    AKPLATFORM::AkMemSet( info->pVolumes, 0, sizeof( AkReal32 ) * info->outputConfig.uNumChannels );
    Ak::SpeakerVolumes::Matrix::VectorPtr ls = AK::SpeakerVolumes::Matrix::GetChannel( info->pVolumes, 4, 6 );
    ls[ 0 ] = 1.0f;
    Ak::SpeakerVolumes::Matrix::VectorPtr rs = AK::SpeakerVolumes::Matrix::GetChannel( info->pVolumes, 5, 6 );
    rs[ 1 ] = 1.0f;
answered Aug 5, 2019 by Dan M. (2,660 points)
Thank you Dan, I'll discuss this with our programmers. :)