How to get/set microphone volume
How to get/set microphone volume
- Subject: How to get/set microphone volume
- From: Symadept <email@hidden>
- Date: Tue, 20 Oct 2009 10:06:38 +0800
Hi,
I managed to get/set the earphone(output device) volume. Does anybody know how to get the same for microphone(input device). I am doing the following but still no result.
err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultSystemInputDevice, &size, &device);
err = AudioDeviceGetProperty(107, 0, 0, kAudioDevicePropertyVolumeScalar, &size, &b_vol);
err = AudioDeviceGetProperty(device, channels[0], 0, kAudioDevicePropertyVolumeScalar, &size, &volume[0]);
err = AudioDeviceGetProperty(device, channels[1], 0, kAudioDevicePropertyVolumeScalar, &size, &volume[1]);
b_vol = (volume[0]+volume[1])/2.00;
But no luck. It is always giving me the same value as output device. This is becoz DeviceIds for Output and Input are the same.
Thanks in advance.
Regards
Symadept
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden