Welcome, Guest. Please login or register.
Pages: [1]
  Print  
Author Topic: OGG finally works  (Read 1312 times)
Harteex
Global Moderator
* * *

Karma: 52
Offline Offline

Posts: 343



WWW
« 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 Smiley

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 Smiley

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

Karma: 65
Offline Offline

Posts: 230


Out of memory error


WWW
« 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 ^^
Logged
Harteex
Global Moderator
* * *

Karma: 52
Offline Offline

Posts: 343



WWW
« 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.
Logged
Harteex
Global Moderator
* * *

Karma: 52
Offline Offline

Posts: 343



WWW
« 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 Smiley

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 Sad

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 » Logged
davidcm
*

Karma: 0
Offline Offline

Posts: 9


« Reply #4 on: January 21, 2010, 09: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.
Logged
Harteex
Global Moderator
* * *

Karma: 52
Offline Offline

Posts: 343



WWW
« Reply #5 on: January 25, 2010, 12:57:51 AM »

Go get SameGoo (source) to see the ogg functionality in action in a game Smiley
Logged
Pages: [1]
  Print  
 
Jump to: