How to record and play sound in iPhone app?
问题 I tried using AVAudioSession and AVAudioPlayer to record and play sounds respectively but the sound volume is very low. I tried putting volume value of AVAudioPlayer to 1.0 and more but didnt help much. What could be my other options to record sound which can be loud enough to play back? 回答1: This code should be useful for you: #import <AudioToolbox/AudioServices.h> UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty (kAudioSessionProperty