Error running soundPlayerExample on the Pi


I’m testing my recent install of OpenFrameworks on a Raspberry Pi. When I run the soundPlayerExample I get the following error:

[ error ] ofOpenALSoundPlayer: sfReadFile(): couldn’t read “/home/pi/openFrameworks/examples/sound/soundPlayerExample/bin/data/sounds/1085.mp3”
Floating point exception

Which I understand is related to the mp3 codec missing in the system. I ran the “” script located in the debian directory (none is present in the debian_armv6k directory) and it successfully installed the packages. After that I tried again (even rebuilt the example) and I got the same error.

Is mp3 playback supposed to work in the Pi? Am I missing something?



I’ve experienced the exact same error with the same sample and since I’m new to this I don’t understand what it means and how to fix this.

Any hints/tips ?

Strange - I can say that it is working for me

Not that it should matter but what speed do you have your CPU set to? How about your memory split?

also let’s try this

put this the top of the ofApp::setup() function

#ifdef OF_USING_MPG123  
  ofLogVerbose() << "OF_USING_MPG123";  
  ofLogVerbose() << "NOT OF_USING_MPG123";  

Let me know which one it prints out

1 Like

Thank you for the tips.

I use the default options on the RPI:

  • no overclocking (CPU at 700MHz)
  • GPU has the default allocation (128MB)

ofLogVerbose() didn’t work so I’ve just used cout.

Here’s the output I’ve got:

[warning] ofAppEGLWindow: init(): X11 not availble on RPI yet, using a native window instead  
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 720x480  
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 720x480  
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display  
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set  
[notice ] ofAppEGLWindow: createSurface(): current renderer type: GL  
[notice ] ofAppEGLWindow: createSurface(): default renderer detected  
[notice ] ofAppEGLWindow: createSurface(): surface created correctly  
[notice ] ofAppEGLWindow: createSurface(): API bound correctly  
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----  
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1  
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4  
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG  
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom  
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4  
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface   
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW  
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION  = OpenGL ES-CM 1.1  
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR   = Broadcom  
[notice ] ofAppEGLWindow: createSurface(): -------------  
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete  
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object  
[notice ] ofAppEGLWindow: setupMouse(): mouse_fd= 5 devicePath=/dev/input/by-path/platform-bcm2708_usb-usb-0:1.3.2:1.0-event-mouse  
[notice ] ofAppEGLWindow: setupMouse(): mouse device name = Fujitsu Takamisawa Component Apple Optical USB Mouse  
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard_fd= 6 devicePath=/dev/input/by-path/platform-bcm2708_usb-usb-0:1.3.1:1.0-event-kbd  
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard device name = Mitsumi Electric Apple Extended USB Keyboard  
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete  
[notice ] ofAppEGLWindow: setupOpenGL(): peripheral setup complete  
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): entering infinite loop  
soundPlayer setup()  
[ error ] ofOpenALSoundPlayer: sfReadFile(): couldn't read "/home/pi/of_v0.8.0_linuxarmv6l_release/examples/sound/soundPlayerExample/bin/data/sounds/1085.mp3"  
Floating point exception  

The wav file plays just fine by itself as expected.

What do you recommend for the mp3 issue ?

posted from my Raspberry PI :stuck_out_tongue:

try installing libmpg123-dev and clean OF

this is assuming the root OF folder is at /home/pi/openFrameworks - you may need to adjust

$sudo apt-get install libmpg123-dev  
$make clean -C /home/pi/openFrameworks/libs/openFrameworksCompiled/project/  

When you compile the soundPlayerExample OF will then recompile automatically


Thank you! This fixed it for me.

1 Like

awesome - looks like we forgot that dependency - will fix for the next release and put up a note :slight_smile:

I can also confirm that mp3 now works on my RPI after installing libmpg123-dev and recompiling OF.
Thanks !

Hi! Sorry for digging up such an old topic, but just wanted to remind that this is not fixed yet.


Hello, posting from 2016 since it solved my problem. Thanks!


I’m having the same problem. Fresh install of OpenFrameworks on RPI 3 and the sound examples always complains about ofSoundUpdate() not implemented on this platform.

I had the same problem, I just dont do the update() in the loop.

Thanks, that worked out. I always though you needed to update it!