mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
flacdec: shift in proper direction for audio sample conversion
This commit is contained in:
parent
9737bf26f0
commit
abc8c162ed
1 changed files with 3 additions and 3 deletions
|
@ -621,7 +621,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
|
||||||
if (width != depth) {
|
if (width != depth) {
|
||||||
for (i = 0; i < samples; i++) {
|
for (i = 0; i < samples; i++) {
|
||||||
for (j = 0; j < channels; j++) {
|
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 {
|
} else {
|
||||||
|
@ -639,7 +639,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
|
||||||
for (i = 0; i < samples; i++) {
|
for (i = 0; i < samples; i++) {
|
||||||
for (j = 0; j < channels; j++) {
|
for (j = 0; j < channels; j++) {
|
||||||
*outbuffer++ =
|
*outbuffer++ =
|
||||||
(gint16) (buffer[reorder_map[j]][i] >> (width - depth));
|
(gint16) (buffer[reorder_map[j]][i] << (width - depth));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -657,7 +657,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
|
||||||
for (i = 0; i < samples; i++) {
|
for (i = 0; i < samples; i++) {
|
||||||
for (j = 0; j < channels; j++) {
|
for (j = 0; j < channels; j++) {
|
||||||
*outbuffer++ =
|
*outbuffer++ =
|
||||||
(gint32) (buffer[reorder_map[j]][i] >> (width - depth));
|
(gint32) (buffer[reorder_map[j]][i] << (width - depth));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue