Sound wont play

Monkey Targets Forums/Android/Sound wont play

Fryman(Posted 2011) [#1]
Hi

I finally splurged on the pro edition today and have been working to get a game a wrote in the demo to run on android..

It works brilliantly except.. No sounds will play

I have converted the audio to ogg and even added a delay to give the game chance to load them as in a thread i found using search.

But alas I still have no sounds playing and no errors. The game works fine in other targets and the Ogg files work in chrome.

Do they have to be encoded to a set rate?


DruggedBunny(Posted 2011) [#2]
What kind of device are you testing on, and can you maybe post one of the samples here? (Eg. via SendSpace.) I'm using .ogg on an Android phone without trouble.

Also, do make sure you have the latest version of Monkey installed, as the initial download probably isn't up to date. (Click Account -> Product Updates at the top of this site.)


GfK(Posted 2011) [#3]
Was talking to somebody else about this problem the other day. Monkey/Android will not play OGG format files sampled at 48,000Hz. Resample them to 44,100 and they should work fine.


Fryman(Posted 2011) [#4]
I am testing on a Samsung Galaxy S

this is a copy of the ogg: http://www.sendspace.com/file/rvonlg

I have already updated to the latest version as I had some other issues at the start.


Fryman(Posted 2011) [#5]
Sadly Gfk that has had no effect, I have even tried lower than 44,100


DruggedBunny(Posted 2011) [#6]


It's too big for LoadSound, assuming that's what you're using -- see this note from the mojo.audio docs:


Android: Sounds to be used with PlaySound must be less than 1MB in length. Longer sounds can be played using the music commands.



Try PlayMusic if you aren't using that already.


Fryman(Posted 2011) [#7]
Yes thats it, I didnt notice that message pops up when you click mojo.audio
i skipped straight to loadsound

Thank you very much


StoneFaceEXE(Posted 2012) [#8]
A tip about 44100 Hz sound helped me a lot! Many thanks!