search for: vorbis_synthesis_pcmout

Displaying 15 results from an estimated 15 matches for "vorbis_synthesis_pcmout".

2000 Apr 19
3
integer pcm decode patch
Hi! I've spent the last few nights digging into the Vorbis source and working to implement a vorbis_synthesis_pcmout_int() function that kicks out interleaved int16_t pcm data. I think its important to have this function available to make the job for people using the codec a little easier. This function abstracts out the conversion to int16_t and removes the extra overhead of moving the pcm data over the process...
2009 May 12
2
compile error of libtheora example
...player_example.c:(.text+0x142d): undefined reference to `vorbis_block_init' player_example.c:(.text+0x146e): undefined reference to `vorbis_info_clear' player_example.c:(.text+0x147a): undefined reference to `vorbis_comment_clear' player_example.c:(.text+0x14cf): undefined reference to `vorbis_synthesis_pcmout' player_example.c:(.text+0x157d): undefined reference to `rint' player_example.c:(.text+0x1646): undefined reference to `vorbis_synthesis_read' player_example.c:(.text+0x1700): undefined reference to `ogg_stream_packetout' player_example.c:(.text+0x171e): undefined reference to `vor...
2023 Aug 27
0
Looping issues in ogg vorbis in Godot 4 engine
...otengine/godot/pull/80452/files I think it also lists the most vital files in regards to decoding, seeking, mixing of ogg vorbis files (excluding the minimp3 folder). Some notes to orient yourself more quickly: * In audio_stream_ogg_vorbis.cpp, we delay the looping/seeking until all frames from `vorbis_synthesis_pcmout` are consumed using the last if-clause in `AudioStreamPlaybackOggVorbis::_mix_frames_vorbis`. Only then is `if (!have_packets_left && !have_samples_left)` true. * So the problem is most likely in `AudioStreamPlaybackOggVorbis::seek` (audio_stream_ogg_vorbis.cpp) Side note: The PR author...
2006 Aug 31
0
OpenAl and Vorbis
...audiobuf, int fragsize){ // single audio fragment audio buffering bool audiobufReady = false; int size=0; int audiobufFill = 0; while(!audiobufReady){ //1)try to decode some data while(!audiobufReady){ float **pcm; //if there's pending, decoded audio, grab it if((size=vorbis_synthesis_pcmout(&vorbisDspState,&pcm))>0){ int count=audiobufFill/2; int maxsamples=(fragsize-audiobufFill)/vorbisInfo.channels/2;// /2 int i; for(i=0; i<size && i<maxsamples; i++){ for(int j=0;j<vorbisInfo.channels;j++){ int val=(int) (pcm[j][i]*32767.f);...
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 following a short block, it is legal to overlap the long block back to a position before centerW, thus modifying data that the user may already have requested. Have I interpre...
2006 Jan 19
0
want to know, how much data will be extracted from every single packet
...ow when program starts, i must run through all pages, getting all packets, extracting all of them and getting result datasize using such code: .... if (vorbis_synthesis(&vorb_block,&m_packets[cur_packet_num]) == 0) vorbis_synthesis_blockin(&vorb_dsp_state,&vorb_block); int bout = vorbis_synthesis_pcmout(&vorb_dsp_state,NULL); packet_result_data_size[cur_packet_num] = bout * sizeof(int16) * vorb_info.channels; .... of coz it's very slow, but i can't help to solve that problem so far. what can u say, folks? i dont know why, but vorb_dsp_state.granulepos == -1. i can get granulepos o...
1999 Oct 11
2
XMMS plugin patch
...i.rate, od.vi.channels); 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;...
2006 Jan 19
0
re: want to know, how much data will be extracted from every single packet; solved but some issues
...ket X - 1 befor. I honestly tried do this, but in fact works properly only this code: for (uint32 i = m_packets_number - 6; i < m_packets_number; i++) { ?if (vorbis_synthesis(&vorb_block,&m_packets[i])==0) ? vorbis_synthesis_blockin(&vorb_dsp_state,&vorb_block); ?int bout = vorbis_synthesis_pcmout(&vorb_dsp_state,NULL); ?if (i == m_packets_number - 1) ?{ ? m_packets_real_lengths[i] ?= 2 * m_vorb_info.channels * bout; ? m_data_size += m_packets_real_lengths[i]; ?} ?vorbis_synthesis_read(&vorb_dsp_state,bout); } exactly m_packets_number - 6 and no more :) i 'm lost in conj...
2007 Feb 15
1
Using decoding vorebis from a Vorbis / Theora Video
I am trying to write a media player in c# which will be able to play .ogg video files which contain Theora video and Vorbis audio streams. Currently I am using LibOgg and LibTheora (via a SWIG generated wrapper). This currently is able to decode the video and output it to the screen. I would like to use LibVorbis to decode the audio stream. Looking at the documentation it looks like I have to use
2001 Apr 05
1
decoder_example -- event driven?
.../* **pcm is a multichannel float vector. In stereo, for example, pcm[0] is left, and pcm[1] is right. samples is the size of each channel. Convert the float values (-1.<=range<=1.) to whatever PCM format and write it out */ while((samples=vorbis_synthesis_pcmout(&vd,&pcm))>0) { int i,j; int clipflag=0; int bout=(samples<convsize?samples:convsize); fprintf (stderr, "\nhoebag, i made it the while loop"); /* convert floats to 16 bit signed ints (host order) and...
2002 Jan 22
2
Peak value
Hi, While testing ReplayGain (so it could be related to a bug), I noticed the following gain comments for a file: RG_PEAK=1.71580 RG_RADIO=-7.91 dB RG_AUDIOPHILE=-6.72 dB I've never seen such a large peak. Not that I've looked much, nor have I analyzed the file further. I just thought I should mention it. :) The file is the track Board Burner by Mixmaster Mike, available at:
2002 Jan 03
3
Suggestion for libvorbisfile: scaling
I've been experimenting with the ideas of Replay Gain[1] and find that ogg123 doesn't have a way of specifying the scaling applied to replayed samples (like -f in mpg123). Looking at libvorbisfile, I see no function exactly matching this possibly desirable behaviour. ov_read() scales by either 128 (byte output) or 32768 (word output), but there's nothing in between. ov_read_float()
1999 Oct 04
3
Detailed decoder pseudocode (was: Re: ETA?)
...data at this page position */ /* no reason to complain; already complained above */ }else{ /* we have a packet. Decode it */ char **pcm; int samples; vorbis_synthesis(&vb,&op); vorbis_synthesis_blockin(&vd,&vb); samples=vorbis_synthesis_pcmout(&vd,&pcm); if(samples>0){ /* **pcm is a multichannel float vector. In stereo, for example, pcm[0][...] is left, and pcm[1][...] is right. samples is the size of each channel. Convert the float values (-1.<=range<=1.) to...
2002 Aug 06
0
Getting a GUI to work with Vorbis code
...channel float vector. In stereo, for example, pcm[0] is left, and pcm[1] is right. samples is the size of each channel. Convert the float values (-1.<=range<=1.) to whatever PCM format and write it out */ while((samples=vorbis_synthesis_pcmout(&vd,&pcm))>0){ int j; int clipflag=0; int bout=(samples<convsize?samples:convsize); /* convert floats to 16 bit signed ints (host order) and interleave */ for(i=0;i<v...
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...v0 = vorbis_synthesis_blockin(vd, vb); if (v_rv0 == 0) { /* Synthesis was successful. Pull out the data */ int pcmSamples = 1; ogg_int32_t **pcm; int numChannels = 2; /* FIXME: Should really pull this from info */ int ii, jj; while(pcmSamples > 0) { pcmSamples = vorbis_synthesis_pcmout(vd, &pcm); /* Interleaver for output PCM */ for(ii=0; ii<pcmSamples; ++ii) { for(jj=0; jj<numChannels; ++jj) { ogg_int32_t *srcChannelArray = pcm[jj]; ogg_int32_t srcValue = srcChannelArray[ii]; short dstValue = CLIP_TO_15(srcValue>>9); long bytesWr...