Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
ecf57b75
Commit
ecf57b75
authored
Jan 14, 2003
by
Josh Coalson
Browse files
minor syntax
parent
a69b1a8f
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/libFLAC/stream_decoder.c
View file @
ecf57b75
...
...
@@ -390,9 +390,9 @@ FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecode
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
;
...
...
@@ -447,9 +447,9 @@ FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder
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
;
...
...
src/plugin_common/replaygain_synthesis.c
View file @
ecf57b75
...
...
@@ -218,7 +218,7 @@ void FLAC__plugin_common__init_dither_context(DitherContext *d, int bits, int sh
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
.
01
f
*
default_dither
[
index
]
/
(((
FLAC__int64
)
1
)
<<
bits
);
}
/*
...
...
@@ -236,13 +236,13 @@ static FLAC__INLINE FLAC__int64 dither_output_(DitherContext *d, FLAC__bool do_d
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
);
...
...
test/test_bins.sh
View file @
ecf57b75
...
...
@@ -32,7 +32,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 flac
$*
4>>test_bins.valgrind.log
else
flac
$*
...
...
test/test_flac.sh
View file @
ecf57b75
...
...
@@ -31,7 +31,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 flac
$*
4>>test_flac.valgrind.log
else
flac
$*
...
...
test/test_grabbag.sh
View file @
ecf57b75
...
...
@@ -31,7 +31,7 @@ test_cuesheet -h 1>/dev/null 2>/dev/null || die "ERROR can't find test_cuesheet
run_test_cuesheet
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 test_cuesheet
$*
4>>test_grabbag.valgrind.log
else
test_cuesheet
$*
...
...
test/test_libFLAC++.sh
View file @
ecf57b75
...
...
@@ -30,7 +30,7 @@ export PATH
run_test_libFLACpp
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 test_libFLAC++
$*
4>>test_libFLAC++.valgrind.log
else
test_libFLAC++
$*
...
...
test/test_libFLAC.sh
View file @
ecf57b75
...
...
@@ -30,7 +30,7 @@ export PATH
run_test_libFLAC
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 test_libFLAC
$*
4>>test_libFLAC.valgrind.log
else
test_libFLAC
$*
...
...
test/test_libOggFLAC++.sh
View file @
ecf57b75
...
...
@@ -30,7 +30,7 @@ export PATH
run_test_libOggFLACpp
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 test_libOggFLAC++
$*
4>>test_libOggFLAC++.valgrind.log
else
test_libOggFLAC++
$*
...
...
test/test_libOggFLAC.sh
View file @
ecf57b75
...
...
@@ -30,7 +30,7 @@ export PATH
run_test_libOggFLAC
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 test_libOggFLAC
$*
4>>test_libOggFLAC.valgrind.log
else
test_libOggFLAC
$*
...
...
test/test_metaflac.sh
View file @
ecf57b75
...
...
@@ -34,7 +34,7 @@ metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac execut
run_flac
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 flac
$*
4>>test_metaflac.valgrind.log
else
flac
$*
...
...
@@ -43,7 +43,7 @@ run_flac ()
run_metaflac
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 metaflac
$*
4>>test_metaflac.valgrind.log
else
metaflac
$*
...
...
test/test_streams.sh
View file @
ecf57b75
...
...
@@ -31,7 +31,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac
()
{
if
[
"
$FLAC__VALGRIND
"
=
yes
]
;
then
if
[
x
"
$FLAC__VALGRIND
"
=
x
yes
]
;
then
valgrind
--leak-check
=
yes
--show-reachable
=
yes
--num-callers
=
100
--logfile-fd
=
4 flac
$*
4>>test_streams.valgrind.log
else
flac
$*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment