Sound incorrectly played in Android

Previous topic - Next topic

galiksoft

Hi people.

Why my explosion sound is incorrectly played in android? It is correctly played in windows.
Check the sound: http://galiksoft.is-great.org/explosion.wav

Make a simple project like this bellow and compile both for windows and for android and run it
Code (glbasic) Select

LOADSOUND "explosion.wav",1,1
PLAYSOUND(1,0, 0.5)
CLEARSCREEN RGB(255,0,0)
SHOWSCREEN
mousewait


As you can conclude, the explosion sound is not well played in android.
Why?
What can I do? I need exactly an explosion sound for my new bombs game.

Please help me
Thanks

okee

Convert to ogg format using Audacity
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

spacefractal

cant download this one. I either just got ads or I just go to the webhost main site. So reupload again. Howover have you try to use 16bit 22khz?

By now I cant recommered to convert to ogg for soundfx as I aware only works for music commands, not sound?

PS. Which device are you using?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

galiksoft

But if I convert to ogg format, I can't use playsound command because it only plays sounds in wav format...

galiksoft

No real device.

Just AVD (Android Emulator) and Bluestacks.


The links works: Copy the url and paste it to the browser url bar...

spacefractal

That why. It's property a emulation issue. Don't trust the emulator, which is very imperfect.

Much better test on a real device.

Reupload again and I test on my device (trying again when home).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

just tested. Its a encode error in your wav. I just got noise in "my" loant HTC Desire HD (which elsewise play sound very nice without issues).

I guess its property due the bitate, which is 11127hz. that bitrate is nonestandard and you need to reencode to a standard wav bitrate (such of 11025hz, 22050hz or 44100hz). Its also 8 bit, while I use 22khz 16bit mono myself for all soundfx for compatible.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/