SuperpoweredMixer仪表值

时间:2019-06-24 03:13:15

标签: superpowered

我有一个分为两部分的问题。下面是我的audioProcessing回调的不完整版本,用于提供上下文。

1)对于SuperpoweredStereoMixer->进程,文档指出“ inputMeters”和“ outputMeters”参数“返回计量的最大值”。并且SuperpoweredPeak函数“返回峰值”。峰值功能和混频器的仪表值是否相同?我想是的,我只想确认一下。

2)当我增加或减少self-> inputLevelsA中的输入音量时,我可以看到self-> outputMeters中返回的仪表值按预期增加/减少。但是,我看不到self-> inputMetersA中的值增加/减少。实际上,当我将inputLevelsA的音量减小到0.0f时,我看不到输入电平表的值完全减小。是在输入音量水平应用于信号之前还是之后,SuperpoweredStereoMixer->进程是否返回输入仪表值?

谢谢!

static bool audioProcessing(void *clientdata, float **inputBuffers, unsigned int inputChannels, float **outputBuffers, unsigned int outputChannels, unsigned int numberOfSamples, unsigned int samplerate, uint64_t hostTime) {
    __unsafe_unretained SuperpoweredFrequencies *self = (__bridge SuperpoweredFrequencies *)clientdata;
  hasAudio1 = self->player1->process(self->musicInterleavedBuffer1, false, numberOfSamples, 1.0f);
    hasAudio2 = self->player2->process(self->musicInterleavedBuffer2, false, numberOfSamples, 1.0f);

    SuperpoweredInterleave(inputBuffers[0], inputBuffers[1], self->microphoneInterleavedBuffer, numberOfSamples);
self->inputsA[0] = self->musicInterleavedBuffer1; 
    self->inputsA[1] = self->musicInterleavedBuffer2; 
    self->inputsA[2] = self->microphoneInterleavedBuffer;
    self->inputsA[3] = NULL;
    self->outputsA[0] = self->outputInterleavedBufferA;
    self->outputsA[1] = NULL;
    self->stereoMixerA->process(self->inputsA, self->outputsA, self->inputLevelsA, self->outputLevelsA, self->inputMetersA, self->outputMeters, numberOfSamples);


SuperpoweredDeInterleave(self->outputsA[0], outputBuffers[0], outputBuffers[1], numberOfSamples);
hasAudio = hasAudio1 || hasAudio2 || micHasAudio;
    return hasAudio;
}

1 个答案:

答案 0 :(得分:0)

1)是,SuperpoweredPeak返回的值相同。 2)是的,输入表将在混合前测量响度。功率计测量输出的响度。