aboutsummaryrefslogtreecommitdiffstats
path: root/audio/mixeng_template.h
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
committerDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
commit5d8f37ad78fc66901af50c762029a501561f3b23 (patch)
tree206790f8f21000850a98c4f9590a79e779106278 /audio/mixeng_template.h
parentcd059b15f2c7df69f4a087bd66900eb172e41d1c (diff)
downloadexternal_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.zip
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.gz
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.bz2
Merge upstream QEMU 10.0.50 into the Android source tree.
This change integrates many changes from the upstream QEMU sources. Its main purpose is to enable correct ARMv6 and ARMv7 support to the Android emulator. Due to the nature of the upstream code base, this unfortunately also required changes to many other parts of the source. Note that to ensure easier integrations in the future, some source files and directories that have heavy Android-specific customization have been renamed with an -android suffix. The original files are still there for easier integration tracking, but *never* compiled. For example: net.c net-android.c qemu-char.c qemu-char-android.c slirp/ slirp-android/ etc... Tested on linux-x86, darwin-x86 and windows host machines.
Diffstat (limited to 'audio/mixeng_template.h')
-rw-r--r--audio/mixeng_template.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/audio/mixeng_template.h b/audio/mixeng_template.h
index d726441..5617705 100644
--- a/audio/mixeng_template.h
+++ b/audio/mixeng_template.h
@@ -31,39 +31,39 @@
#define HALF (IN_MAX >> 1)
#endif
-#ifdef NOVOL
-#define VOL(a, b) a
-#else
+#ifdef CONFIG_MIXEMU
#ifdef FLOAT_MIXENG
#define VOL(a, b) ((a) * (b))
#else
#define VOL(a, b) ((a) * (b)) >> 32
#endif
+#else
+#define VOL(a, b) a
#endif
#define ET glue (ENDIAN_CONVERSION, glue (_, IN_T))
#ifdef FLOAT_MIXENG
-static real_t inline glue (conv_, ET) (IN_T v)
+static mixeng_real inline glue (conv_, ET) (IN_T v)
{
IN_T nv = ENDIAN_CONVERT (v);
#ifdef RECIPROCAL
#ifdef SIGNED
- return nv * (1.f / (real_t) (IN_MAX - IN_MIN));
+ return nv * (1.f / (mixeng_real) (IN_MAX - IN_MIN));
#else
- return (nv - HALF) * (1.f / (real_t) IN_MAX);
+ return (nv - HALF) * (1.f / (mixeng_real) IN_MAX);
#endif
#else /* !RECIPROCAL */
#ifdef SIGNED
- return nv / (real_t) (IN_MAX - IN_MIN);
+ return nv / (mixeng_real) (IN_MAX - IN_MIN);
#else
- return (nv - HALF) / (real_t) IN_MAX;
+ return (nv - HALF) / (mixeng_real) IN_MAX;
#endif
#endif
}
-static IN_T inline glue (clip_, ET) (real_t v)
+static IN_T inline glue (clip_, ET) (mixeng_real v)
{
if (v >= 0.5) {
return IN_MAX;
@@ -109,11 +109,11 @@ static inline IN_T glue (clip_, ET) (int64_t v)
#endif
static void glue (glue (conv_, ET), _to_stereo)
- (st_sample_t *dst, const void *src, int samples, volume_t *vol)
+ (struct st_sample *dst, const void *src, int samples, struct mixeng_volume *vol)
{
- st_sample_t *out = dst;
+ struct st_sample *out = dst;
IN_T *in = (IN_T *) src;
-#ifndef NOVOL
+#ifdef CONFIG_MIXEMU
if (vol->mute) {
mixeng_clear (dst, samples);
return;
@@ -129,11 +129,11 @@ static void glue (glue (conv_, ET), _to_stereo)
}
static void glue (glue (conv_, ET), _to_mono)
- (st_sample_t *dst, const void *src, int samples, volume_t *vol)
+ (struct st_sample *dst, const void *src, int samples, struct mixeng_volume *vol)
{
- st_sample_t *out = dst;
+ struct st_sample *out = dst;
IN_T *in = (IN_T *) src;
-#ifndef NOVOL
+#ifdef CONFIG_MIXEMU
if (vol->mute) {
mixeng_clear (dst, samples);
return;
@@ -150,9 +150,9 @@ static void glue (glue (conv_, ET), _to_mono)
}
static void glue (glue (clip_, ET), _from_stereo)
- (void *dst, const st_sample_t *src, int samples)
+ (void *dst, const struct st_sample *src, int samples)
{
- const st_sample_t *in = src;
+ const struct st_sample *in = src;
IN_T *out = (IN_T *) dst;
while (samples--) {
*out++ = glue (clip_, ET) (in->l);
@@ -162,9 +162,9 @@ static void glue (glue (clip_, ET), _from_stereo)
}
static void glue (glue (clip_, ET), _from_mono)
- (void *dst, const st_sample_t *src, int samples)
+ (void *dst, const struct st_sample *src, int samples)
{
- const st_sample_t *in = src;
+ const struct st_sample *in = src;
IN_T *out = (IN_T *) dst;
while (samples--) {
*out++ = glue (clip_, ET) (in->l + in->r);