[SailfishDevel] SDL_mixer: different behaviour between emulator and actual device

Thomas Perl th.perl at gmail.com
Wed Apr 16 09:44:38 UTC 2014


On 2014-04-15 18:40, Iosif Hamlatzis wrote:
> Just verified it the sample from 
> https://github.com/thp/sdl2-opengles-test regarding the mixer only 
> works on the emulator.
>
> On the emulator every time you touch the screen a sound (.ogg file 
> format) is played, but on the actual device no sound comes out.
>
> Did something go wrong when SDL2_mixer was ported to SailfishOS?

No, but there did change something in the middleware that requires you 
to acquire the audio resources. I'll eventually update the example code 
to use libaudioresource. See below for a link to a SDL2 project that 
already uses libaudioresource.

See: https://github.com/thp/sdl2-opengles-test/issues/1

The example needs to be updated to use libaudioresource (which is a 
thin, API-stable wrapper around the real libresource):
https://github.com/nemomobile/libaudioresource/

Some example code that already uses libaudioresource:
https://github.com/thp/brainparty/blob/sailfish/main.cpp


HTH :)
Thomas


More information about the Devel mailing list