-1

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

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

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

谢谢!

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;
}
4

1 回答 1

0

1) 是的,SuperpoweredPeak 返回相同的值。2) 是的,inputMeters 会在混音前测量响度。输出表测量输出的响度。

于 2019-07-07T13:51:13.210 回答