How do I check if the iPod supports audio recording using Cocoa API?
Asked
Active
Viewed 296 times
0
-
AudioSessionInitialize(NULL, NULL, NULL, NULL); UInt32 propertySize, micConnected; AudioSessionGetProperty(kAudioSessionProperty_AudioInputAvailable, &propertySize, &micConnected); [self updateMicStatus:micConnected]; // user-created method – rui Oct 08 '10 at 15:53
1 Answers
1
If you know what devices support audio recording (iPhone always does for example) you can use methods from this question:
Determine device (iPhone, iPod Touch) with iPhone SDK
Actual testing for input device connected can be done by Audio Session Services shown in this solution:
-
1my ipod touch (2g) supports audio recording if a headset with microphone is plugged in. So I would not go for the method you suggest. – Matthias Bauch Oct 08 '10 at 15:27
-
Well, the thing is iPods can have audio input if you plug in specific headphones... – rui Oct 08 '10 at 15:28
-
1Ah this seems to have the answer to checking for actual connected input devices:http://stackoverflow.com/questions/667196/detecting-iphone-ipod-touch-accessories – Ben Oct 08 '10 at 15:32