Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
abc8c162
Commit
abc8c162
authored
Feb 09, 2012
by
Mark Nauwelaerts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flacdec: shift in proper direction for audio sample conversion
parent
9737bf26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ext/flac/gstflacdec.c
ext/flac/gstflacdec.c
+3
-3
No files found.
ext/flac/gstflacdec.c
View file @
abc8c162
...
...
@@ -621,7 +621,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
if
(
width
!=
depth
)
{
for
(
i
=
0
;
i
<
samples
;
i
++
)
{
for
(
j
=
0
;
j
<
channels
;
j
++
)
{
*
outbuffer
++
=
(
gint8
)
(
buffer
[
reorder_map
[
j
]][
i
]
>>
(
width
-
depth
));
*
outbuffer
++
=
(
gint8
)
(
buffer
[
reorder_map
[
j
]][
i
]
<<
(
width
-
depth
));
}
}
}
else
{
...
...
@@ -639,7 +639,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
for
(
i
=
0
;
i
<
samples
;
i
++
)
{
for
(
j
=
0
;
j
<
channels
;
j
++
)
{
*
outbuffer
++
=
(
gint16
)
(
buffer
[
reorder_map
[
j
]][
i
]
>>
(
width
-
depth
));
(
gint16
)
(
buffer
[
reorder_map
[
j
]][
i
]
<<
(
width
-
depth
));
}
}
}
else
{
...
...
@@ -657,7 +657,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
for
(
i
=
0
;
i
<
samples
;
i
++
)
{
for
(
j
=
0
;
j
<
channels
;
j
++
)
{
*
outbuffer
++
=
(
gint32
)
(
buffer
[
reorder_map
[
j
]][
i
]
>>
(
width
-
depth
));
(
gint32
)
(
buffer
[
reorder_map
[
j
]][
i
]
<<
(
width
-
depth
));
}
}
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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