menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

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.
dans General Discussion par Sergey E. (230 points)

1 Réponse

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;
}
par Dan M. (2.6k points)
Thank you Dan, I'll discuss this with our programmers. :)
...