Hi Leute,
Lang nichts mehr von mir gehört =D
Kurze Frage wenn ich Musik in mein Spiel packe und auf Android umwandel, fehlt die Musik.
Woran kann das liegen?
Muss ich die Datei mitgeben?
Danke im Voraus wenn jemand was drüber weis :good:!
It's likely to be either the format - try to use .ogg, the wrong bitrate of the music or the file path. Try playing a .WAV file instead. If it plays, it's probably not the path.
Another thing could be case-sensitivity. On windows it doesn't matter if the file is called "fred.MP3" and you try to load "fred.mp3" on Android that will fail; it has to match exactly.
Aber die Datei ist eine (.wav) Datei. Sie ist auch komplett kleingeschrieben.
In that case its either the path (most likely), or the bitrate of the .wav
Try PCM 44.100 kHz, 16bit stereo works for me.
When loading your sound file, use the containing folder in the name eg -
LOADSOUND ("Media/sound.wav"),1,1
Don't use "SETCURRENTDIR"
Ja aber was ist dan mit PLAYMUSIC soll da auch LOADSOUND?
It was a test for the path - if the sound loads and plays, then the path is likely to be correct and your music should play.
If the sound plays then try using the same format for your music eg
PLAYMUSIC "Media/music.ogg",TRUE
Ich habe das aber benutzt ich haben:
PLAYMUSIC "Music.wav", TRUE
Wenn ich daraus dann:
PLAYMUSIC "Media/Music.wav", TRUE
Habe ich keinen Ton.
Have you tried using Android Extras? That might help. Android is a PITA with sound and directories. :(
Use .ogg (vorbis) format for android music and the full path as Ian stated, it works for me fine.
I haven´t tried .wav for music on android yet, so I´m not sure. You can also use impulse tracker files .it.
Geht das nicht einfach so ohne den Datei Type zuänder?
Wenn ich die Frage stellen darf: Wie würdet ihr das den schreiben`?
I didn´t understand the question, what is schreiben?
Also, in case you need to convert an audio file to ogg, you can use vlc player or audacity.
Also soll ich nur den Datei Type ändern?
Yes, for Android, use ogg(vorbis) music.
Wav is not working here on my galaxy note 2. For sound effects it works fine.
So hab alles versuch....
Auch wenn ich den Datei -Type ändere höre ich sogar am PC nichts mehr.
I´m not sure I understood your answer, try using traditional gramatic germany because it is easier for google translator to do its job.
Anyways, for android, I use ogg, for pc, I can use wav or mp3.
Ogg will play on VLC on my pc but it won´t play inside my GLB.
I´m uploading the music file I used to test to a temporary folder online,
try to play that on android, use full path and playmusic.
It works fine here.
Get the ogg test music from here:
https://www.wetransfer.com/downloads/65ca9dd81ddfcac8ee4fbba97135e57720151119195741/2ec8edaa6bef55394ac1bccb3c82492120151119195741/135c3f
(English)
Hello,
I did the test song (Daxx - Paranoimia - Daxx Remix.ogg)
I have done so
Code:
PLAY MUSIC "Daxx - Paranoimia - Daxx Remix.ogg" TRUE
.....
I have still no sound. Do I need have the Media Folder for Android?
(Deutsch)
Hallo,
Ich habe den Test Song (daXX - Paranoimia - daXX Remix.ogg )
Ich habe es so gemacht
Code:
PLAYMUSIC "daXX - Paranoimia - daXX Remix.ogg", TRUE
.....
Ich habe trotzdem keinen Ton.
Muss ich den Media Ordner für Android haben?
It's worth trying the media folder
PLAYMUSIC "Media/Daxx - Paranoimia - Daxx Remix.ogg" TRUE
Exactly. And make the file is actually inside the media folder. ::) :-[
OK, it is was trying
did not function.
I still have no sound.
If anyone knows.
He might make an example?
Please ::) ;)
I tried it is with other projects but has brought nothing.
Check this thread here:
http://www.glbasic.com/forum/index.php?topic=9933.msg86777#msg86777
You can use that project as a test, it is playing mod and it.
Just add an ogg music to midia folder and rename it and match it in code and it should work out.
It works fine on android, but not on my windows pc.
Ok it works,
still:
Also with sound: "PLAYSOUND"?
But when I finish the program on Android runs it even further,
Can you also stop the sound?
With PLAYMUSIC use STOPMUSIC.
With PLAYSOUND use STOPSOUND.
Sorry but some projects will not do
Windows = wav
Is working
Android = ogg
It does not work
what you why?
I have tested ogg here on android and it seems to work fine on my phone and others, I have a galaxy note II.
My ogg is formated as:
16bit 44100 stereo
OGG not only for the encapsulator but the codec must be ogg vorbis.
It should work, if it dosen´t, post the code and APK you have so I can check it out on hardware.
I want to use it with other types times.
Are there any side ogg other types?
Ich danke für alle Antworten :good: