[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/libmedia AudioDecoderNellymoser.cpp
From: |
Markus Gothe |
Subject: |
[Gnash-commit] gnash/libmedia AudioDecoderNellymoser.cpp |
Date: |
Sat, 29 Mar 2008 02:07:07 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Markus Gothe <nihilus> 08/03/29 02:07:07
Modified files:
libmedia : AudioDecoderNellymoser.cpp
Log message:
Fixed type casting and a minor cleanup
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/AudioDecoderNellymoser.cpp?cvsroot=gnash&r1=1.12&r2=1.13
Patches:
Index: AudioDecoderNellymoser.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/AudioDecoderNellymoser.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- AudioDecoderNellymoser.cpp 22 Mar 2008 02:34:37 -0000 1.12
+++ AudioDecoderNellymoser.cpp 29 Mar 2008 02:07:07 -0000 1.13
@@ -484,20 +484,19 @@
static void get_sample_bits(float *buf, int *bits)
{
- int i, j;
+ int i = 0, j;
short sbuf[128];
int bitsum = 0, last_bitsum, small_bitsum, big_bitsum;
- short shift, shift_saved;
- int tmp;
+ short shift = -16, shift_saved;
+ int tmp = 0;
int big_off;
int off, diff;
- tmp = 0;
- for (i = 0; i < NELLY_FILL_LEN; i++) {
+ for (; i < NELLY_FILL_LEN; i++) {
if (buf[i] > tmp)
- tmp = buf[i];
+ tmp = static_cast<int>(buf[i]);
}
- shift = -16;
+
headroom(&tmp, &shift);
if (shift < 0)