开发者

AVtouch problem

开发者 https://www.devze.com 2023-02-02 12:38 出处:网络
In my app, I select one song from tableView and played in default player, and then when i back to playlist (i.e tableview) and select another song

In my app, I select one song from tableView and played in default player, and then when i back to playlist (i.e tableview) and select another song then BOTH songs played simultaneously.

How I solve this problem ? I want to play when another song select then that selecte开发者_如何学Pythond song must played and previous one should be stopped.

Please HELP. Thanks in advance.


Hurray Problem solved....

Problem: Multiple songs overlapping in player.

Reason : Multiple instance creation of AVAudioPlayer.

Solution: Create only one instance at launch, and when play called then [audioplayer stop] then play (using flags avoid multiple creation).

Thanx to all.

0

精彩评论

暂无评论...
验证码 换一张
取 消