0

I am going to use code to get the default volume/sound of the device which is set using the volume up or down buttons form the device, Below is the code which I am going to access the sound,

enter image description here

To resolve this error I have done research and found that to access this code we need to use CoreAudio Framework which allows to use the above code,

#import <CoreAudio/CoreAudio.h>

As suggested in a link Here But while goint to try with "<CoreAudio/CoreAudio.h>" it is giving below error for ios 7.0 +.

enter image description here

I have a need to get default system sound and this code is not giving me right to get desired result, is there any alternate way to find the current volume/sound of the device?

Any help is highly appreciated in advance.

Community
  • 1
  • 1
Jignesh Fadadu
  • 849
  • 1
  • 10
  • 29

1 Answers1

0

You would want to include AudioToolbox/AudioToolbox.h. You also need to link the framework in your build settings.

Also - The sample link you provided is for OSX while your question states that you are using iOS7. The OSX and iOS coreaudio api is not exactly the same. Some of your code above is for OSX.

jaybers
  • 1,991
  • 13
  • 18