Version 11.414 the the audio is not played

Previous topic - Next topic

erico

Quote from: diego on 2013-Oct-07
...
It's my smartphone????:S

hmmm, could it be?

You are running the glbasic-debug.apk file right?
Is your phone set to usb-debug and developer mode?

Kyo

Yes and yes ... the game run fine ... without bug ... but the audio not work ...
With external media it work fine!

at this point I just have to use the media folder as external.
Can anyone tell me if there is an example in GLBasic, Download (a large file) from web site with a progress bar???

:giveup:

erico

Not bug. I mean did you copy that apk file from bin and installed that one? It is the one i use here and it works.
Also what about the phone settings? No dev mode usb debugg might block an unsigned file to access internal files?

Kyo

But the game run fine ....
Only the music and the sound don't work ....

Please download my attachment file on page 1 and test it on your smartphone and tell me if it works!  :good:

erico

Oh i see what you mean. Sorry.
Im off home now but will be back soon and i give it a go. :good:

MrTAToad

Instead of using SetCurrentDir, use LOADMUSIC "Music/Music_0.0.ogg"

spacefractal

#21
LOADMUSIC GETCURRENTDIR$()+"Music/Music_0.0.ogg" is t he correct way. There is a bug, which mean you need send the full path to it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

LOADMUSIC Command does not exist or PlayMusic or LoadSound ....  =D

I've tried so:
Code (glbasic) Select

LOADSOUND GETCURRENTDIR$() + "Sound/Hit_0.wav", 1, 4
PLAYMUSIC GETCURRENTDIR$() + "Music/Music_0_0.ogg", TRUE //mp3 for win // ogg for Android
MUSICVOLUME 1


and now the sfx works but not the music!

Can anyone post a file download function from php website, maybe with progress bar?

I prefer to use an external file and I have less problems!  :booze:

erico

Tested your program.

The ogg file you have there does not play on my android.
I converted the mp3 to wav  and that wav to ogg just to test formats and my ogg file now works fine on android.

Here is the music file, can you substitute that and test on your device?

erico

Quote from: erico on 2013-Oct-07
...
My working OGG file is stereo, 44100hz, 499kb/s, 16bit. VORB.
...

Now just checked the OGG you have there and it seems incorrect.
It uses ogg as encapsulator but the codec going is FLAC, not VORB and GLB does not work with FLAC.

Make sure your OGG files are using the vorbis audio(vorb) codec and you should be fine.
Using sound editors like AUDACITY should be a simple matter of exporting to ogg vorbis file.

edit: I ran your code with bits of modification on GLB10.283, should be fine on newer versions too.
edit2: your ability to run that file from external sd might be related to having FLAC codec installed on your android device, maybe the system bridges things outside GLB apk when dealing music playing stuff. I heard before that GLB will play any codec as long as it is installed on the system. For android, you might want to stick to vorb as you can be sure all android systems carries that one.

Kyo

oooh thanks erico, I use Audiacity and now the music works fine!

Thank you to all comunity for help!  :booze:  :booze:

erico

gotta read the fine prints  :nana: :D  :good:


edit: let us know if you need full path or not for android on the new GLB.

Kyo

oh Yes I use fullpath ..... 

Now I am interested to understand how the command NETWEBGET, to make downloading a large file from a website.
should read my file size and have a progress bar, you think I can do?

Hopefully I open another topic :D

erico

Quote from: diego on 2013-Oct-08
oh Yes I use fullpath ..... 
...

Does it work without fullpath? Just so that we know the newer GLB needs it or not. By the discussion here, it seems it still needs it, but I don´t have the latest beta installed to check it myself.

Yep, the netwebget will get better visibility on a new thread. I have no idea how to use it though.
I also suspect that was asked before, specially about the progress bar.

Kyo

I noticed that the sound on android have a small delay in the start...  :S
this happens to you?