ogg audio streaming problem

leon deng <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.vorbis.general
Message-ID <[email protected]>
Hi,guys
Hope you are doing well!
I am an ogg format starter, and I am implementing ogg audio streaming.
I meet some problems for streaming.

My application is as follows:
I send download request to server,and server sends the download ogg file to
client side.
when  a certain amount of data is downloaded, and I start to play the ogg
file by using a library.

I use juce c++ library which uses vorbisfile.c to read and write ogg format.

I updated the lengthInSamples of the ogg file to the size of ogg file.
After certain chunk of data is downloaded,
ogg length in samples is initialized by

        callbacks.read_func = &oggReadCallback;
        callbacks.seek_func = &oggSeekCallback;
        callbacks.close_func = &oggCloseCallback;
        callbacks.tell_func = &oggTellCallback;

        const int err = ov_open_callbacks (input, &ovFile, 0, 0, callbacks);

    lengthInSamples = (uint32) ov_pcm_total (&ovFile, -1);
input is the file stream.

The first chunk data is played excellent, however, after that , it gives me
static noise.
I debugged the decoder, and it seems that the ogg pattern is not decoded
right in this case.
In vorbisfile.c
static long _get_data(OggVorbis_File *vf){
....
  long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource);
..
}

The buffer should hold the header feild "oggs", however, it did not.
I think the problem is vf->seekable = 1.
if the vf->seekable = 1, is it the problem for streaming? How can I achieve
ogg streaming?

Thank you in advance!

Leon

_______________________________________________
Vorbis mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/vorbis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.