search for: vorbis_analysis_buffer

Displaying 20 results from an estimated 20 matches for "vorbis_analysis_buffer".

2005 Nov 16
1
Crash in mdct_forward
...or example freeing some memory already freed). Hence the crash. Perhaps my entire vorbis configuration is broken before the vorbis_analysis_blockout call - this would explain the crash Here is some logging of the vorbis APIs that are being called before the crash happens:- 88.675 Called vorbis_analysis_buffer with int vals = 1024 88.675 Called vorbis_analysis_wrote with vals = 1024 88.675 about to call vorbis_analysis_blockout (returned 0) 88.700 Called vorbis_analysis_buffer with int vals = 1024 88.700 Called vorbis_analysis_wrote with vals = 1024 88.700 abo...
2005 Nov 16
1
Crash in mdct_forward
...or example freeing some memory already freed). Hence the crash. Perhaps my entire vorbis configuration is broken before the vorbis_analysis_blockout call - this would explain the crash Here is some logging of the vorbis APIs that are being called before the crash happens:- 88.675 Called vorbis_analysis_buffer with int vals = 1024 88.675 Called vorbis_analysis_wrote with vals = 1024 88.675 about to call vorbis_analysis_blockout (returned 0) 88.700 Called vorbis_analysis_buffer with int vals = 1024 88.700 Called vorbis_analysis_wrote with vals = 1024 88.700 abo...
2002 Mar 14
2
Ogg in MP4 file, Unexpected result from _vorbis_unpack_books
...) vorbis_encode_init c) vorbis_comment_init d) vorbis_comment_add_tag e) ogg_stream_init f) vorbis_analysis_headerout g) ogg_stream_packetin for the header, the header_comment and the header_code Then the encode part a) sample pcm and hand it to encode code b) get buffer space with vorbis_analysis_buffer c) convert 16 bit signed pcm to float and place in buffer d) tell data size submitted with vorbis_analysis_wrote then go back to a) In another thread I do a) submit ogg packet header(header and data) to MP4 save routine b) submit ogg packet header_comment (header and data) to MP4 save r...
2007 Sep 17
1
How To Encode Realtime
Hi, ??Forgive my poor English, I'm trying to implement a net phone using vorbis codec, which need realtime encode and decode the stream. The problem is, I use vorbis_analysis_buffer() and vorbis_analysis_wrote() push the PCM data in, then use vorbis_analysis_blockout(&vd, &vb) to output a block, it can't output all the data. It seems that some data which length is constant, must be in the vorbis_dsp_state, can not be output. When Decode, there's similar problem...
2009 Dec 12
1
Skipping of sample in ogg writing
...ething critical step. Here is the code for writing the ogg file. //============================================================================== bool write (const int** samplesToWrite, int numSamples) { if (numSamples > 0) { float** const vorbisBuffer = vorbis_analysis_buffer (&vd, numSamples); for (int i = numChannels; --i >= 0;) { float* const dst = vorbisBuffer[i]; const int* const src = samplesToWrite [i]; if (src != 0 && dst != 0) {...
2009 Dec 12
1
Skipping of sample in ogg writing
...ething critical step. Here is the code for writing the ogg file. //============================================================================== bool write (const int** samplesToWrite, int numSamples) { if (numSamples > 0) { float** const vorbisBuffer = vorbis_analysis_buffer (&vd, numSamples); for (int i = numChannels; --i >= 0;) { float* const dst = vorbisBuffer[i]; const int* const src = samplesToWrite [i]; if (src != 0 && dst != 0) {...
2006 Sep 11
4
encode, decode and encode again
...oded files into sound archive again. The behavior of encoder is the following: 1) it normally encodes first 10-20 files and after that the time of encoding for each file starts to grow The vorbis_analysis_blockout() function starts to return 0 (in normal mode it returns 1). The time of executing vorbis_analysis_buffer() function starts to grow (in normal mode this time is very small). It seems like the encoder processes vorbis_analysis_blockout() function only when the end-of-stream flag is set to 1 (at the end of the last file). 2) According to (1) the encoder hungs up when I'm trying to encode about 900...
2012 Jul 31
0
No subject
...generate valid JavaScript (hopefully working as intended also...). In JavaScript, once I obtain the left and right channel audio data (using W3C web audio api) I pass this data into the JavaScript encoder as command line arguments. This data is then read, each string converted to a float, and the vorbis_analysis_buffer is filled with this "parsed" data. Similarly, I pass the quality as an argument and run vorbis_encode_init_vbr accordingly. One last thing that I pass in is a "state" of a stream - either the beginning, middle, or end so I can handle these cases differently (for example, at the...
2017 Feb 06
2
libvorbis without encapulsation
L'octidi 18 pluviôse, an CCXXV, Miscellaneous a écrit : > > The RLP draft mentioned on the libvorbis docs page, are there sample > > implementations (in C) of this yet anywhere?  > Sorry that should say RTP, not RLP I am not sure I understand exactly what you are asking, but libavformat has a RTP packetizer that works for both Vorbis and Theora, implemented in rtpenc_xiph.c.
2006 Aug 09
0
encode, decode and encode again - bug
...oded files into sound archive again. The behavior of encoder is the following: 1) it normally encodes first 10-20 files and after that the time of encoding for each file starts to grow The vorbis_analysis_blockout() function starts to return 0 (in normal mode it returns 1). The time of executing vorbis_analysis_buffer() function starts to grow (in normal mode this time is very small). It seems like the encoder processes vorbis_analysis_blockout() function only when the end-of-stream flag is set to 1 (at the end of the last file). 2) According to (1) the encoder hungs up when I'm trying to encode about 900...
2001 Sep 02
0
Encoding process
...lysis_headerout() 10 dump header packets to stream -- ogg_stream_packetin() 11 while pages need to be flushed from stream: -- ogg_stream_flush() 12 flush stream to page -- above 13 write page to file -- fwrite() 14 if nothing written: 15 fatal error 16 forever: 17 get buffer from dsp -- vorbis_analysis_buffer() 18 get some data into buffer 19 if no data: 20 flush dsp -- vorbis_analysis_wrote(..., 0) 21 else: 22 tell dsp how much data in buffer -- vorbis_analysis_wrote() 23 while blocks from dsp to analyze: -- vorbis_analysis_blockout() 24 analyze block into packet -- vorbis_analysis(...
2013 Feb 13
2
Vorbis encoding using JavaScript
Hello, First of all, I am a complete newblet to anything dealing with audio (a lot of the vocabulary is still rather mysterious to me). I also don't often program in C so please don't throw too many stones if my workflow is less than ideal. :) I would like to port the vorbis encoder to JavaScript. Instead of porting everything by hand from ground up, which would take who-knows-how-long,
2003 Sep 11
1
Flushing audio
...o send the data very quickly, as soon as i capture it from the sound card. Currently i have the following (audio captured 16 bits, mono): void VorbisEncoder::encode(void *data, int r) { char *buf = (char *) data; int vals = r / 2; float **buffer = vorbis_analysis_buffer(&dsp_state, vals); for(int i=0;i<vals;i++){ buffer[0][i] = ((buf[i*2 + 1] << 8) | (0x00ff & (int) buf[i*2])) / 32768.f; } vorbis_analysis_wrote(&dsp_state, vals); while(vorbis_an...
2003 Nov 08
2
Encoding in Delphi - Help
...y)^, 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,@readbuffer[0],bytes div 4); vorbis_analysis_wrote(vd, bytes div 4); end; fix; while(vorbis_analysis_blockout(vd,vb)=1) do begin fix; vorbis_anal...
2004 Nov 16
0
metadata switches for ffmpeg2theora
...int bytes, int samples, int e_o_s){ int i,j, count = 0; float **vorbis_buffer; if (bytes <= 0 && samples <= 0){ /* end of audio stream */ if(e_o_s) - vorbis_analysis_wrote (&info.vd, 0); + vorbis_analysis_wrote (&info->vd, 0); } else{ - vorbis_buffer = vorbis_analysis_buffer (&info.vd, samples); + vorbis_buffer = vorbis_analysis_buffer (&info->vd, samples); /* uninterleave samples */ for (i = 0; i < samples; i++){ - for(j=0;j<info.channels;j++){ + for(j=0;j<info->channels;j++){ vorbis_buffer[j][i] = buffer[count++] / 32768.f;...
2002 Mar 27
1
What exactly is threadsafe
Hey I am playing with a LOT of threads right now, and I want to know if the threads all need their own little vorbis encoders running in them or what exactly is threadsafe in vorbis? So here are the functions that would be called from many threads of with buffer = vorbis_analysis_buffer( &m_vorbisDsp, 4*DATA_CHUNK_SIZE ); vorbis_analysis_wrote( &m_vorbisDsp, dataLength/dataSize ); while( vorbis_analysis_blockout( &m_vorbisDsp, &m_vorbisBlock ) == 1 ) { /* analysis, assume we want to use bitrate management */ vorbis_analysis( &m_vorbisBlock, NULL );...
2011 Mar 10
4
Wav to Ogg Vorbis conversion
Dear experts, I am trying to use an example 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)|
2002 Jun 24
1
packetno, granulepos, streaming and framing
...across a few issues I need to clear out regarding the numbering of ogg_packets and their granulepos value. Below are the result for two different scenarios. <p>In the first scenario, ogg_packets are generated using a) vorbis_analysis_headerout() b) while true vorbis_analysis_buffer() vorbis_analysis_wrote() c) while true vorbis_analysis_blockout() vorbis_analysis() vorbis_bitrate_addblock() vorbis_bitrate_flushpacket() This generates ogg_packets with packetno and granulepos values as des...
2007 May 01
1
contstant bittrate mode - block size - packet size
...ock_init(&vd,&vb); //encode loop total_samples_consumed = 0; num_reads=0; while(!feof(fp_infile)){ // num_mseconds = 0; long i; long bytes=fread(readbuffer,1,READ*4,fp_infile); /* stereo hardwired here */ /* expose the buffer to submit data */ float **buffer=vorbis_analysis_buffer(&vd,READ); /* 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...
2015 May 18
5
Writting 16-bit PCM data to Ogg.
Hi Developers, I have a 16-bit PCM data buffer, I want to write that to ogg file. Could you help me to understand how to write pcm data to the ogg? Thanks in advance. Arun balaji -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20150518/6c8c9a63/attachment.htm