0

I am using AVAudioPlayer in my program, but having touble in something

I have 10 sounds, and as I click one to play or then others don't stop, I tried to solve by

[myPlayer stop];
myPlayer = nil;

it works, but takes time, so what should I do to stop when it click 2nd row on tableview for playing another sound?

If any query regarding question, you may ask in comments,

1
  • @7KV7, thnx for editing, now is there any answer? Jul 19, 2011 at 7:41

1 Answer 1

0

I think You hae added some observer before calling, [myPlayer play];... So you have to remove those observer

2
  • is there no any alternative and faster way? Jul 19, 2011 at 7:19
  • I solved the problem dear, there was some issue of re-initializing the same objects and call play and stop(was working for current object), so I declare BOOL and check conditions, and solved the problem. Jul 21, 2011 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.