FLAC__ASSERT(0 != decoder);
FLAC__ASSERT(0 != decoder->private_);
FLAC__ASSERT(0 != decoder->protected_);
- FLAC__ASSERT(type < (1u << FLAC__STREAM_METADATA_TYPE_LEN));
+ FLAC__ASSERT((unsigned)type < (1u << FLAC__STREAM_METADATA_TYPE_LEN));
/* double protection */
- if(type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN))
+ if((unsigned)type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN))
return false;
if(decoder->protected_->state != FLAC__STREAM_DECODER_UNINITIALIZED)
return false;
FLAC__ASSERT(0 != decoder);
FLAC__ASSERT(0 != decoder->private_);
FLAC__ASSERT(0 != decoder->protected_);
- FLAC__ASSERT(type < (1u << FLAC__STREAM_METADATA_TYPE_LEN));
+ FLAC__ASSERT((unsigned)type < (1u << FLAC__STREAM_METADATA_TYPE_LEN));
/* double protection */
- if(type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN))
+ if((unsigned)type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN))
return false;
if(decoder->protected_->state != FLAC__STREAM_DECODER_UNINITIALIZED)
return false;
d->FilterCoeff = F [shapingtype];
d->Mask = ((FLAC__uint64)-1) << (32 - bits);
d->Add = 0.5 * ((1L << (32 - bits)) - 1);
- d->Dither = 0.01*default_dither[index] / (((FLAC__int64)1) << bits);
+ d->Dither = 0.01f*default_dither[index] / (((FLAC__int64)1) << bits);
}
/*
if(shapingtype == 0) {
double tmp = random_equi_(d->Dither);
Sum2 = tmp - d->LastRandomNumber [k];
- d->LastRandomNumber [k] = tmp;
+ d->LastRandomNumber [k] = (int)tmp;
Sum2 = Sum += Sum2;
val = ROUND64(Sum2) & d->Mask;
}
else {
Sum2 = random_triangular_(d->Dither) - scalar16_(d->DitherHistory[k], d->FilterCoeff + i);
- Sum += d->DitherHistory [k] [(-1-i)&15] = Sum2;
+ Sum += d->DitherHistory [k] [(-1-i)&15] = (float)Sum2;
Sum2 = Sum + scalar16_(d->ErrorHistory [k], d->FilterCoeff + i);
val = ROUND64(Sum2) & d->Mask;
d->ErrorHistory [k] [(-1-i)&15] = (float)(Sum - val);
run_flac ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_bins.valgrind.log
else
flac $*
run_flac ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log
else
flac $*
run_test_cuesheet ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_cuesheet $* 4>>test_grabbag.valgrind.log
else
test_cuesheet $*
run_test_libFLACpp ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC++ $* 4>>test_libFLAC++.valgrind.log
else
test_libFLAC++ $*
run_test_libFLAC ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC $* 4>>test_libFLAC.valgrind.log
else
test_libFLAC $*
run_test_libOggFLACpp ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC++ $* 4>>test_libOggFLAC++.valgrind.log
else
test_libOggFLAC++ $*
run_test_libOggFLAC ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC $* 4>>test_libOggFLAC.valgrind.log
else
test_libOggFLAC $*
run_flac ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_metaflac.valgrind.log
else
flac $*
run_metaflac ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_metaflac.valgrind.log
else
metaflac $*
run_flac ()
{
- if [ "$FLAC__VALGRIND" = yes ] ; then
+ if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_streams.valgrind.log
else
flac $*