Jean-Marc Valin wrote:>>a simple question which i can't answer through the manuals ... is the >>header always 80 bytes long? >>thanks in advance, >> >> > >Right now it is. However, I may add some fields (or even additional >headers) in the future if needed. This shouldn't be a problem since the >header is always alone in his packet and there's a field that tells you >if there are additional header packets (always zero for now). BTW, why >is that important for you? >I write another voice relay and i use java speex. whenever a new user connects to a channel on the relay i transmit the header and after that i transmit the live speex encoded channel data. i am right now just splitting the header from the content to do the initialization of SpeexDecoder the manual way. however i am not that sure if i shouldn't (for easiness' sake) tweak org.xiph.speek to open the audio output line straight away by implementing another class based on PcmWaveWriter .... that way i don't have to split header from content ... do you have some hints? thanks for replying so fast ulrich -- Ulrich B. Staudinger http://www.die-horde.de email: us@die-horde.de jid: uls@jabber.org current project: REDHORN http://redhorn.sourceforge.net Blog: uls@jabber.org">http://jabber.linux.it/jogger/user.php?jid=uls@jabber.org</a> <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Tue, Oct 21, 2003 at 12:32:58AM +0200, Ulrich B. Staudinger wrote:> Another thing i noted when looking at the java code is a package counter > ... is it important to know at which package the stream pointer stands? > I mean, if it is important to continously increment the package counter > i would have to repackage the audio data for every listener .... which > can become quite CPU loady ...Hi Ulrich, I'm not familiar with the java api for speex, but it sounds like what you're talking about corresponds to the packetno field of the encapsulating ogg packet, which you shouldn't need for decoding speex. you do need to keep track of the first few packets (SpeexHeader, comments, plus however many extra header packets were specified in the SpeexHeader), but after that you can stop counting as it's all audio data. Conrad. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Another thing i noted when looking at the java code is a package counter ... is it important to know at which package the stream pointer stands? I mean, if it is important to continously increment the package counter i would have to repackage the audio data for every listener .... which can become quite CPU loady ... ulrich <p><p>Ulrich B. Staudinger wrote:> Jean-Marc Valin wrote: > >>> a simple question which i can't answer through the manuals ... is >>> the header always 80 bytes long? >>> thanks in advance, >>> >> >> >> Right now it is. However, I may add some fields (or even additional >> headers) in the future if needed. This shouldn't be a problem since the >> header is always alone in his packet and there's a field that tells you >> if there are additional header packets (always zero for now). BTW, why >> is that important for you? >> > I write another voice relay and i use java speex. whenever a new user > connects to a channel on the relay i transmit the header and after > that i transmit the live speex encoded channel data. i am right now > just splitting the header from the content to do the initialization of > SpeexDecoder the manual way. > > however i am not that sure if i shouldn't (for easiness' sake) tweak > org.xiph.speek to open the audio output line straight away by > implementing another class based on PcmWaveWriter .... that way i > don't have to split header from content ... > > do you have some hints? > thanks for replying so fast > > ulrich ><p> -- Ulrich B. Staudinger http://www.die-horde.de email: us@die-horde.de jid: uls@jabber.org current project: REDHORN http://redhorn.sourceforge.net Blog: uls@jabber.org">http://jabber.linux.it/jogger/user.php?jid=uls@jabber.org</a> <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.