PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

ogg support through Edge/Hekkus

Hi there,

We've been building our game prototype pretty nicely using Edge so far.

Now we're going into sound. Hekkus library supports ogg format, but it looks like (from what I read and tried) there are some issues with EdgeLib.

Here's the code I tried (modified from hekkus example) :


Code:
if (ecd.snd->LoadMusic(0, "1.ogg") == E_OK)
ecd.snd->PlayMusic(0, true);
else
{
FILE * lfile_dumb = fopen("1.ogg","rb");
if ( lfile_dumb != NULL )
{
char data[1000000];
char * buff;
long sizeRead = fread(data, 1, 1000000, lfile_dumb);
fclose( lfile_dumb );
buff = (char*) malloc( sizeof(char) * sizeRead);
memcpy(buff,data, sizeof(char) * sizeRead);
if (ecd.snd->LoadMusic(2, buff, sizeRead) == E_OK)
ecd.snd->PlayMusic(0, true);
}
}


Neither the file or buffer method succeed.

The ogg file has the following data :
Processing file "1.ogg"...

New logical stream (#1, serial: 000037ae): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: BS; Lancer(SSE) [20061110] (based on aoTuV b5 [20061024])
Channels: 1
Rate: 44100

Nominal bitrate: 48,000000 kb/s
Upper bitrate not set
Lower bitrate not set
Vorbis stream 1:
Total data length: 739063 bytes
Playback length: 2m:12.145s
Average bitrate: 44,742475 kb/s
Logical stream 1 ended

But others would not play either.
Is there any chance to play those files with the current version ? If so any hint ?

Thanks,

Philippe
Hi Philippe,

What platform(s) are you targeting?

If you get stuck with Hekkus, I suggest to contact the author and maintainer of the project, Thomas Maniero: http://www.shlzero.com

Regards,

Wouter
Hi,

Thanks for your answer. We are targeting WM, iphone and Symbian. We still have problem with sound (any sound) on iphone.
But the problems reading ogg I was referring too are on the PC emulator (and all the others).

What I wanted to know is wether there has been any success with ogg files through EdgeLib ...

Cheers,

Philippe.
Hi Namal,

We can confirm that ogg works with EDGELIB. We had created a prototype working on the iPhone (though without using Hekkus). Ogg is just a file format, so it should work for Symbian as well.
Hi,

I'm digging up this since we have tried many things without luck to solve our sound problem.

1) Would you (or anyone) have a minimum example iphone project (real not emulator) playing a sound through Hekkus ? (I have also asked the question to the author of Hekkus, but he will not give me an example through EdgeLib, which means we would have to remake the whole Sound wrapper for all platforms, a bit cumbersome, isn't it ?)

2) Is there any minimum project (whatever platform for that matter, since none were successful) playing an ogg file through Edge ?

Thanks,
Hi Namal,

I think the problem is that Hekkus doesn't support loading OGG files through memory but only supports files. The EDGELIB sound wrapper for Hekkus always uses memory, that's why it fails. Perhaps you could persuade the Hekkus author to load OGG files through memory?