Vipin Vijay
Vipin Vijay

Reputation: 393

AVAudioPlayer is not working properly in IOS 5

The audio player code that is working finely in the IOS 4.3 is not working in IOS 5.

Works fine in the simulator, but no sound from the device. Sometimes sound can be heared for a while and sfter few seconds the sound will stop.

No errors are found. IS this the problem with IOS 5.

Upvotes: 2

Views: 1673

Answers (2)

caknia
caknia

Reputation: 1251

I think it worked when I used to change my line of code with ARC enabled. I just customized the release method, and it worked.

Upvotes: 3

Cyupa
Cyupa

Reputation: 1135

If you have multiple audio/video players/recorders in your app, you should try specifying what type of audio session will begin. If you don't, the first one that will start, will block the others.

AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryRecord error:nil];

Try this.

Upvotes: 5

Related Questions