Problem with Ogg Vorbis music file and Android Deployment

Hi,



I’ve a problem with the sound when I try to deploy an Android Application. I create the Audio Node with the following code:



[java]

AudioNode music = new AudioNode(assetManager, “Sounds/Decisions.ogg”, true);

music.play();

[/java]



If i run the application on the computer, the background music loop correctly. Instead, on an Android device , i get no sound at all, and checking on the output of the SDK i get the following error:



E/AndroidAudioRenderer( 9280): SEVERE AndroidAudioRenderer 23.12.38 Failed to play Sounds/Decisions.ogg

E/AndroidAudioRenderer( 9280): java.io.FileNotFoundException: Sounds/Decisions.ogg

E/AndroidAudioRenderer( 9280): at android.content.res.AssetManager.openAssetFd(Native Method)





I Checked the libraries in the mobile project, and the .ogg file is present in the assets.jar.

Do i miss something?

For security sake Iv learned to always write in lowercase when using android.

Rename your directory to “sounds” and your sound to “decisions.ogg”

Also, they should be in the assets folder.



I’m just trying to help, this is probably just noob basic knowledge that your aware of so sorry if I offended you in any way.

Just trying to help :stuck_out_tongue:

Thank you Addez for the reply.



I tried your advices, and i’ve changed the directory and file name, changing them to sounds/decisions.ogg, but still when i deploy the project to an Android device i get the same error ( i’ve also tried another ogg files):



E/AndroidAudioRenderer( 4129): SEVERE AndroidAudioRenderer 01.00.35 Failed to load sound sounds/rising.ogg

E/AndroidAudioRenderer( 4129): java.io.FileNotFoundException: sounds/rising.ogg





The application works correctly on the computer. Does anyone have encountered the same problem?



Thanks.

I enountered the same problem as you except that it wav file format :stuck_out_tongue:

The problem may be the same as mine, and the solution is in this link :slight_smile:



http://hub.jmonkeyengine.org/groups/android/forum/topic/sound-file-not-found/?#post-167685