[of-dev] iphone 007: openAL, multitouch
arturo at openframeworks.cc
Tue Apr 12 04:09:27 PDT 2011
yes, i guess there could be swappable loader backends and then player
backends for ofSoundPlayer so you could use openal as player and
libsndfile + libmpg123 as loader or apple as loader. as it is right now
the class is too big, it involves 3 different libraries so dividing it
will also make the code cleaner.
for fmod there could be a backend that is at the same time loader and
i'll give this a try and then someone else can make the apple backend
for the loader?
On 04/12/2011 12:38 PM, Damian Stewart wrote:
> right - so do we want to stick with ofxOpenALSoundPlayer only within the ofxiPhone addon, or should its iPhone (+presumably OSX as well) functionality be brought into the ofOpenALSoundPlayer in the core? perhaps this would make some sense, as a way to finally wean oF off FMod for good?
> On 12 Apr 2011, at 05:53, Zach gage wrote:
>> ofxOpenAL uses apple functions to load sounds i'm pretty sure.
>> I've done a lot of digging and modifying in the soundEngine class (whcih ofxOpenALSoundPlayer uses, and I cant recall exactly what it does, but it's not libsndfile. Unfortunately though, it is using apples classes which means it's not really compatible to be swapped in for ofOpenALSoundPlayer since it'll only work on macs
>> On Apr 11, 2011, at 12:59 PM, Damian Stewart wrote:
>>>>>> doesn't ofxOpenALSoundPlayer depend on libsndfile too? apart from that ofOpenALSoundPlayer is almost the same except it doesn't depend on sfml classes
>>>>> oh does it? in that case it can't go in: libsndfile is LGPL which isn't compatible with the App Store.
>>>> Yes, not completely sure but i think so, i was looking into some library to read sound formats that wasn't lgpl but couldn't find any. i've added also mp3 support by activating an ifdef, we could do the same for libsndfile and have for example a custom wav file reader which isn't so hard to implement
>>> yeah it definitely is, i was looking at it for a different project for iPhone and it was a no-go.
>>> ihe issue is usually that the mp3 format is copyright. there is a way to access audio samples on the iPhone (it could be adapted from the AVFoundationVideoPlayer already in the core, but skipping reading the video stream -- would give support for everything CoreAudio on the iPhone can read) but it's probably more trouble than it's worth.
>>> for my project i ended up using stb_vorbis as it's public domain and very simple to include (1 .c file, and you're good to go). it's only for ogg vorbis though.
>>> damian stewart . @damiannz . damian at frey.co.nz
>>> frey . contemporary art . http://www.frey.co.nz
>>> of-dev mailing list
>>> of-dev at dev.openframeworks.cc
>> ... ... ... ... ... ... ... ...
>> zach gage
>> of-dev mailing list
>> of-dev at dev.openframeworks.cc
> damian stewart . @damiannz . damian at frey.co.nz
> frey . contemporary art . http://www.frey.co.nz
> of-dev mailing list
> of-dev at dev.openframeworks.cc
More information about the of-dev