SuperpoweredMixer 仪表值
SuperpoweredMixer Meter Values
我有一个由两部分组成的问题。下面是我的 audioProcessing 回调的不完整版本以提供上下文。
1) 对于 SuperpoweredStereoMixer->process,文档指出 "inputMeters" 和 "outputMeters" 参数 "Returns the maximum values for metering." 和 SuperpoweredPeak 函数 "Returns the peak value." 是 Peak 函数和调音台的仪表值相同吗?我想是的,我只是想确认一下。
2) 当我增加或减少 self->inputLevelsA 中的输入音量时,我可以按预期看到 self->outputMeters increase/decrease 中返回的仪表值。但是,我没有在 self->inputMetersA 中看到值 increase/decrease。事实上,当我将 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;
}
1) 是的,SuperpoweredPeak returns 具有相同的值。
2) 是的,inputMeters 将在混音前测量响度。输出计测量输出的响度。
我有一个由两部分组成的问题。下面是我的 audioProcessing 回调的不完整版本以提供上下文。
1) 对于 SuperpoweredStereoMixer->process,文档指出 "inputMeters" 和 "outputMeters" 参数 "Returns the maximum values for metering." 和 SuperpoweredPeak 函数 "Returns the peak value." 是 Peak 函数和调音台的仪表值相同吗?我想是的,我只是想确认一下。
2) 当我增加或减少 self->inputLevelsA 中的输入音量时,我可以按预期看到 self->outputMeters increase/decrease 中返回的仪表值。但是,我没有在 self->inputMetersA 中看到值 increase/decrease。事实上,当我将 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;
}
1) 是的,SuperpoweredPeak returns 具有相同的值。 2) 是的,inputMeters 将在混音前测量响度。输出计测量输出的响度。