CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

BDGSoundPlayer 0.0.2

BDGSoundPlayer 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Bob de Graaf.



  • By
  • Bob de Graaf

Lightweight iOS soundplayer wrapper to load/cache simple .caf/wav files or play mp3 files using avaudioplayer.

Simple files (caf, .wav, etc)

Load the file using:

[[BDGSoundPlayer sharedBDGSoundPlayer] loadSound:fileName forID:soundID];

Play the file using

[[BDGSoundPlayer sharedBDGSoundPlayer] playSound:soundID]

Files that need AVAudioPlayer (MP3, etc.)

Play the file immediately using:

[[BDGSoundPlayer sharedBDGSoundPlayer] playSoundFromFile:fileName];

Additional options

Enable/Disable all sounds

The soundplayer uses the NSUserDefaults to cache a boolean using the NSString const BDGSoundOn to indicate whether sounds should be played. You can use this boolean to enable/disable all sounds.