Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting volume on Audio Unit (kAudioUnitSubType_RemoteIO)

How to set volume on Audio Unit specifically on kAudioUnitSubType_RemoteIO ?

I saw something for kAudioUnitSubType_MultiChannelMixer

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

Thanks in advance for your help

like image 260
pion Avatar asked Jun 22 '10 15:06

pion


2 Answers

From Chris Adamson's blog An iPhone Core Audio brain dump

"RemoteIO does not have a gain or volume property. The mixer unit has volume properties on all input buses and its output bus (0). Therefore, setting the mixer’s output volume property could be a de facto volume control, if it’s the last thing before RemoteIO. And it’s somewhat more appealing than manually multiplying all your samples by a volume factor."

like image 190
pion Avatar answered Sep 28 '22 06:09

pion


if your target is desktop this will help you http://developer.apple.com/audio/audiounits.html with iphone target

result = AudioUnitSetParameter ( yourUnit, kHALOutputParam_Volume, kAudioUnitScope_Output, busNumber, volume, 0); this will set device volume

like image 28
水月年华 Avatar answered Sep 28 '22 05:09

水月年华