jessesquires / JSQSystemSoundPlayer

A fancy Obj-C wrapper for Cocoa System Sound Services
https://jessesquires.github.io/JSQSystemSoundPlayer/
Other
581 stars 107 forks source link

add supporting for mp3 #6

Closed yfme closed 10 years ago

jessesquires commented 10 years ago

you cannot play .mp3 files via iOS System Sound Services.

please read the README file.

yfme commented 10 years ago

OK. I played .mp3 file with your code, and found no problem, so I pulled a request...

yfme commented 10 years ago

In any case, nice work, appreciate it! :)

jessesquires commented 10 years ago

Wait... WAT? :o Using .mp3 should have crashed or simply not played.

I just double-checked Apple's docs and they have not changed. I would use one of the formats that they recommend, not doing so could likely break your app (if not now, in the future). There are plenty of free audio conversion apps out there, so it shouldn't be a problem to convert your mp3 to wav or something else.

However, you are certainly free to pass @"mp3" to the extension parameter. (If you don't care about the risks noted above.) The string constants that I provide here are just for convenience.

Thanks @yfme !