0

How do I check if the iPod supports audio recording using Cocoa API?

rui
  • 11,015
  • 7
  • 46
  • 64
  • 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 Answers1

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:

Detecting iPhone/iPod Touch Accessories

Community
  • 1
  • 1
Ben
  • 2,982
  • 1
  • 16
  • 12
  • 1
    my 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
  • 1
    Ah 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