0
AudioUnitSetParameter(appBufferContext->unit, kDynamicsProcessorParam_MasterGain, kAudioUnitScope_Output, 0, 0.5 , 0);

This line returns -50. What is the meaning of it? Actually I want to adjust volume of steamed Audio packets.

Dipen Desai
  • 237
  • 1
  • 16

1 Answers1

0

You have invoked this method with a bad/invalid parameter (kAudio_ParamError == An error in the parameter list of the function). Without knowing more about your graph, I recommend first double checking your Scopes and elements, per: https://developer.apple.com/documentation/audiotoolbox/1438454-audiounitsetparameter?language=occ

For example, is your scope == kAudioUnitScope_Output correct, what about the element == 0?

If you don't know, use CAShow() to debug your graph, so you can see exactly how components are wired up.

In the future, you can check CoreAudio error codes here: https://www.osstatus.com/search/results?platform=all&framework=all&search=-50

ruoho ruotsi
  • 1,283
  • 14
  • 13