• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to get/set microphone volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to get/set microphone volume
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: "Friendly" setting sample rates
  • Next by Date: Re: "Friendly" setting sample rates
  • Previous by thread: RE: Input Render Callback and Channels
  • Next by thread: Re: How to get/set microphone volume
  • Index(es):
    • Date
    • Thread