search for: readbuff

Displaying 11 results from an estimated 11 matches for "readbuff".

Did you mean: readbuf
2011 Mar 10
4
Wav to Ogg Vorbis conversion
...I found here: http://svn.xiph.org/trunk/vorbis/examples/encoder_example.c Could you please tell me what float** buffer is needed for (I don't see it used anywhere). Also, could you please tell me what this code is doing: for(i=0;i<bytes/4;i++){ buffer[0][i]=((readbuffer[i*4+1]<<8)| (0x00ff&(int)readbuffer[i*4]))/32768.f; buffer[1][i]=((readbuffer[i*4+3]<<8)| (0x00ff&(int)readbuffer[i*4+2]))/32768.f; } Again, buffer is not used afterwards. And where does the actual encoding happen...
2005 Sep 26
2
encoder_example.c Questions
I've been trying to piece my way through the encoder_example.c program to better understand how to encode files as ogg/vorbis. I'm stuck on two sections of the code. This is the first /* uninterleave samples */ for(i=0;i<bytes/4;i++){ buffer[0][i]=((readbuffer[i*4+1]<<8)| (0x00ff&(int)readbuffer[i*4]))/32768.f; buffer[1][i]=((readbuffer[i*4+3]<<8)| (0x00ff&(int)readbuffer[i*4+2]))/32768.f; } This is the second. /* vorbis does some data preanalysis, then divvies up bloc...
2002 Dec 16
1
encoding question
...little question abound programming an ogg-vorbis encoder. The encode_example.c works ok for files with 44100/2/16 - but not for other formats. I don"t really understand what this piece of code is really doing: /* uninterleave samples */ for(i=0;i<bytes/4;i++){ buffer[0][i]=((readbuffer[i*4+1]<<8)| (0x00ff&(int)readbuffer[i*4]))/32768.f; buffer[1][i]=((readbuffer[i*4+3]<<8)| (0x00ff&(int)readbuffer[i*4+2]))/32768.f; } how should this part look for files with other specifications then 44100/2/16? I'...
2004 Apr 19
3
encoding from 22050Hz source
...encode from a 22050 Hz source wav file (only in that case), but i get the following error message: "Invalid floating point operation" I use delphi: vorbis_encode_init_vbr(vi,2,22050,0.5) . . . While (i < readCount div 4) Do Begin buffer[0][i] := smallInt((pArray(@readbuffer)[i shl 2 + 1] shl 8) or pArray(@readbuffer)[i shl 2 + 0]) / 32768; buffer[1][i] := smallInt((pArray(@readbuffer)[i shl 2 + 3] shl 8) or pArray(@readbuffer)[i shl 2 + 2]) / 32768; inc(i); End What could be wrong??? Thank you! crc ---------------------------...
2004 May 18
2
encode example
...ting the encoder example and I have a question about it... How can I encode a mono file in 22050 and 44100? I've changed the init values to: ret=vorbis_encode_init_vbr(&vi,1,22050,.5) ; and in the loop: // uninterleave samples for(i=0;i<bytes/2;i++) { buffer[0][i]=((readbuffer[i*2+1]<<8)|(0x00ff&(int)readbuffer[i*2]))/32768.f; } .. what happened is that my file came 2x accelerated (originalsamples/2). Why this happened? thanks <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg...
2003 Nov 08
2
Encoding in Delphi - Help
...-- result := ogg_stream_flush(os, og); while result <> 0 do begin OutFile.Write(Pointer(og.header)^, og.header_len); OutFile.Write(Pointer(og.body)^, og.body_len); result := ogg_stream_flush(os, og); end; eos := false; while not eos do begin bytes := InFile.Read(readbuffer, SAMPLES*4); if bytes = 0 then begin fix; vorbis_analysis_wrote(vd,0); end else begin fix; buffer := vorbis_analysis_buffer(vd, SAMPLES); // uninterleave_little_endian(buffer,@readbuffer[0],bytes div 4); uninterleave(buffer,@readbu...
2007 May 01
1
contstant bittrate mode - block size - packet size
...num_packets = 0; //num_mseconds = 0; rma.management_active = 1; rma.bitrate_limit_max_kbps = 3*128000; rma.bitrate_limit_min_kbps = 3*128000; rma.bitrate_limit_reservoir_bits = 0; rma.bitrate_limit_reservoir_bias = 0; rma.bitrate_average_kbps = 3*128000; /* skip over header */ readbuffer[0] = '\0'; for (i=0, founddata=0; i<30 && ! feof(fp_infile) && ! ferror(fp_infile); i++) { fread(readbuffer,1,2,fp_infile); if ( ! strncmp((char*)readbuffer, "da", 2) ) { founddata = 1; fread(readbuffer,1,6,fp_infile)...
2004 Feb 13
10
Encoding into MONO (delphi)
...I use a Delphi conversion (from Aleksandr Shamray), but it doesn't work when I'd like to convert a *.RAW into a mono *.ogg file. vorbis_encode_init_vbr(vi, 1, 44100, 0.5); //because of the mono the program stops at line: //* uninterleave samples */ . . buffer[1][i] := smallInt((pArray(@readbuffer)[i shl 2 + 3] shl 8) or pArray(@readbuffer)[i shl 2 + 2]) / 32768; . . Why????? Please, help me! Thank You! <p>--------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg proje...
2006 Sep 11
4
encode, decode and encode again
(I've already posted this message month ago, but nobody answered, may be it was not delivered to newsgroup?) Hello, All. I wrote an encoder-decoder based on example from OGG-Vorbis SDK. This encoder can encode a large amount of small WAV-files with equal parameters into one sound archive. Then I decode this sound archive back into large amount of small WAV-files. Theese files are
2002 Feb 20
4
Questions about libvorbisenc
Hi all, I am just coming in the mailing list.... ;-) I'm working on an Ripper/Encoder for GNUstep. At first sight, libvorbisogg seems to be the library that I needed. The problem for me is documentation. So I have a few question about this library : - in order to init an encoding process, we need to provide channels. Well, what does is mean ? - in order to init an encoding process, we need
2004 Nov 16
0
metadata switches for ffmpeg2theora
...theoraframes_add_video (uint8_t * data, int width, int height, +extern void theoraframes_init (theoraframes_info *info); +extern int theoraframes_add_video (theoraframes_info *info, uint8_t * data, int width, int height, int linesize,int e_o_s); -extern int theoraframes_add_audio (int16_t * readbuffer, int bytesread, +extern int theoraframes_add_audio (theoraframes_info *info, int16_t * readbuffer, int bytesread, int samplesread,int e_o_s); -extern void theoraframes_flush (int e_o_s); -extern void theoraframes_close (); +extern void theoraframes_flush (theoraframes_info *info, int e_o_...