search for: current_sect

Displaying 20 results from an estimated 21 matches for "current_sect".

Did you mean: current_seq
2011 Jul 15
3
ov_read error on macosx
Hi, I have this code to decode ogg data: unsigned long PSS_OggStream::DecodeOggVorbis(OggVorbis_File *psOggVorbisFile, char *pDecodeBuffer, unsigned long ulBufferSize, unsigned long ulChannels) { int current_section; long lDecodeSize; unsigned long ulSamples; short *pSamples; unsigned long ulBytesDone = 0; while (true) { #ifdef WIN32 lDecodeSize = ov_read(psOggVorbisFile, pDecodeBuffer + ulBytesDone, ulBufferSize - ulBytesDone, 0, 2, 1, &current_section); #elif MACOSX // El cuarto parametro...
2009 Oct 22
1
Is it possible to seek different Ogg Vorbis encoded packets from the File?
...statements. In this modification, each if() decodes one packet of data at-a-time, sequentially. Then, I ran the code on a single Processor and the decoding was successful. The changes in the ivorbisfile_example.c are as follows: while(!eof){ long ret=ov_read(&vf,pcmout,sizeof(pcmout),&current_section); if (ret == 0) { /* EOF */ eof=1; } else if (ret < 0) { /* error in the stream. Not a problem, just reporting it in case we (the app) cares. In this case, we don't. */ } else { /* we don't bother dealing with sample rate changes, etc, but...
2012 Jun 10
1
[libtremor] ov_read is reading past file size
...CMSize); 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. So either I have to increase the size of my pvPCMBuffer by some magic number or tremor is reading to far. int current_section = 0; long iRead = 0; unsigned int uiCurrPos = 0; do { iRead = ov_read(&vf, (char*)pvPCMBuffer + uiCurrPos, 4096, &current_section); uiCurrPos += (unsigned int)iRead; } while (iRead != 0); I've tried ev...
2006 May 11
1
Speed up?
...;oggaudio, "C:\\Test\\3.ogg" , "rb")) != 0){ std::cout << "fopen problem" << std::endl; } if ( ov_open( oggaudio, &vf, NULL, 0 ) < 0 ){ std::cout << "ov_open problem" << std::endl; } int read = 0; float** ovdata; int current_section = 0; do{ read = ov_read_float(&vf , &ovdata, 64, &current_section); if ( read == 0 ){ ov_pcm_seek( &vf, 0 ); // ov_raw_seek() won't help read = ov_read_float(&vf, &ovdata, 64, &current_section); } } while (read != 0); return 0; } --------------...
2015 Jun 14
2
Sound glitch when using libvorbisfile and libao
Hi Gunter, I think this problem started happening when I upgraded from Debian Wheezy to Debian Jessie. If nothing looks amiss in my code, it probably is a sound driver problem. But since it works 100% of the time in ogg123, I feel I must have missed some corner case. My audio driver is almost always active. I usually have my music player going in the background when I do my testing. The problem
2005 Aug 16
1
ov_raw_tell() not working properly!
...ocumentation says they are the best when speed is a concern. but the problem is that sometimes ov_raw_tell returns the same value before and after calling ov_read; here's an example: prevPos = ov_raw_tell(&vf); const long ret = ov_read(&vf, temp_buffer, 4096, 0, bytesPerSample, 1, &current_section); currentPos = ov_raw_tell(&vf); now, if I check, I'll find that prevPos == currentPos, how could this be true?? I tried the other seeking methods, which are time and pcm, and none of the did the same, prevPos is never equal to currentPos. so how can I solve this? thanks for your time...
2000 Oct 26
1
ogg123 does not stop at the end of the file
...ast the end of the file. Please apply the following patch to ogg123.c in vorbis-tools: --- vorbis-tools/ogg123/ogg123.c.orig Thu Oct 26 22:37:05 2000 +++ vorbis-tools/ogg123/ogg123.c Thu Oct 26 22:37:29 2000 @@ -461,9 +461,9 @@ while (!eos) { old_section = current_section; switch ((ret = ov_read (&vf, convbuffer, sizeof (convbuffer), is_big_endian, 2, 1, &current_section))) { case 0: /* End of file */ - eof = 1; + eof = eos = 1; break; case -1...
2015 Jun 27
0
Sound glitch when using libvorbisfile and libao
...ytes_read = 0; do { bytes_read = decode_vorbisfile(&vf); ao_play(device, pcmout, bytes_read); } while (bytes_read > 0); Here's the new loop, which now works: long bytes_filled = 0; long bytes_remaining = convsize; while (1) { while (bytes_remaining >= 4096) { int current_section; long bytes_read = ov_read(&vf, convbuffer + bytes_filled, bytes_remaining, 0, 2, 1, &current_section); if (bytes_read == 0) break; bytes_remaining -= bytes_read; bytes_filled += bytes_read; } if (bytes_filled == 0) break; ao_play(device, convb...
2017 Apr 06
2
Zero length reported.
...#include <stdlib.h> #include <math.h> #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #ifdef _WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); ex...
2017 Apr 06
2
Zero length reported.
...#include <stdlib.h> #include <math.h> #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #ifdef _WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); ex...
2002 Dec 27
1
Vorbisgain in ogg123
I'm considering patching my copy of ogg123 to support vorbisgain tags. Is there any interest in folding this sort of patch into the main line ogg123? Has anyone done this already (or to another command line ogg player)? 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
2003 Jul 27
2
Ogg ouput using libvorbisfile
...g wrong or not doing? <code> #include <stdio.h> #include <stdlib.h> #include <math.h> #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" char pcmout[4096]; int main() { FILE * input; FILE * dspdev; OggVorbis_File *vf; int eof=0; int current_section; /* Opening File */ if ((input = fopen("sound.ogg", "r")) == NULL) fprintf(stderr, "Cannot open %s\n", "sound.ogg"); /* Opening /dev/dsp for writing*/ dspdev=fopen("/dev/dsp","w"); if (!dspdev) fprintf(stderr,...
2002 Feb 05
2
Documentation Suggestions
...pass the slightly used FILE* to ov_open. Vorbisfile doesn't have a problem with that at all (whether it's secure enough is up to you. It is for me). -> If you're only playing one file at a time, and you encoded the file yourself from a single .wav, don't worry about the whole current_section-switching-formats thing. If any of these are not true for the general case, then feel free to correct me, but this is my experience trying to use vorbisfile to improve our game's audio system. -Marc Templin Engine and Tools Developer Her Interactive <p>--- >8 ---- List archives:...
2012 Dec 05
7
ov_open_callbacks takes so much time to open 210 MB OGG file
Why ov_open_callbacks(fd_, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) takes so long to open OGG file? The OGG file has just 210 MB. It takes a lot of time open the file. I am working on OGG audio recorder and player. Thanks in advance! With kind regards, Pavel
2017 Apr 11
1
[Vorbis-dev] Zero length reported.
...file.h" >> >> #ifdef _WIN32 >> #include <io.h> >> #include <fcntl.h> >> #endif >> >> char pcmout[4096]; >> >> int main (int argc, char** argv) >> { >> OggVorbis_File vf; >> int eof = 0; >> int current_section; >> >> #ifdef _WIN32 >> _setmode (_fileno (stdin), _O_BINARY); >> _setmode (_fileno (stdout), _O_BINARY); >> #endif >> >> if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) >> { >> fprintf (stde...
2017 Apr 07
0
Fwd: [Vorbis-dev] Zero length reported.
...rbis/codec.h" > #include "vorbis/vorbisfile.h" > > #ifdef _WIN32 > #include <io.h> > #include <fcntl.h> > #endif > > char pcmout[4096]; > > int main (int argc, char** argv) > { > OggVorbis_File vf; > int eof = 0; > int current_section; > > #ifdef _WIN32 > _setmode (_fileno (stdin), _O_BINARY); > _setmode (_fileno (stdout), _O_BINARY); > #endif > > if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) > { > fprintf (stderr, "Input does not appear to b...
2005 Nov 16
0
ov_read and double buffering
...ually returning zero. Is it a simple matter of making the same call to ov_read, aside from changing the buffer and datalength? This is what I am doing everytime I fill one of the buffers: long bytes_read = ov_read(&m_OggVorbisFile, m_WaveBuffers[m_nCurrentIndex], m_dwBufferLength,0,2,1,&current_section); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis/attachments/20051116/e5258e86/attachment.html
2004 Feb 07
0
OS X
...quot;CoreAudio" and "Vorbis" ? I try to decode a file with ov_read(...). It works for some (mili)seconds and then the Output get into trouble... . You need some infos? char buffer[4096]; OSStatus Render(...) { bytes_read = ov_read(&vf, buffer, sizeof(buffer), 0, 2, 1, &current_section); memcpy(ioData->mBuffers[0].mData, buffer, bytes_read); ioData->mBuffers[0].mDataByteSize = bytes_read; return noErr; } SomewhereThePlay Function(...){ ... AURenderCallbackStruct in; in.inputProc = Render; in.inputProcRefCon = NULL; ... AudioStreamBasi...
2001 Feb 18
2
Access Violation in ov_open
If I do something similar to the below ov_open always causes an access violation. The call to fopen is successful. Can anybody tell me why? (and how to fix it?) OggVorbis_File vf; int eof=0; int current_section; FILE *fd = fopen("c:\\test.ogg","rb"); if (!fd){ AfxTrace("fopen failed\n"); exit(0); } if(ov_open(fd, &vf, NULL, 0) < 0) { fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n"); exit(1); } Thanks, Lance --- &g...
2002 Jan 16
2
Problem with ov_read_float()
...memcpy, it runs fine. I'm 99% certain that I'm trashing memory somewhere, but it's not clear why. The ov_read_float docs give this as "Typical usage", but it doesn't even compile under gcc, so it's clearly wrong: float **pcm; bytes_read=ov_read_float(&vf,pcm,&current_section); Can anyone tell me what I'm missing? I'm sure there is a good reason that pcm_channels is a triple pointer, but I don't see what it is. It seems to me that a double pointer would work fine. Thanks in advance, -David Mitchell --- >8 ---- List archives: http://www.xiph.org/arc...