BASIC

Author Topic: Android Sound/Music again  (Read 5425 times)

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Android Sound/Music again
« on: 2014-Aug-04 »
I know this has come up a lot in the forums, Ive read nearly every post in the search but no joy.
Ive tried ogg in mono 8kh 11 22 etc all encoded with audacity for music, no sound on 3 different android devices
ive tried wav mono for sound effects still no sound, all work with windows (mp3 replaced ogg).

anyone got a working test project that works on android.

I Know MrTAToads ocean loader runs from the playstore, but is it using Standard glbasic or Android extra (which ive not installed/read instructions yet )

hopefully some one can give me pointers on what i missing

cheers all





Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
Re: Android Sound/Music again
« Reply #1 on: 2014-Aug-04 »
this is a well known bug for Android, but is easy to fix it.

Just use fullpath (GETCURRENTDIR$()) for the loading them. Its should have documented it in the help file.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Android Sound/Music again
« Reply #2 on: 2014-Aug-04 »
Also, I run music in ogg on android set as:

Bits:              16bit
Codec:          Vorbis Audio (vorb)
Channel:       Stereo
Sample rate: 44100 Hz
Bitrate:          499 kb/s

Here the bitrate is quite high and I´m not sure I actually need it to be stereo, a 4:30 minutes track can weight about 11mb with this settings...

Either way, your problem is probably path related as Spacefractal pointed out.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
Re: Android Sound/Music again
« Reply #3 on: 2014-Aug-04 »
can the thread been moved to the glbasic en forum (and delete this message?)

EDIT: The message was for THIS message only, not yours.
« Last Edit: 2014-Aug-04 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Re: Android Sound/Music again
« Reply #4 on: 2014-Aug-04 »
thanks for the advice.

feel free to delete or move this post, I must have clicked wrong tab, Sorry.



Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Re: Android Sound/Music again
« Reply #5 on: 2014-Aug-05 »
tested Sound/music on android.
all working perfectly.

Interesting that most forum users recommends mono except erico, I found mono ogg's pop every second on all my devices no matter what sample rate/bit rate. stereo works perfectly at all standard bit rates and quality settings tested

also I read that MOD files work but not .xm or .s3m, I've thrown all 3 at glbasic and all work on android ( not tried .IT )

Thanks Again
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Android Sound/Music again
« Reply #6 on: 2014-Aug-05 »
.IT would be really nice.

Recommendation for mono is probably related to halving the final file size and that most android phones don´t have stereo speakers or it really dosen´t make much a difference at all. If the musician actually did different sounds per channels on the stereo then it may be worth it, but I doubt it adds anything useful, in general, using a mono track playing on both channels is fine.

I haven´t tried to play mono ogg on my android yet.

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Re: Android Sound/Music again
« Reply #7 on: 2014-Aug-05 »
Just tested .IT and that works on Android.

Noticed that my sound test project is taking longer and longer to transfer/install to my phone, then i noticed the apk files size 51mb.
dropped it into winrar and found all my deleted test samples files still there.
At least I now know that the project media folder is just copied over and added to the last compile.
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Android Sound/Music again
« Reply #8 on: 2014-Aug-05 »
Yes, keep good attention to your project folder, specially the media folder, I got into the same 51mb mistake some while ago :D

.IT works on android natively? Would it work on all androids or just yours specifically? I have an impulse tracker player installed on my android, maybe the music plays because of this? I´d have to test, but I doubt standard android comes with support for such.

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Re: Android Sound/Music again
« Reply #9 on: 2014-Aug-06 »
Looks like the libmikmod created by glbasic is doing the work, tried .IT on my kids cheap tablet(running jelly bean)
only android default audio player installed and that works. I did notice a click in the sound playback every 2sec but its a slow device.

I personally use Xmp Mod Player by Claudio Matsuoka always being updated
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Android Sound/Music again
« Reply #10 on: 2014-Aug-06 »
Looks like the libmikmod created by glbasic is doing the work, tried .IT on my kids cheap tablet(running jelly bean)
only android default audio player installed and that works. I did notice a click in the sound playback every 2sec but its a slow device.

what?? how? where did that come from? I gotta test it out...
An IT file here is 96kb against a somewhat 2mb  OGG version.
10 different musics and we are looking at 20mb more into the app.
I have to try this out.

Quote
I personally use Xmp Mod Player by Claudio Matsuoka always being updated

Me too and XMplay on windows too for listening and Madtracker to sniff closer.

MrTAToad

  • Guest
Re: Android Sound/Music again
« Reply #11 on: 2014-Aug-06 »
My Android app doesn't use Android Extra.

You need to be specific about the music file unfortunately.  There did used to be some posts about the specific format somewhere.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
Re: Android Sound/Music again
« Reply #12 on: 2014-Aug-06 »
the mod thing works property only on Android, and its its a part of AndroidExtras at all.

Today im got my third game just run on my Android with basic Android Extras support (to fix orientation, which is only feature im currently uses for that).
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Android Sound/Music again
« Reply #13 on: 2014-Aug-06 »
...
I personally use Xmp Mod Player by Claudio Matsuoka always being updated

I noticed xmp player on android plays my IT differently.
I wonder what happens when I play it inside a GLB game, that I will have to try.


Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 908
  • 96A285CC
    • View Profile
    • my youtube channel
Re: Android Sound/Music again
« Reply #14 on: 2014-Aug-06 »
mod , it  etc is working with the glb sound in android ??

if so  :good:   finally