search for: numchannel

Displaying 12 results from an estimated 12 matches for "numchannel".

Did you mean: numchannels
2007 Mar 13
2
flac fails encoding 88.2
I do the following to init flac: encoder = FLAC__stream_encoder_new(); e = FLAC__stream_encoder_set_do_mid_side_stereo (encoder, numChannels == 2); e = FLAC__stream_encoder_set_loose_mid_side_stereo (encoder, numChannels == 2); e = FLAC__stream_encoder_set_channels (encoder, numChannels); e = FLAC__stream_encoder_set_bits_per_sample (encoder, jmin (24, bitsPerSample)); e = FLAC__stream_encoder_set_sample...
2006 Sep 06
2
Getting subframe type=verbatim on 16 bit files
...type=VERBATIM ....... Any idea why/ where I have goofed? Thanks, James Code snippet: =================================================== FlacEncoder flacCompressor; bool setValue = false; // set up regular parameters setValue = flacCompressor.set_channels (numChannels); setValue = flacCompressor.set_bits_per_sample (bitsPerSample); setValue = flacCompressor.set_sample_rate (sampleRate); setValue = flacCompressor.set_blocksize(4608); setValue = flacCompressor.set_qlp_coeff_precision (0); setValue = flacCompressor.set_min_residual_partition_or...
2006 Sep 07
2
Getting subframe type=verbatim on 16 bit files
...uint8_t *buffer8 = NULL; uint16_t *buffer16 = NULL; uint32_t *buffer32 = NULL; unsigned sample32; unsigned sample, channel; uint32_t bitsPerSample = this->get_bits_per_sample(); numFrames = inData.GetSize(); numChannels = this->get_channels(); // How big is our sample that we want to give to FLACC? // bitsPerSample is 8,16,24,32 // So 8 = no change for numFrames // 16 = half it // 24,32 = 1/4 the needs.. if (bitsPerSample == 16) numFrames = numFrames / 2; else...
2007 Mar 14
0
flac fails encoding 88.2
--- Roland Rabien <Roland.Rabien@mackie.com> wrote: > I do the following to init flac: > > encoder = FLAC__stream_encoder_new(); > > e = FLAC__stream_encoder_set_do_mid_side_stereo (encoder, > numChannels == 2); > e = FLAC__stream_encoder_set_loose_mid_side_stereo (encoder, > numChannels == 2); > e = FLAC__stream_encoder_set_channels (encoder, numChannels); > e = FLAC__stream_encoder_set_bits_per_sample (encoder, jmin > (24, > bitsPerSample)); >...
2019 Jul 15
0
How to enable OPUS inband FEC
...us_decode(ads->dec, NULL, 0, sampv, (int)(*sampc/ads->ch), 0); and set the flag packet_lost=true; When I receive the next packet, I'm trying to decode the packet with decode_fec = 1 and then the same packet with decode_fec = 0: In the code below, suggest to replace ‘ads->ch’ with ‘numChannels’ to make it more clear to what you refer to.) if(packet_lost ) { if(opus_packet_has_fec(buf, (opus_int32)len, sample_rate)) { fec_samples = opus_packet_get_samples_per_frame(buf, sample_rate); info("opus: there is fec packets=%d\n", fec_samples); n = opus_decode( ads->dec, bu...
2009 Apr 13
0
encoding -> decoding doesnt work
...ALITY, &tmp); tmp = 2; speex_encoder_ctl( enc_state, SPEEX_SET_COMPLEXITY, &tmp ); tmp = 1; speex_encoder_ctl( enc_state, SPEEX_SET_DTX, &tmp ); tmp = 1; speex_encoder_ctl( enc_state, SPEEX_SET_VAD, &tmp ); int numBytesEncoded = 0; int amountSamples = defaultfrequency * numchannels * 5; // frequency is 16000, channels = 1, 5 is for 5 seconds unsigned int total = 0; char *encoded = NULL; for( int j = 0; j < amountSamples/frame_size; j++ ) { // Encode the voice data speex_bits_reset(&bits); speex_encode_int(enc_state, (short*)((char*)p_raw1 + j*frame_size*...
2006 Sep 06
0
Getting subframe type=verbatim on 16 bit files
...> Thanks, > > James > > > Code snippet: > =================================================== > FlacEncoder flacCompressor; > bool setValue = false; > > // set up regular parameters > setValue = flacCompressor.set_channels (numChannels); > setValue = flacCompressor.set_bits_per_sample (bitsPerSample); > setValue = flacCompressor.set_sample_rate (sampleRate); > setValue = flacCompressor.set_blocksize(4608); > setValue = flacCompressor.set_qlp_coeff_precision (0); > setValue = flacCompressor.set_...
2009 Dec 12
1
Skipping of sample in ogg writing
...======================================================================== 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) { for (int j = 0; j < numSamples; ++j)...
2009 Dec 12
1
Skipping of sample in ogg writing
...======================================================================== 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) { for (int j = 0; j < numSamples; ++j)...
2015 Dec 04
1
A few questions about libvorbis from a newbie
I am deeply sorry about the corrupt message just being sent; there seems to have been a compatibility issue with my mailer and my browser. This is an identical copy of the previous message: Hello Martin, Vorbis encoders are lossy, which is in a sense equivalent to converting the sample size of the raw PCM stream into something that would result in the desired bitrate. The "sample size"
2015 Dec 04
1
A few questions about libvorbis from a newbie
...fically, does the pcm total only account for one channel? How are channels represented in the file? Also, Is ov_read generating different amounts of data based on the word parameter? I can't think of any other reason why my calculation for a reasonable uncompressed buffer size is ov_pcm_total * numChannels * (the word size I pass to ov_read). Thanks in advance, Blake
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...sis: %d %p %p\n", v_rv0, vb, op); if (v_rv0 == 0) { /* Block is valid for synthesis and synthesis is ready */ v_rv0 = 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...