Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Trouble with .wav and .ogg

Author
Message
Razael
11
Years of Service
User Offline
Joined: 11th Aug 2013
Location: Austria
Posted: 15th Sep 2013 00:32
Hello there,

< - sorry fot the wall-of-text , tried to explain it well - >

i am using the uptodate agk beta 19 and am discovering some issues with Audiofiles. So here's my situation:

I am using wav and ogg-Audioformat for windows and android (V4.x).
Some .wav files (Size up to 2 MB) are not beeing played on my android testdevice, on the other hand, windows cant play most of the ogg Audiofiles.

As far as i know (from the videotutorial smack-it), windows and android can play both. Why does it not work on both devices - my computer (win7 64bit) and android (samsung galaxy s3 mini)?



I tried to convert all wav into ogg and compile two "apps". One for Windows (only wav files) and one for android (only ogg). And again, the (almost i think) same Audiofiles won't work again.
I am converting with "Free Audio Converter" v.5.0.3 (build 1206) to OGG (128Kbps, 44.01 kHz, Stereo).

Any advice would be great!

h.a.n.d.
Razael

PS: If i compile an app using only 5 from 10 media files from the media folder, will everything or only these specific "used" files be packed into the package?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Sep 2013 07:08 Edited at: 15th Sep 2013 07:09
Are you using a Player for the Android or actually compiling and installing an APK?

Next, did you make sure that all file names are exactly the same, including upper/lower case, as you are calling them in your code?

Next, if there are any spaces in the file name or directory (if you use something under the media directory), that can also be a problem in Android.

As for Windows, it wouldn't care about case or spaces.

But, I think your files need to be mono, not stereo. I could be wrong on that, but all the ones I am using are PCM unsigned 8 bit mono (different Hz and kbps).

EDIT: Anything, regardless of file type, that is in your media directory will be packaged with the apk whether it is used or not.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 15th Sep 2013 09:44
my note about audio files:

sound must be wave (PCM) 16 bits , 2 channels (stereo) sampling rate 44.1 KHz
filename is important^^

before i had some that did not played at android because other format.
just compare the files that work with this one that not work.
Razael
11
Years of Service
User Offline
Joined: 11th Aug 2013
Location: Austria
Posted: 15th Sep 2013 13:51
Thanks for the quick respond!

@Ancient Landy: I am using a Player, also tried an apk installation - no difference.

the file names are exactly the same (case sensitive) - anyway agk should promt an error message if missing, or am i wrong?

@Markus: tried now wav instead of ogg and replaced the old ones with 44.1 KHz .wav files. It works!

Thank you both! = )

A last question if you allow.
Have got a .png wich is only shown in agkPlayer, not in the apk installation - any clue? (made the png with Alpha-level in photoshop)
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 15th Sep 2013 17:31
Your missing png may be a case issue. Make sure when you load it in your code you use the exact name, capitals and all. Androids are case sensitive.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Sep 2013 18:14
Quote: "anyway agk should promt an error message if missing, or am i wrong?"

No, it doesn't. If there it is an image that is missing, you get the big X one instead. But nothing for sound related files.

The same name issues apply for image files, as DVader says. What is the name of the file?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 19:20:30
Your offset time is: 2024-11-24 19:20:30