Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#157774 - 29/04/2003 10:52 Vorbis support (FAQ read)
SumnerHayes
new poster

Registered: 18/04/2003
Posts: 19
So here's a question for you all...anyone working on hacking OGG Vorbis support into the empeg? Tremor (the FPU-less vorbis decoder) is under a BSD-style license these days.

I'm waiting on a new IDE cable but when it comes I'm planning on taking a look at possibilities for doing this. Just wondering if anyone out there is working on it or has looked at it in the past.

PS: FWIW I've already cross-compiled Tremor for my ipaq, which is also StrongArm. Seems to work fine.

Sumner


Edited by SumnerHayes (29/04/2003 10:54)

Top
#157775 - 29/04/2003 10:55 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Vorbis support has been announced and is to be implemented in a future version of the firmware.
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#157776 - 29/04/2003 10:56 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
The empeg guys said they'd have it coded into the empeg within a month after the realease of a Vorbis decoded they could use. They seem to be running a little behind. But I wouldn't be at all surprised to see it in some v3 software.

Mark Lord said that if someone could implement an API that would return PCM data from an Ogg Vorbis stream that he might be able to hack it into Hijack so that the player app would think it was playing a WAV file.
_________________________
Bitt Faulk

Top
#157777 - 29/04/2003 11:40 Re: Vorbis support (FAQ read) [Re: wfaulk]
SumnerHayes
new poster

Registered: 18/04/2003
Posts: 19
Mark Lord said that if someone could implement an API that would return PCM data from an Ogg Vorbis stream that he might be able to hack it into Hijack so that the player app would think it was playing a WAV file.


Cool, when I get my IDE cable I'll communicate with him.

I was thinking about hacking up an LD_PRELOAD to capitalize on wav support.

To get the PCM data out of an ogg, you just build Tremor and then do something like (error checking omitted for clarity):

#include <ivorbisfile.h>
#define PCM_SIZE (4096) /*however big you want PCM bufs */
...
OggVorbis_File vf;
int current_section=0;
char *pcm_buf=malloc(PCM_SIZE);
FILE *input=fopen("whatever.ogg", "r");
ov_open(input, &vf, NULL, 0);
while(ov_read(&vf, pcm_buf, PCM_SIZE, &current_section)>0) {
/* pcm_buf contains PCM data--do whatever you want */
}
/* pcm_buf contains the last frame, handle it */
ov_clear(&vf); /* close() equivalent.

ov_read returns up to the specified number of bytes of decoded audio in host-endian, signed 16 bit PCM format. If the audio is multichannel, the channels are interleaved in the output buffer.

In RL you need to keep the ov_read return value to see how many bytes were actually returned (and check allfopen()/ov_open()/malloc()/ov_clear() rvs).

Sumner

Top
#157778 - 29/04/2003 11:56 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
The big problem has to do with FF/REW and cueing.

Here's the appropriate thread.
_________________________
Bitt Faulk

Top
#157779 - 29/04/2003 11:58 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
djc
enthusiast

Registered: 08/08/2000
Posts: 351
Loc: chicago
rob has stated multiple times that vorbis support will be in the 3.0 release. i don't know if the schedule has changed following the rio auction, but the last update from rob was that an early beta may be out in may.

you may want to consider that before investing a lot of time in an alternate solution.

--dan.

Top
#157780 - 29/04/2003 12:42 Re: Vorbis support (FAQ read) [Re: djc]
SumnerHayes
new poster

Registered: 18/04/2003
Posts: 19
you may want to consider that before investing a lot of time in an alternate solution


Cool, thanks for the info.

I have several other Linux/StrongArm devices that I'm working with Tremor for, so it's mostly time I'm going to spend anyway. I won't be putting any time in on the empeg specific parts at least until I get a new IDE cable.

Sumner

Top
#157781 - 29/04/2003 13:09 Re: Vorbis support (FAQ read) [Re: wfaulk]
SumnerHayes
new poster

Registered: 18/04/2003
Posts: 19
The big problem has to do with FF/REW and cueing.


FWIW, ov_seek_pcm will seek by PCM frames (ie decoded seek, not compressed seek) and ov_seek_time will seek by time. The API provides info functions to get number of frames and decoded size, so it's pretty straightforward to implement a decoded byte seek.

Sumner

Top
#157782 - 29/04/2003 13:18 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Fair enough. I hadn't looked at the OV API much.
_________________________
Bitt Faulk

Top
#157783 - 29/04/2003 15:03 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5915
Loc: Wivenhoe, Essex, UK
I wouldn't be at all surprised if you had to do quite a bit of work to make the ogg code callable from within the kernel (as it would be called from HiJack).
_________________________
Remind me to change my signature to something more interesting someday

Top
#157784 - 29/04/2003 15:15 Re: Vorbis support (FAQ read) [Re: wfaulk]
rob
carpal tunnel

Registered: 21/05/1999
Posts: 5335
Loc: Cambridge UK
The empeg guys said they'd have it coded into the empeg within a month after the realease of a Vorbis decoded they could use. They seem to be running a little behind.

Depends how you look at it. 3.0-alpha1 including Ogg Vorbis support was released to the alpha team about six weeks ago. It's not up to public release standard yet, although we really should release alpha2 soon and see how that pans out.

Rob

Top
#157785 - 29/04/2003 15:26 Re: Vorbis support (FAQ read) [Re: andy]
SumnerHayes
new poster

Registered: 18/04/2003
Posts: 19
I wouldn't be at all surprised if you had to do quite a bit of work to make the ogg code callable from within the kernel (as it would be called from HiJack).


I was looking at this for an embedded Ipaq solution.

Very little of libc is used by Tremor--the big ones are the malloc calls, which are all abstracted in config.h so you could easily wrap kmalloc instead, and the libc FILE * stuff, but there's an alternate entry point that lets you define your own file operation callbacks so you can avoid the hosted ANSI C stuff entirely.

There are a very few string.h calls that are easy to replace, no *printf* except in an example program. Obviously no fp math, but also nothing from libm.

It's really as clean as one could hope from this standpoint.

Sumner

Top
#157786 - 29/04/2003 15:48 Re: Vorbis support (FAQ read) [Re: SumnerHayes]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5915
Loc: Wivenhoe, Essex, UK
Fair enough, I'd just seen people make assumptions about just "moving" usermode code into the kernel before...
_________________________
Remind me to change my signature to something more interesting someday

Top
#157787 - 29/04/2003 17:21 Re: Vorbis support (FAQ read) [Re: rob]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Depends how you look at it. 3.0-alpha1 including Ogg Vorbis support was released to the alpha team about six weeks ago.


Ooh... They kept that quiet. I've got to get on that team. I'm an SQA engineer by trade
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top