Setting the volume of an audio device (kAudioUnitSubType_RemoteIO)

How to set the volume of an audio device on kAudioUnitSubType_RemoteIO?

I saw something for kAudioUnitSubType_MultiChannelMixer

    status = AudioUnitSetParameter(mixerUnit, kMultiChannelMixerParam_Volume, kAudioUnitScope_Output, AU_OUTPUT_BUS, volume, 0);

Thank you in advance for your help.

+3
source share
3 answers

From Chris Adamson blog Core iPhone Core dump

"RemoteIO . (0). - , RemoteIO, , , ".

+8

- , http://developer.apple.com/audio/audiounits.html iphone

result = AudioUnitSetParameter (yourUnit,                                       kHALOutputParam_Volume,                                       kAudioUnitScope_Output, busNumber, , 0);

+1

, , , . AU_OUTPUT_BUS (undefined constant?) 0 "0- " (kAudioUnitSubType_MultiChannelMixer 1 ).

If you want to set the volume of one particular input bus, you can also do this,

AudioUnitSetParameter( mixerUnit,
  kMultiChannelMixerParam_Volume, kAudioUnitScope_Input, busId, volume, 0 ) ;
0
source

Source: https://habr.com/ru/post/1751235/


All Articles