mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
default window to tukey(0.5) instead of hann
This commit is contained in:
@@ -523,7 +523,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *enco
|
|||||||
*
|
*
|
||||||
* Any function that is specified erroneously is silently dropped. Up
|
* Any function that is specified erroneously is silently dropped. Up
|
||||||
* to 32 functions are kept, the rest are dropped. If the specification
|
* to 32 functions are kept, the rest are dropped. If the specification
|
||||||
* is empty the encoder defaults to \c "hann".
|
* is empty the encoder defaults to \c "tukey(0.5)".
|
||||||
*
|
*
|
||||||
* When more than one function is specified, then for every subframe the
|
* When more than one function is specified, then for every subframe the
|
||||||
* encoder will try each of them separately and choose the window that
|
* encoder will try each of them separately and choose the window that
|
||||||
@@ -532,7 +532,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *enco
|
|||||||
* Note that each function specified causes the encoder to occupy a
|
* Note that each function specified causes the encoder to occupy a
|
||||||
* floating point array in which to store the window.
|
* floating point array in which to store the window.
|
||||||
*
|
*
|
||||||
* \default \c "hann"
|
* \default \c "tukey(0.5)"
|
||||||
* \param encoder An encoder instance to set.
|
* \param encoder An encoder instance to set.
|
||||||
* \param specification See above.
|
* \param specification See above.
|
||||||
* \assert
|
* \assert
|
||||||
|
|||||||
@@ -1168,7 +1168,8 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_apodization(FLAC__StreamEncoder *en
|
|||||||
}
|
}
|
||||||
if(encoder->protected_->num_apodizations == 0) {
|
if(encoder->protected_->num_apodizations == 0) {
|
||||||
encoder->protected_->num_apodizations = 1;
|
encoder->protected_->num_apodizations = 1;
|
||||||
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_HANN;
|
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_TUKEY;
|
||||||
|
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5;
|
||||||
}
|
}
|
||||||
#ifdef WINDOW_DEBUG_OUTPUT
|
#ifdef WINDOW_DEBUG_OUTPUT
|
||||||
{unsigned n;for(n=0;n<encoder->protected_->num_apodizations;n++)fprintf(stderr,"@@@@@@ parsed apodization[%zu]: %s\n",n,winstr[encoder->protected_->apodizations[n].type]);}
|
{unsigned n;for(n=0;n<encoder->protected_->num_apodizations;n++)fprintf(stderr,"@@@@@@ parsed apodization[%zu]: %s\n",n,winstr[encoder->protected_->apodizations[n].type]);}
|
||||||
@@ -1764,7 +1765,8 @@ void set_defaults_(FLAC__StreamEncoder *encoder)
|
|||||||
encoder->protected_->blocksize = 1152;
|
encoder->protected_->blocksize = 1152;
|
||||||
#ifndef FLAC__INTEGER_ONLY_LIBRARY
|
#ifndef FLAC__INTEGER_ONLY_LIBRARY
|
||||||
encoder->protected_->num_apodizations = 1;
|
encoder->protected_->num_apodizations = 1;
|
||||||
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_HANN;
|
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_TUKEY;
|
||||||
|
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5;
|
||||||
#endif
|
#endif
|
||||||
encoder->protected_->max_lpc_order = 0;
|
encoder->protected_->max_lpc_order = 0;
|
||||||
encoder->protected_->qlp_coeff_precision = 0;
|
encoder->protected_->qlp_coeff_precision = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user