Best ways to play simple sound effect in iOS

前端 未结 5 588
野性不改
野性不改 2020-11-30 01:54

I\'m finding a number of conflicting data about playing sounds in iOS. What is a recommended way to play just a simple \"ping\" sound bite every time the user touches the sc

5条回答
  •  鱼传尺愫
    2020-11-30 02:37

    You can use AVFoundation or AudioToolbox.

    Here're two examples which use the libraries separately.

    • SAMSoundEffect (archived repository)
    • BRYSoundEffectPlayer

提交回复
热议问题