Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

ogg support through Edge/Hekkus


ogg support through Edge/Hekkus

Postby Namal » Sep 8, 2009 @ 11:12am

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: Select all









10 
11 
12 
13 
14 
15 
16 
17 
        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);
            }
        }
17 lines; 14 keywds; 7 nums; 82 ops; 3 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  


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
User avatar
Namal
pm Member
 
Posts: 14
Joined: Oct 31, 2003 @ 4:09pm


Postby edge » Sep 8, 2009 @ 6:14pm

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
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Namal » Sep 8, 2009 @ 7:11pm

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.
User avatar
Namal
pm Member
 
Posts: 14
Joined: Oct 31, 2003 @ 4:09pm


Postby edge » Sep 14, 2009 @ 8:11am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Namal » Sep 29, 2009 @ 12:58pm

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,
User avatar
Namal
pm Member
 
Posts: 14
Joined: Oct 31, 2003 @ 4:09pm


Postby edge » Sep 30, 2009 @ 11:14am

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?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron