search for: wide_samples

Displaying 6 results from an estimated 6 matches for "wide_samples".

2004 Sep 10
2
Using libFLAC++
samples in FLAC are always signed. they must be signed going into the encoder (flac converts unsigned samples to signed) and they come out of the decoder signed. Josh --- David Bishop <tech@bishop.dhs.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Followup to original question: how do I determine if a particular > flac file is > signed (and then, if
2004 Sep 10
0
Using libFLAC++
...vily cut down to deal with only 1 type of file (i.e., I'm not dealing with differing endianess right now). [this code is in my write callback] static FLAC__int8 s8buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)]; FLAC__int16 *s16buffer = (FLAC__int16 *)s8buffer; if( wide_samples > 0 ) { for(sample = wide_sample = 0; wide_sample < wide_samples; wide_sample++) { for(channel = 0; channel < channels; channel++, sample++) { s16buffer[sample] = (FLAC__int16)(buffer[channel][wide_sample]); } } } Sorry for the newbie-style questions, I...
2005 Jul 11
2
[BUG] --sector-align zero padding is not entirely zero
...ned 448 zero bytes at the end (112 samples). However, the FLAC version contained 224 zero bytes, followed by 224 non-zero bytes. I've tracked the bug to the calculation of the number of bytes to fill the input_ buffer with, which is calculated in line 778 of encode.c as follows: data_bytes = wide_samples * (bps >> 3); However, my understanding is that the input_buffer is always an array of 32-bit integers, and therefore the calculation should always be: data_bytes = wide_samples * 4; The expression (bps >> 3) is also used elsewhere in encode.c so you may wish to examine those instanc...
2004 Sep 10
1
plugin optimizations
...replaygain is much better) * FLAC__plugin_common__apply_gain * accept FLAC__int32 *input[] * noise shaping type moved into DitherContext (user will not be confused by louder noise if shaping is switched on during playback) * supports more channels * works correctly if wide_samples % 32 != 0 plugin_xmms/ * optimizations and updates following changes in plugin_common (winamp plugins need update too!) * preamp up to +24dB * fixed crash when replaygain (or dither) is enabled during playback * fixed 8bit input support (Does winamp accept signed or unsigned 8bit? I...
2005 Jul 20
0
[BUG] --sector-align zero padding is not entirely zero
...ver, > the FLAC version contained 224 zero bytes, followed by 224 non-zero > bytes. > > I've tracked the bug to the calculation of the number of bytes to > fill > the input_ buffer with, which is calculated in line 778 of encode.c > as > follows: > > data_bytes = wide_samples * (bps >> 3); > > However, my understanding is that the input_buffer is always an array > of > 32-bit integers, and therefore the calculation should always be: > > data_bytes = wide_samples * 4; > > The expression (bps >> 3) is also used elsewhere in encode.c...
2004 Sep 10
0
http streaming in the xmms plugin
...} } ! FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data) { file_info_struct *file_info = (file_info_struct *)client_data; const unsigned channels = file_info->channels, wide_samples = frame->header.blocksize; --- 535,720 ---- return 0; /* to silence the compiler warning about not returning a value */ } ! ! /*********** File decoder functions */ ! ! static FLAC__bool file_decoder_init (void *decoder) { ! return FLAC__file_decoder_init( (FLAC__FileDecoder*) decod...