Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

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.
in General Discussion by Sergey E. (230 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
        return;
    }
    
    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;
}
by Dan M. (2.6k points)
Thank you Dan, I'll discuss this with our programmers. :)
...