I am using the AVCam by apple and I am having difficulty running AVAudioPlayer while AVCam is running. What shouLd I do? One of them stops every time I run them at the same time. AVCam is running using dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{}); while AVAudioPlayer is in the main queue. Please help me! I need a help!
Asked
Active
Viewed 82 times
0
-
I tried removing the "audioInput" and it worked! but the audio in the video is muted. what should i do guys? – user2861124 Oct 10 '13 at 02:52
-
I got it. Just add an audio session. – user2861124 Oct 21 '13 at 08:48
1 Answers
1
Import the following
#import <AVFoundation/AVAudioSession.h>
Use following line of code in AppDelegate's didFinishLaunchingwithOptions
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];

Vaibhav Jhaveri
- 1,579
- 3
- 28
- 53