GLBasic forum

Main forum => GLBasic - en => Topic started by: Ian Price on 2009-May-31

Title: Wiz games - music stutters?
Post by: Ian Price on 2009-May-31
Hi Gernot

I've just got myself a Wiz and compiled B'lox! to run on it. All is fine except the Wiz stutters while playing the music, even when nothing is happening on screen. B'lox! certainly isn't a CPU demanding game.

I'm not sure if this is a Wiz issue or GLBasic, but other Wiz games (which are far more demanding) don't have the same problem.

Here's a link to the Wiz version (identical at the moment to the GP2X version). http://www.iprice.remakes.org/my_stuff/Wiz_Blox.rar

Wiz firmware 1.0.0 BTW
Title: Re: Wiz games - music stutters?
Post by: Hemlos on 2009-May-31
Sorry, i dont have a wiz myself.
But i know a little bit about sound....

Curious, are you using wav files or midi?
midi might be better since they are tiny little files?
Perhaps the sound files are too big in filesize?
Are you using multiple buffers in the editor options?
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-May-31
The music files are .MP3s and all run fine on GP2X - it is unlikely that filesize is an issue.

I don't use MIDI files in my projects as I can't tolerate them. Most sound awful nowadays. They were acceptable in the 16bit era, but not now.
Title: Re: Wiz games - music stutters?
Post by: Hemlos on 2009-May-31
Are you using multiple buffers in the editor options?
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
I hadn't tried altering the values before, but I have now -

It doesn't make any difference, whether the number is 0 or higher - it still stutters and speeds up/down. :(
Title: Re: Wiz games - music stutters?
Post by: Schranz0r on 2009-Jun-01
If 1.0 still the current version?
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
No: 1.0.1 is the current firmware version, but the update only fixes screen tearing when playing scrolling games, so I haven't updated it yet.

Title: Re: Wiz games - music stutters?
Post by: Steinbock on 2009-Jun-01
Try to play the music as OGG instead of MP3.
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
@Ocean: While this is indeed possible, other languages also use extra threads for sound/music output and I've seen/heard nothing about them having similar problems. Dunno.


@Steinbock: I've already tried that - .OGG doesn't play at all, on pc, GP2x or Wiz.

Does GLBasic actually support .OGG? I know the online help states -
Quote"All music-formats with installed codecs are supported. (midi, wav, mp3...)"
but I've never had any luck getting .OGG to work.

Gernot... :(


[EDIT] Actually, I've just discovered something else that might be causing the problems - key polling. If in-game you bring up a menu, the music plays fine. In these menus, the program is not polling as many keys. Hmmmm...

I'll have a looksee and let you all know.
Title: Re: Wiz games - music stutters?
Post by: Steinbock on 2009-Jun-01
By me it works with OGG (MP3 stutters too). WIZ-FW 1.0.0 and newest downloadable glbasic demo-version 6.247.
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
Steinbock: Are you saying that the game stutters for you too? That doesn't surprise me, as someone else (who knows a lot more about Wiz than pretty much all of us put together) says it does too.

I am using the full GLB with latest updates.

Maybe my .MP3->.OGG conversion program (Audacity) isn't converting the music format properly? Hmmm...

Anyway, I'm just testing my first theory first and then will try to get .OGG working.

Cheers :)

Title: Re: Wiz games - music stutters?
Post by: Steinbock on 2009-Jun-01
QuoteSteinbock: Are you saying that the game stutters for you too?
Yes.

With my own program MP3 stutters but OGG works fine.
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
Would you mind sending me a small working .ogg file so that I can test with that then please?
My attempts at getting working .OGGs from my .MP3s are constant failures. :(

My email addy is - iprice AT supanet DOT com

Are you using PlayMusic "XXX.OGG",1 to play your music?


[EDIT] Even using a different converter program, I still can't hear .OGG music in GLB.
Title: Re: Wiz games - music stutters?
Post by: Steinbock on 2009-Jun-01
OGG-File is zipped in attachement (maybe other need it too).

I'm using
Code (glbasic) Select
PLAYMUSIC "./isdo/sfx/music.ogg",TRUE
MUSICVOLUME 0.8



[attachment deleted by admin]
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
That's still not playing on my laptop, however it plays fine on my Wiz - I'll convert the other stuff now (with the other converter) and give it a try :)

I wonder if my laptop is missing a codec or something? .OGGs play fine in other apps. though. Strange.

Cheers Steinbock :)
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-01
SUCCESS!!

Thankyou Steinbock, .OGG is now playing perfectly well in B'lox! on the Wiz (without sound on pc,but I'll investigate that at a later date).

However, the .MP3 problem still stands - just avoid this by using .OGG :)

Give me five mins and I'll update the link above with a fully working version of Wiz B'lox!
Title: Re: Wiz games - music stutters?
Post by: hoessi666 on 2009-Jun-12
In my Program TetWiz, I must use mp3 as music-Format; ogg won?t play properly. (FW 1.0.0)
So, it?s just the other way round...
Maybe you?ll need the music in a special format (8/16 bits, bitrate...)?
Title: Re: Wiz games - music stutters?
Post by: Ian Price on 2009-Jun-12
Something's obviously amiss.

Do you want me to convert the .MP3 to .OGG for you and see if that makes a difference?
Title: Re: Wiz games - music stutters?
Post by: Kitty Hello on 2009-Jun-12
It's very strange. I'm just using SDL_mixer for music. They said that MP3 is a problem on Wiz. But ogg should wund OK...
Title: Re: Wiz games - music stutters?
Post by: hoessi666 on 2009-Jun-12
Quote from: Ian Price on 2009-Jun-12
Do you want me to convert the .MP3 to .OGG for you and see if that makes a difference?

Not necessary anymore...I released the Game a little while ago...
But it would be nice to clear that music-problem in nearer future  =D
Title: Re: Wiz games - music stutters?
Post by: momosxp on 2009-Jul-12
GLBasic will crash with playmusic and ogg files after the third or fourth file.
Tried with stopmusic and playmusic "". with mp3 it works fine.. but problems on wiz.
Midi files will not work because off musicvolume -.-
Title: Re: Wiz games - music stutters?
Post by: Hemlos on 2009-Jul-12
Wiz is linux, so it doesnt have access to the MCI_Library, i assume?
If it did have access to that, it controls all aspects of media controls.
I wrote small library to access it, maybe you can emulate it somehow?

http://www.glbasic.com/forum/index.php?topic=2502