search for: pcmout

Displaying 14 results from an estimated 14 matches for "pcmout".

2009 Oct 22
1
Is it possible to seek different Ogg Vorbis encoded packets from the File?
...o four tasks using if(!eof) 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...
2004 Apr 12
3
Decoding with 8 bit-samples
...ereo 8-bit wav file from a stereo (16 bit) ogg vorbis file (in delphi, with the vorbisfile). I use: ret := ov_open_callbacks(filein,vf,nil,0,ops_callbacks); if ret = 0 Then begin fileOut := TFileStream.Create(savedlg.FileName,fmCreate); repeat ret := ov_read(VF, pcmout, BufferSize, 0, 1, 1, nil); //'cause of the 8-bit fileOut.Write(pcmout,ret); until ret = 0; end; The result will be cracking.... etc (will be unrecognizable). Why? If I decode into 16-bit samples, everything is ok! Thank you for your reply, crc <p>------------------...
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
...stdin and I ouput to /dev/dsp after opening it, I get a weird static noise. Any idea what I'm doing 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/...
1999 Oct 11
2
XMMS plugin patch
...nnels); while(i < 2) { while(i < 2 && ogg_sync_pageout(&od.oy, &od.og) == 1) { @@ -219,9 +219,11 @@ vorbis_synthesis(&od.vb, &od.op); vorbis_synthesis_blockin(&od.vd, &od.vb); if((samples = vorbis_synthesis_pcmout(&od.vd, &pcm)) > 0) { + gint16 *outptr = pcmout; + for(s = 0; s < samples; s++) for(c = 0; c < od.vi.channels; c++) - pcmout[(s * od.vi.channels + c) * sizeof(gshort)] = pcm[c][s] * 32767; + *(outptr++) = pcm[c][s] * 32767;...
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 06
2
Zero length reported.
...2 channel, 44100Hz Encoded by: Lavf53.32.100 Length: 1146624 Source: #include <stdio.h> #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)...
2017 Apr 06
2
Zero length reported.
...2 channel, 44100Hz Encoded by: Lavf53.32.100 Length: 1146624 Source: #include <stdio.h> #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)...
2017 Apr 11
1
[Vorbis-dev] Zero length reported.
...gt;> #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); >...
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
2017 Apr 07
0
Fwd: [Vorbis-dev] Zero length reported.
...ource: > > #include <stdio.h> > #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_callba...
2001 May 11
1
question about vorbis_synthesis_blockin
I'm looking at the vorbis_synthesis_blockin and pcmout functions, and I'm confused about the positioning and determination of centerW wrt adding in the next set of data. Specifically, it seems legal (in vorbis_synthesis_pcmout) to return to the user any data up to the centerW position; however, in vorbis_synthesis_blockin, if you have a long block...
2015 Jun 27
0
Sound glitch when using libvorbisfile and libao
...DIO_CHUNK_SIZE ((16384 + PRIMAGIC - 1)/ PRIMAGIC * PRIMAGIC) char convbuffer[AUDIO_CHUNK_SIZE]; const int convsize = AUDIO_CHUNK_SIZE; The loop is now more convoluted. Here's the old one, for reference: long bytes_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, byte...
2000 Sep 24
4
Possible memory leak / xmms input plugin
Hi list, It seems that when playing several OggVorbis files under xmms, there is a memory leak. It's a rather annoying problem because when you have a playlist of 100+ files, xmms will at the end eat something like 100M or more.. Such a memory leak have been reported inside xmms-1.2.2 code and I could see it playing Ogg files and mp3 files ; upgrading to 1.2.3 solves the problem with mp3