search for: ov_pcm_total

Displaying 20 results from an estimated 26 matches for "ov_pcm_total".

2003 Mar 02
1
ov_pcm_total() returns always 0 after ov_open_callbacks()...
Hi Folks, i implemented the required callback funktions to open an ogg file from memory. Now ov_pcm_total() returns always 0, strange thing about is that ov_pcm_total does not call any of the callback funktions. I also like to mention that ov_info (which uses the read and seek callback funktions) delivers correct values. Thats why i doubt that there's an error in (the rather simple) callback funkti...
2006 Feb 11
1
vorbisfile and ogg files <= 8kb
Some months ago I tried to get some answers (and didn't) for a problem I've had with ov_pcm_total for files 8kb or smaller. I have no idea whether it should make a difference, but I operate inside Visual Studio, with C++ 6.0 and MFC. The value returned by ov_pcm_total doesn't agree with ov_read. My solution had been to add 0.2 to the buffer size, so that ov_read would make it to zero. B...
2017 Apr 06
2
Zero length reported.
...llo - I have two files which play back in VLC correctly. They were encoded using this command: ffmpeg -y -i '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh9.wav' -acodec libvorbis '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh920170406-21128-146yyex.ogg However ov_pcm_total reports a zero length for one of the two files. Is this a problem with my use of the ov_pcm_total function or a problem with the encoding? The files are here http://www.credland.net/ogg/ along with a copy of the source code. This is a problem because the same function call is used by the JUCE og...
2017 Apr 06
2
Zero length reported.
...llo - I have two files which play back in VLC correctly. They were encoded using this command: ffmpeg -y -i '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh9.wav' -acodec libvorbis '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh920170406-21128-146yyex.ogg However ov_pcm_total reports a zero length for one of the two files. Is this a problem with my use of the ov_pcm_total function or a problem with the encoding? The files are here http://www.credland.net/ogg/ along with a copy of the source code. This is a problem because the same function call is used by the JUCE og...
2017 Apr 11
1
[Vorbis-dev] Zero length reported.
...y. >> >> They were encoded using this command: >> >> ffmpeg -y -i '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh9.wav' -acodec libvorbis '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh920170406-21128-146yyex.ogg >> >> However ov_pcm_total reports a zero length for one of the two files. Is this a problem with my use of the ov_pcm_total function or a problem with the encoding? The files are here http://www.credland.net/ogg/ along with a copy of the source code. >> >> This is a problem because the same function call is u...
2005 Nov 01
2
predictability of buffer size for decoding
...ndably as follows. So far, the one problem I have had is when I have played a file of only about 5k. The buffer was a little less than 10% too small. I "solved" that by padding the result with an extra 20 percent. However, I have been told that I should be able to rely on the value of ov_pcm_total. char* m_pDataVorbis; . . . OggVorbis_File vf; . . . vorbis_info* vi = ov_info(&vf,-1); . . . int pcmTotal = ov_pcm_total(&vf, -1); m_pDataVorbis = new char[pcmTotal * vi->channels * 2]; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists....
2004 Feb 18
1
Precache an entire OGG?
...anks for the help! pSOUNDDATA OGGDATA::DecodeOGGLow() { int StreamID; unsigned int Size, Read; unsigned int Location, numStreams; pSOUNDDATA pData; if(pFile == NULL) return NULL; if((pData = (pSOUNDDATA)malloc(sizeof(sSOUNDDATA))) == NULL) return NULL; pData->Length = ov_pcm_total(&sOVFile, -1); if((pData->Buffer = (char*)malloc(pData->Length)) == NULL) { free(pData); return NULL; } pOVInfo = ov_info(&sOVFile, -1); pData->Frequency = pOVInfo->rate; if(pOVInfo->channels == 1) pData->Channels = 0x1101; else pData-&gt...
2017 Apr 07
0
Fwd: [Vorbis-dev] Zero length reported.
...lay back in VLC correctly. > > They were encoded using this command: > > ffmpeg -y -i '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh9.wav' -acodec libvorbis '/tmp/2e905b981d30324f9a0664cbabb3f59a20170406-21128-r0neh920170406-21128-146yyex.ogg > > However ov_pcm_total reports a zero length for one of the two files. Is this a problem with my use of the ov_pcm_total function or a problem with the encoding? The files are here http://www.credland.net/ogg/ along with a copy of the source code. > > This is a problem because the same function call is used by t...
2005 Nov 05
1
buffer overruns for small files
...mment on an experiment I have pretty much completed in my MFC/C++ project. With my simple libvorbis implementation, ogg decoding works just fine for files that are 10kb or larger. For anything smaller (actually, I don't have a 9kb file, so <= 8), it seems that I get an inaccurate value for ov_pcm_total. Though ov_read returns zero, I overflow the buffer and crash on ov_clear. These are my TRACE statements: >= 10kb: Opening Audio File 'no_0.ogg' vi->channels = '2' vi->rate = '44100' pcmTotal = '15341' pcmTotal * vi->channels * 2 = '61364' Buf...
2007 Mar 22
1
Finding the size of a vorbis stream
Hello, I am trying to make an OGG Vorbis player for my cell phone. I have ported J-Ogg to J2ME, and it is decoding files in non-realtime. The problem is that I need to convert the OGG into a WAVE stream, which needs the size of the data in the header which has to be read before the OGG is fully decoded. So my question is, is there any way to find the size of the resulting PCM data before decoding
2003 Jul 29
2
Uncompressed size in bytes
Hi! I would like to decompress an ogg vorbis file from the memory to the memory. I wrote my own callbacks for it (Why isn't there callback functions for it? Just for void* data, and a size_t size). Now I can read the ogg file from the memory but I don't know the total size of the uncompressed data (I would like to decompress the data at once). How can I get the bitstream decompressed
2003 Sep 14
6
ov_clear(&vorbis) segfaults?
...ke availible some demo source code, but for now I'll just pull out relevant lines: //BEGIN PSEUDO CODE OggVorbis_File vorbis; vorbis_info *info; if(ov_open(infile, &vorbis, NULL, 0) != 0) error(); if((info = ov_info(&vorbis, -1)) == NULL) error(); if((availible_chunks[tint]->len = ov_pcm_total(&vorbis, -1)) == OV_EINVAL) error(); while((tulong = ov_read(&vorbis, tuint8p, 4096, endian, 2, 1, &bitstream)) != 0) dothings_withdata(); //While not end. if(ov_clear(&vorbis) != 0) error(); //SEGFAULT! //END PSEUDO CODE Now, I realize that I haven't given much in the line o...
2012 Jun 10
1
[libtremor] ov_read is reading past file size
...before, 166272 bytes, then everything is fine except the sound clip cuts off a few samples early. If I let it do the final ov_read call it attempts to read up to 168320 bytes, which is past what the PCM data actually is and the allocated buffer size. unsigned int uiPCMSamples = (unsigned int)ov_pcm_total(&vf, -1); unsigned int totalPCMSize = uiPCMSamples * vi->channels * sizeof(short); void* pvPCMBuffer = malloc(totalPCMSize); This yields 167680 bytes, so tremor knows how much PCM data there is. However ov_read is just going ahead and skipping past that number reading up to 168320 bytes....
2009 Jun 04
0
ogg audio streaming problem
...unc = &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...
2007 Dec 01
2
Length of an Ogg Vorbis file?
HI all, Is there a way of finding out the length of an Ogg Vorbis file without decoding the whole file and counting samples? TIA, Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "... the industrial-capitalist mode of software production was doomed to be outcompeted from the
2001 Nov 12
1
Vorbisfile: non-seekable
Hi, I use the following code: if (ov_open(NULL, &vf, const_cast<char*>(reinterpret_cast<const char*>(get_data())), get_size()) < 0) error = 0x100; else { vorbis_info* vi = ov_info(&vf, -1); Cvirtual_file f; const int cb_samples = ov_pcm_total(&vf, -1); const bool seekable = ov_seekable(&vf); So all data is already in memory and passed to ov_open. This stream is not seekable. Why not? And shouldn't it be seekable? Olaf van der Spek Almere, Holland Olaf@XCC.TMFWeb.NL http://xccu.sourceforge.net/ http://xcc.tiberian.com/...
2003 Sep 22
1
vorbisfile for Mac Classic
...d it be vorbis@xiph.org?) I just downloaded "SDK for MacOS9" and tried to compile the "vorbisfile_example.c" sample with CodeWarrior for Mac 8 on a Mac OS 9.2 machine. I included the libOgg and libVorbis libraries in my project, but the linker cannot file ov_clear(), ov_read(), ov_pcm_total(), ov_info(), ov_comment() and ov_open(). I looked at the Windows SDK and noticed that there are far more library files in that package, including a vorbisfile.lib. Is it possible that the MacOS9 SDK doesn't include a vorbisfile lib? Is this by design? Thanks, --jr <p>_________________...
2003 Dec 11
1
Another vorbisfile question
Is there a straight forward method for seeking straight to a particular logical stream using vorbisfile? I'm guessing I'll have to look the offset for a given link up in vf->offsets, and use that in ov_raw_seek? Thanks, John --- >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
2009 Jun 04
1
ogg audio streaming problem
...unc = &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...
2015 Dec 04
1
A few questions about libvorbis from a newbie
I am deeply sorry about the corrupt message just being sent; there seems to have been a compatibility issue with my mailer and my browser. This is an identical copy of the previous message: Hello Martin, Vorbis encoders are lossy, which is in a sense equivalent to converting the sample size of the raw PCM stream into something that would result in the desired bitrate. The "sample size"