Author Topic: OGG finally works  (Read 5785 times)

Harteex (OP)

  • * Administrator
  • Posts: 713
    • Harteex Productions
OGG finally works
« on: October 20, 2009, 01:09:48 pm »
Just thought I would share my progress.
I've just listened to Big Wednesday - Jack & Mary, an ogg file I found on my Trackmania dvd :)

It really wasn't that hard at all, the thing that took me time was that I used a faulty implementation of qsort(). The effect of this was that it sometimes crashed, sometimes not...

I'm going to build a very simple audio player and then release :)

EDIT:
Please see: http://boards.dingoonity.org/dingoo-releases/gooplayer-(ogg-music-player)/
« Last Edit: October 25, 2009, 01:16:45 am by Harteex »

alekmaul

  • Posts: 330
    • Portabledev
Re: OGG finally works
« Reply #1 on: October 20, 2009, 01:44:33 pm »
nice to hear that !
we can now made a full ogg/mod/xm/s3m player for dingoo ^^

Harteex (OP)

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: OGG finally works
« Reply #2 on: October 20, 2009, 11:45:12 pm »
I was working a bit on adapting this to my buffer solution I use for raw audio... but right now it doesn't want to as I want it to. I'm going to get some sleep and then look at it again.

Anyway, here is the library and a simple sample how to use it:
http://www.harteex.com/files/SimpleSoundVorbis.zip

It plays test.ogg in the same directory as the executable.
Exit with Start+Select.

Sound is not perfect, because it needs buffering!
This is just a basic sample.

Harteex (OP)

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: OGG finally works
« Reply #3 on: October 21, 2009, 05:29:55 pm »
An update.

Now it's possible to use an ogg file from memory / buffer, good for embedding :)

http://www.harteex.com/files/SimpleSoundVorbis3.zip

To compile, there has to be an ogg file named oggTest.ogg in the res directory, and then you need to run create_resources_sound.bat.

The sound actually sounds quite good now, even thought there is no buffering.


I still haven't got buffering running ok, it sounds like it's slow. It sounds like it's too slow decoding, but I don't think so, it's probably a bug somewhere.

Here is my work in progress. If anyone wants to play around with it and finds something bad with the code, I would love to hear.
http://www.harteex.com/files/SimpleSoundVorbisPlayer.zip

EDIT: Found the problem
I wrongfully assumed that ogg would always give back the amount of data that was requested.

EDIT 2: While a lot better, still not perfect :(

EDIT 3: Ok now everything works.

EDIT 4: See http://boards.dingoonity.org/dingoo-releases/gooplayer-(ogg-music-player)/
« Last Edit: October 25, 2009, 01:16:25 am by Harteex »

davidcm

  • Guest
Re: OGG finally works
« Reply #4 on: January 21, 2010, 08:45:22 pm »
You're amazing man... you've simply saved my life!!!!!!!!

I'm wondering if it will be compatible with a game... I need to update the screen at 24fps so if I could have this running with the game engine, I'll just will kiss you xDDDDDD

Thanks again, you're the one.

Harteex (OP)

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: OGG finally works
« Reply #5 on: January 24, 2010, 11:57:51 pm »
Go get SameGoo (source) to see the ogg functionality in action in a game :)

 

Post a new topic