Windows MaxMod2 test

BlitzMax Forums/BlitzMax Programming/Windows MaxMod2 test

REDi(Posted 2008) [#1]
Hi guys

MaxMod2 audio streaming test... http://maxmod.googlecode.com/files/MiniPlayer.zip

Just a little player for you to try out for me if you've got time, I'm looking for glitches, crackling etc or problems playing files. I'd like to get it as near perfect as possible before I move on to the OpenAL driver.

Whats changed...

1. *Everything* has been rewritten in C++, including the mod player routine.
2. Mp3 now uses libmad instead of ACM.
3. Ogg now links directly to libogg instead of using pub.oggvorbis.mod
4. Its threaded, so its stable when your apps stuck in a modal loop. It doesn't use the BlitzMax threading so you wont need the SVN version or threading enabled.
5. Ogg files are now seekable, more formats to follow.

known issues...

1. MP3 not looping tightly. (I think this might be unfixable)
2. XM volume envelope issues. (XM still WIP)
3. Ignore the flac support, it doesnt work yet.

Thanks in advance, the more people test it the better.


GfK(Posted 2008) [#2]
I'll give it a test in a min. But just a quick note about looping MP3s - I've always had that problem with MP3s even in Blitz3D. I think its something to do with how they're structured (and yes, possibly unfixable).

As long as OGG works, I'm happy.


plash(Posted 2008) [#3]
When it is playing files and I do anything using the cpu, even slightly intensive (like refreshing this page), it jitters a little.


GfK(Posted 2008) [#4]
Works fine here. Don't get the jittering that Plash mentioned.

Pentium Dual Core 1.4GHz, 2GB RAM, Vista SP1.


plash(Posted 2008) [#5]
Hmm.. Its very consistent too, if I go backwards then forwards in my browser repeatedly it will jitter over and over.


REDi(Posted 2008) [#6]
Cool thanks, I'll need to make the buffer a tad bigger then.


REDi(Posted 2008) [#7]
Plash, I've put another version up that should update the buffer more frequently, if that doesnt help I'll have to make the circular buffer bigger or may be put the threads priority up a bit (it's set to normal priority atm).

Thanks for your help!

Anyone got a really slow machine knocking about?

*EDIT* Plash what CPU usage does the player run at for you? >0%?


Hotcakes(Posted 2008) [#8]
1. MP3 not looping tightly. (I think this might be unfixable)

It is a format limitation. It needs a buffer at the beginning and end of each file. It is 'fixable' only by calculating the silence at the beginning and end of each track and skipping straight to the non silent part. Probably more work than its worth.


REDi(Posted 2008) [#9]
Yeah, I think libmad deals with the beginning ok, but it seems it can end up with a half empty frame at the end of the file, I might look into it a bit more later.


MGE(Posted 2008) [#10]
So this mod player can be used with any language or just Blitzmax?


REDi(Posted 2008) [#11]
Well its rigged for Blitzmax, but with a bit of fiddling it *could* be used with any language that can compile GCC C++, or it could be turned into a lib/dll.


GfK(Posted 2008) [#12]
Just tested it on my desktop PC. Stutters like Gareth Gates. Tested as Plash suggested, just by general use of Firefox while the app was running.

Athlon XP3000+ 2.16GHz, 1.5GB RAM, Vista SP1.


plash(Posted 2008) [#13]
Hrm.. Still seems to be stuttering just as much..


Arowx(Posted 2008) [#14]
No stutter here but on dual core?!


GfK(Posted 2008) [#15]
Anyone got a really slow machine knocking about?
How slow?

My testbed is a P3-733MHz. If I think on, I'll give it a bash tomorrow.


Triforce Guardian(Posted 2008) [#16]
1.7GHZ Intel Celeron M, XM files are fine but mp3s sometimes skips for 1 second and a half.


REDi(Posted 2008) [#17]
Thanks for testing guys.

http://maxmod.googlecode.com/files/MiniPlayer.zip

Updated again with bigger buffer and +1 priority, hopefully that should do it.


GfK(Posted 2008) [#18]
404

[edit] Assuming you meant this, still working fine but I'm on a dual core CPU again atm.


plash(Posted 2008) [#19]
http://maxmod.googlecode.com/files/MiniPlayer_3.zip


REDi(Posted 2008) [#20]
lol soz :)


plash(Posted 2008) [#21]
Nooope, still jittery.. But it seems to be slightly less now.


REDi(Posted 2008) [#22]
. XD


plash(Posted 2008) [#23]
Now I can barely notice it (really small clicks, and I'm going back n forth reallly fast).

Weird though I just noticed tiny clicks panning through each of my speakers, has it always been like this (with the incbin'd media)?


REDi(Posted 2008) [#24]
... http://maxmod.googlecode.com/files/MiniPlayer_5.zip

We'll get it in the end :)


plash(Posted 2008) [#25]
Works fine now.

Those clicks I was referring to in my last post were happening AS the song was playing (without me trying to slow it down), it seems to be gone in #5.


REDi(Posted 2008) [#26]
YAY! Thanks Plash.

whats your specs BTW.


REDi(Posted 2008) [#27]
off topic but, has anybody tried iDeneb osx86? anyone got blitzmax going on it?


plash(Posted 2008) [#28]
AMD Athlon 3800+ 2.5gb ram.


REDi(Posted 2008) [#29]
Cool, and if it works for GfK I'll be happy ;)


GfK(Posted 2008) [#30]
I'll try it in a bit. Haven't been up long, just made a brew and Top Gear is on the telly. :)


Matthew Smith(Posted 2008) [#31]
Redi,

Tested on my decent P4 2.4gHz desktop, XP Sp2, 768MB - worked fine.


GfK(Posted 2008) [#32]
Tested on my crap P3 733MHz, 256MB RAM, XP SP3 - worked fine. No stuttering whatsoever.

Also works fine on my Dual Core laptop, and on my Athlon XP3000+ (2.16GHz), 1.5GB RAM, Vista SP1.


REDi(Posted 2008) [#33]
Excellent cheers guys, I'll leave it a that then.

Sorry for the delay, I messed up my comp by trying to install iDeneb (buggered mbr on two hdds), in the middle of sorting it out atm :(

So if anyone tries it, make sure you disconnect *all* other hdds from your machine first!


plash(Posted 2008) [#34]
So if anyone tries it, make sure you disconnect *all* other hdds from your machine first!
Kind of ironic at that.. My cousin once removed his vista hdd from his computer (testing his other drive separately) and after sticking the vista drive back in it decided not to boot.


GfK(Posted 2008) [#35]
Is this available yet? I'm about to start adding audio to Magicville.


REDi(Posted 2008) [#36]
Hi GfK, Hopefully I'll be able to post the MaxMod2 module beta at the weekend or so. I've been distracted by adding PortAudio streaming, playing with libsndfile, and adding callback streams via the new thread support in SVN blitzmax.