ofxALSoundPlayer with 3.0 software

3.0 had numerous sound management changes, so I’m assuming ofxALSoundPlayer hasn’t been updated yet?

But was curious to see if anyone here was able to get it working… or found other solutions for sound?

interesting. does it not still work? I haven’t explored 3.0 yet, so havent tried it, but apps compiled before the 3.0 sdk with ofxALSoundPlayer do appear to work just fine with the 3.0 OS on the device

Just built against 3.0, running on 3.0 and seems to work well. Simple test though.

Hi All,

I just started using the ofxALSoundPlayer on 3.0 and I did discover a problem with the download listed at the bottom of the wiki. Specifically in SoundEngine.cpp. Here are the errors

/SoundEngine.cpp: In member function ‘OSStatus BackgroundTrackMgr::SetupQueue(BackgroundTrackMgr::BG_FileInfo*)’:
/SoundEngine.cpp:706: error: jump to label ‘end’
/SoundEngine.cpp:682: error: from here
/SoundEngine.cpp:686: error: crosses initialization of ‘OSStatus err’
/SoundEngine.cpp:706: error: jump to label ‘end’
/SoundEngine.cpp:679: error: from here
/SoundEngine.cpp:686: error: crosses initialization of ‘OSStatus err’
/SoundEngine.cpp:706: error: jump to label ‘end’
/SoundEngine.cpp:670: error: from here
/SoundEngine.cpp:686: error: crosses initialization of ‘OSStatus err’
/SoundEngine.cpp: In member function ‘OSStatus BackgroundTrackMgr::SetupBuffers(BackgroundTrackMgr::BG_FileInfo*)’:
/SoundEngine.cpp:761: error: jump to label ‘end’
/SoundEngine.cpp:721: error: from here
/SoundEngine.cpp:722: error: crosses initialization of ‘bool isFormatVBR’

Thanks to the beauty of Google I found this fix

http://www.iphonedevsdk.com/forum/iphon-…-e-cpp.html

Just posting it for all who come after.

MattD

oh damn. nice work!
I’ll incorporate that into the next update

thanks!

nice find!

pasting the solution here:

I took the changes posted here and made a small tweak. Instead of replacing all the AssertNoErrors in the code, I changed the macro:

#define AssertNoError(inMessage, inHandler) \
if(result != noErr) \
{ \
printf("%s: %d\n", inMessage, (int)result); \
}

Hey guys!

I haven’t had any error compiling ofxALSoundPlayer with iPhone sdk 3.1, but I can’t hear anything when the simulator came up:

it seems that I have al the things ok:

  • OpenAl.framework imported
  • ofxAlSoundPlayer addon imported
  • song that I want to play converted to .caf

Any ideas???

Bests regards!

Roger

I don’t think ALsoundplayer sounds are compatible with the simulator.
does it work on the phone?

In a previous version ( I think 2.2 of the iphone SDK), it works with the simulator. I can’t find my working files for that version. I will try to recover the files via Time Machine, and try it again.

hey, make sure you are adding the correct openal.framework to your xcodeproject. I recently had the ‘no sound’ problem too, and found that I had added the openal.framework from my macos / frameworks folder. you want to add the one from your iphone sdk obviously (you can right click on uikit.framework, do reveal in finder, then add the openal.framework from that folder)