Hey Folks
I got a problem, and i am not able to solve it on my own. I got some ogg sounds, and they play fine in windows (Win 10 Home, Win 7 Pro,), but not on my android device (Samsug s4). I know that there is or was a issue
https://forum.thegamecreators.com/thread/217685. But i meet the length an size that seems needed.
coin1.ogg / plays on win / plays on android
door1.ogg / plays on win / does not play on android
woodhit1.ogg / plays on win / does not play on android
I wrote a small test code for you to test the issue. Sounds are attached.
// Project: SoundTest
// Created: 2017-08-17
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "SoundTest" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
LoadSoundOGG(1,"\media\coin1.ogg")
LoadSoundOGG(2,"\media\door1.ogg")
LoadSoundOGG(3,"\media\woodhit1.ogg")
AddVirtualButton(1,GetVirtualWidth()/2-200,GetVirtualHeight()/2,130)
AddVirtualButton(2,GetVirtualWidth()/2,GetVirtualHeight()/2,130)
AddVirtualButton(3,GetVirtualWidth()/2+200,GetVirtualHeight()/2,130)
do
For SoundPlay =1 to 3
if GetVirtualButtonPressed(SoundPlay)=1
PlaySound(SoundPlay)
endif
next SoundPlay
Print( ScreenFPS() )
Sync()
loop
Thanks in advance for testing and for suggestions.
Edit: Compiled on the latest AppGameKit 2017.8.16 and installed APK (not broadcasted) to Samsung Galaxy S4 (android 5.0.1)