[RESOLVED] No audio on Kindle Fire

I recently run into a problem with an app not playing audio on my Kindle Fire (haven’t tested other android devices).

When I look into ADB I see the following:
 

I/SoundDecoder_SetError(10740): WAV: Not a RIFF file.

I/SoundDecoder_SetError(10740): MPG132: Message: I am done with this track.

I/SoundDecoder_SetError(10740): OGG: not valid Ogg Vorbis data.

I/SoundDecoder_SetError(10740): Unsupported codec

I’m not sure why this is happening as I’m able to play the files on my PC without a problem.

Please help!

Hello @guillopuyol,

What type of sound file are you playing? Also, can you show me the code where you attempt to play it?

Brent

Thanks for the reply.

I am playing an ogg file:  here is the code:

--Sound Function local function playSound(soundFile, myLoops, myChannel) local soundExtension = ".m4a" local environment = system.getInfo( "environment" ) if environment=="Android" then soundExtension = ".ogg" end --print("Running on Game:playSound") if storyboard.gameVars.soundEnabled==1 then local mySound = audio.loadSound("Sound/"..soundFile..soundExtension) audio.play(mySound, {loops=myLoops, channel=myChannel}) end return true end ------------------------------------------------------------ I CALL THE FUNCTION LIKE THIS local stallAlarm = playSound("stallAlarm", { channel=6})

OK…  I got it to work…

Turns out the environment variable wasn’t correctly used so the extension was never changed to ogg.  Instead of using the environment variable I used the targetStore and all seems to work now.

Great!

Hello @guillopuyol,

What type of sound file are you playing? Also, can you show me the code where you attempt to play it?

Brent

Thanks for the reply.

I am playing an ogg file:  here is the code:

--Sound Function local function playSound(soundFile, myLoops, myChannel) local soundExtension = ".m4a" local environment = system.getInfo( "environment" ) if environment=="Android" then soundExtension = ".ogg" end --print("Running on Game:playSound") if storyboard.gameVars.soundEnabled==1 then local mySound = audio.loadSound("Sound/"..soundFile..soundExtension) audio.play(mySound, {loops=myLoops, channel=myChannel}) end return true end ------------------------------------------------------------ I CALL THE FUNCTION LIKE THIS local stallAlarm = playSound("stallAlarm", { channel=6})

OK…  I got it to work…

Turns out the environment variable wasn’t correctly used so the extension was never changed to ogg.  Instead of using the environment variable I used the targetStore and all seems to work now.

Great!