Commit 1d7cfea7 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Merged with Kees Bakker's repo at https://bitbucket.org/keestux/sdl ...

parents eecf78dc b5692bd2
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
# project structure. # project structure.
# Project target. # Project target.
target=android-4 target=android-5
package org.libsdl.app; package org.libsdl.app;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.opengles.GL10;
import javax.microedition.khronos.egl.*; import javax.microedition.khronos.egl.*;
...@@ -93,7 +95,8 @@ public class SDLActivity extends Activity { ...@@ -93,7 +95,8 @@ public class SDLActivity extends Activity {
public static native void onNativeResize(int x, int y, int format); public static native void onNativeResize(int x, int y, int format);
public static native void onNativeKeyDown(int keycode); public static native void onNativeKeyDown(int keycode);
public static native void onNativeKeyUp(int keycode); public static native void onNativeKeyUp(int keycode);
public static native void onNativeTouch(int action, float x, public static native void onNativeTouch(int touchDevId, int pointerFingerId,
int action, float x,
float y, float p); float y, float p);
public static native void onNativeAccel(float x, float y, float z); public static native void onNativeAccel(float x, float y, float z);
public static native void nativeRunAudioThread(); public static native void nativeRunAudioThread();
...@@ -387,7 +390,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, ...@@ -387,7 +390,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
} }
EGLConfig config = configs[0]; EGLConfig config = configs[0];
EGLContext ctx = egl.eglCreateContext(dpy, config, EGL10.EGL_NO_CONTEXT, null); int EGL_CONTEXT_CLIENT_VERSION=0x3098;
int contextAttrs[] = new int[]
{
EGL_CONTEXT_CLIENT_VERSION, majorVersion,
EGL10.EGL_NONE
};
EGLContext ctx = egl.eglCreateContext(dpy, config, EGL10.EGL_NO_CONTEXT, contextAttrs);
if (ctx == EGL10.EGL_NO_CONTEXT) { if (ctx == EGL10.EGL_NO_CONTEXT) {
Log.e("SDL", "Couldn't create context"); Log.e("SDL", "Couldn't create context");
return false; return false;
...@@ -423,7 +432,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, ...@@ -423,7 +432,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
try { try {
EGL10 egl = (EGL10)EGLContext.getEGL(); EGL10 egl = (EGL10)EGLContext.getEGL();
egl.eglWaitNative(EGL10.EGL_NATIVE_RENDERABLE, null); egl.eglWaitNative(EGL10.EGL_CORE_NATIVE_ENGINE, null);
// drawing here // drawing here
...@@ -459,16 +468,34 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, ...@@ -459,16 +468,34 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
// Touch events // Touch events
public boolean onTouch(View v, MotionEvent event) { public boolean onTouch(View v, MotionEvent event) {
{
int action = event.getAction(); final int touchDevId = event.getDeviceId();
float x = event.getX(); final int pointerCount = event.getPointerCount();
float y = event.getY(); // touchId, pointerId, action, x, y, pressure
float p = event.getPressure(); int actionPointerIndex = event.getActionIndex();
int pointerFingerId = event.getPointerId(actionPointerIndex);
// TODO: Anything else we need to pass? int action = event.getActionMasked();
SDLActivity.onNativeTouch(action, x, y, p);
return true; float x = event.getX(actionPointerIndex);
} float y = event.getY(actionPointerIndex);
float p = event.getPressure(actionPointerIndex);
if (action == MotionEvent.ACTION_MOVE && pointerCount > 1) {
// TODO send motion to every pointer if its position has
// changed since prev event.
for (int i = 0; i < pointerCount; i++) {
pointerFingerId = event.getPointerId(i);
x = event.getX(i);
y = event.getY(i);
p = event.getPressure(i);
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
}
} else {
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
}
}
return true;
}
// Sensor events // Sensor events
public void enableSensor(int sensortype, boolean enabled) { public void enableSensor(int sensortype, boolean enabled) {
......
...@@ -939,6 +939,41 @@ CheckVisibilityHidden() ...@@ -939,6 +939,41 @@ CheckVisibilityHidden()
fi fi
} }
dnl See if GCC's -Wall is supported.
CheckWarnAll()
{
AC_MSG_CHECKING(for GCC -Wall option)
have_gcc_Wall=no
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS -Wall"
AC_TRY_COMPILE([
int x = 0;
],[
],[
have_gcc_Wall=yes
])
AC_MSG_RESULT($have_gcc_Wall)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_Wall = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
dnl Haiku headers use multicharacter constants all over the place. Ignore these warnings when using -Wall.
AC_MSG_CHECKING(for necessary GCC -Wno-multichar option)
need_gcc_Wno_multichar=no
case "$host" in
*-*-beos* | *-*-haiku*)
need_gcc_Wno_multichar=yes
;;
esac
AC_MSG_RESULT($need_gcc_Wno_multichar)
if test x$need_gcc_Wno_multichar = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-multichar"
fi
fi
}
dnl Find the X11 include and library directories dnl Find the X11 include and library directories
CheckX11() CheckX11()
...@@ -2356,6 +2391,9 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau ...@@ -2356,6 +2391,9 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
;; ;;
esac esac
dnl Do this on all platforms, after everything else.
CheckWarnAll
# Verify that we have all the platform specific files we need # Verify that we have all the platform specific files we need
if test x$have_joystick != xyes; then if test x$have_joystick != xyes; then
......
...@@ -140,6 +140,9 @@ ...@@ -140,6 +140,9 @@
/* enable iPhone keyboard support */ /* enable iPhone keyboard support */
#define SDL_IPHONE_KEYBOARD 1 #define SDL_IPHONE_KEYBOARD 1
/* enable joystick subsystem */
#define SDL_JOYSTICK_DISABLED 0
/* Set max recognized G-force from accelerometer /* Set max recognized G-force from accelerometer
See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
*/ */
......
...@@ -89,7 +89,6 @@ typedef struct SDL_RWops ...@@ -89,7 +89,6 @@ typedef struct SDL_RWops
void *fileNameRef; void *fileNameRef;
void *inputStream; void *inputStream;
void *inputStreamRef; void *inputStreamRef;
void *skipMethod;
void *readableByteChannel; void *readableByteChannel;
void *readableByteChannelRef; void *readableByteChannelRef;
void *readMethod; void *readMethod;
......
...@@ -60,7 +60,8 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) ...@@ -60,7 +60,8 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
#elif defined(__GNUC__) && defined(__arm__) && \ #elif defined(__GNUC__) && defined(__arm__) && \
(defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \ (defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \
defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__)) defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__) || \
defined(__ARM_ARCH_5TEJ__))
int result; int result;
__asm__ __volatile__ ( __asm__ __volatile__ (
"swp %0, %1, [%2]\n" "swp %0, %1, [%2]\n"
...@@ -81,7 +82,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) ...@@ -81,7 +82,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
: "=r" (result) : "r" (lock), "0" (1) : "cc", "memory"); : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory");
return (result == 0); return (result == 0);
#elif defined(__MACOSX__) #elif defined(__MACOSX__) || defined(__IPHONEOS__)
/* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */ /* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */
return OSAtomicCompareAndSwap32Barrier(0, 1, lock); return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
......
...@@ -7102,7 +7102,6 @@ SDL_Upsample_U8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7102,7 +7102,6 @@ SDL_Upsample_U8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U8, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 1; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 1;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 1; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -7130,7 +7129,6 @@ SDL_Downsample_U8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7130,7 +7129,6 @@ SDL_Downsample_U8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U8, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7157,7 +7155,6 @@ SDL_Upsample_U8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7157,7 +7155,6 @@ SDL_Upsample_U8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U8, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 1; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 1;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 1; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -7187,7 +7184,6 @@ SDL_Downsample_U8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7187,7 +7184,6 @@ SDL_Downsample_U8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U8, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7214,7 +7210,6 @@ SDL_Upsample_U8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7214,7 +7210,6 @@ SDL_Upsample_U8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U8, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 2; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 2;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 2; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -7247,7 +7242,6 @@ SDL_Downsample_U8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7247,7 +7242,6 @@ SDL_Downsample_U8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U8, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7278,7 +7272,6 @@ SDL_Upsample_U8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7278,7 +7272,6 @@ SDL_Upsample_U8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U8, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 2; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 2;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 2; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -7315,7 +7308,6 @@ SDL_Downsample_U8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7315,7 +7308,6 @@ SDL_Downsample_U8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U8, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7346,7 +7338,6 @@ SDL_Upsample_U8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7346,7 +7338,6 @@ SDL_Upsample_U8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U8, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 4; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 4;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 4; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -7389,7 +7380,6 @@ SDL_Downsample_U8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7389,7 +7380,6 @@ SDL_Downsample_U8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U8, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7428,7 +7418,6 @@ SDL_Upsample_U8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7428,7 +7418,6 @@ SDL_Upsample_U8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U8, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 4; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 4;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 4; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -7479,7 +7468,6 @@ SDL_Downsample_U8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7479,7 +7468,6 @@ SDL_Downsample_U8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U8, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7518,7 +7506,6 @@ SDL_Upsample_U8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7518,7 +7506,6 @@ SDL_Upsample_U8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U8, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 6; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 6;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 6; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -7571,7 +7558,6 @@ SDL_Downsample_U8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7571,7 +7558,6 @@ SDL_Downsample_U8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U8, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7618,7 +7604,6 @@ SDL_Upsample_U8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7618,7 +7604,6 @@ SDL_Upsample_U8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U8, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 6; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 6;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 6; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -7683,7 +7668,6 @@ SDL_Downsample_U8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7683,7 +7668,6 @@ SDL_Downsample_U8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U8, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7730,7 +7714,6 @@ SDL_Upsample_U8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7730,7 +7714,6 @@ SDL_Upsample_U8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U8, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 8; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 8;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 8; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -7793,7 +7776,6 @@ SDL_Downsample_U8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7793,7 +7776,6 @@ SDL_Downsample_U8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U8, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7848,7 +7830,6 @@ SDL_Upsample_U8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7848,7 +7830,6 @@ SDL_Upsample_U8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U8, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 8; Uint8 *dst = ((Uint8 *) (cvt->buf + dstsize)) - 8;
const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 8; const Uint8 *src = ((Uint8 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -7927,7 +7908,6 @@ SDL_Downsample_U8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7927,7 +7908,6 @@ SDL_Downsample_U8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U8, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint8 *dst = (Uint8 *) cvt->buf; Uint8 *dst = (Uint8 *) cvt->buf;
const Uint8 *src = (Uint8 *) cvt->buf; const Uint8 *src = (Uint8 *) cvt->buf;
...@@ -7982,7 +7962,6 @@ SDL_Upsample_S8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -7982,7 +7962,6 @@ SDL_Upsample_S8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S8, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 1; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 1;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -8010,7 +7989,6 @@ SDL_Downsample_S8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8010,7 +7989,6 @@ SDL_Downsample_S8_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S8, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8037,7 +8015,6 @@ SDL_Upsample_S8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8037,7 +8015,6 @@ SDL_Upsample_S8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S8, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 1; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 1;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -8067,7 +8044,6 @@ SDL_Downsample_S8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8067,7 +8044,6 @@ SDL_Downsample_S8_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S8, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S8, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8094,7 +8070,6 @@ SDL_Upsample_S8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8094,7 +8070,6 @@ SDL_Upsample_S8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S8, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 2; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 2;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -8127,7 +8102,6 @@ SDL_Downsample_S8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8127,7 +8102,6 @@ SDL_Downsample_S8_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S8, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8158,7 +8132,6 @@ SDL_Upsample_S8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8158,7 +8132,6 @@ SDL_Upsample_S8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S8, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 2; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 2;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -8195,7 +8168,6 @@ SDL_Downsample_S8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8195,7 +8168,6 @@ SDL_Downsample_S8_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S8, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S8, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8226,7 +8198,6 @@ SDL_Upsample_S8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8226,7 +8198,6 @@ SDL_Upsample_S8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S8, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 4; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 4;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -8269,7 +8240,6 @@ SDL_Downsample_S8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8269,7 +8240,6 @@ SDL_Downsample_S8_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S8, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8308,7 +8278,6 @@ SDL_Upsample_S8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8308,7 +8278,6 @@ SDL_Upsample_S8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S8, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 4; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 4;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -8359,7 +8328,6 @@ SDL_Downsample_S8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8359,7 +8328,6 @@ SDL_Downsample_S8_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S8, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S8, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8398,7 +8366,6 @@ SDL_Upsample_S8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8398,7 +8366,6 @@ SDL_Upsample_S8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S8, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 6; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 6;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -8451,7 +8418,6 @@ SDL_Downsample_S8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8451,7 +8418,6 @@ SDL_Downsample_S8_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S8, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8498,7 +8464,6 @@ SDL_Upsample_S8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8498,7 +8464,6 @@ SDL_Upsample_S8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S8, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 6; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 6;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -8563,7 +8528,6 @@ SDL_Downsample_S8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8563,7 +8528,6 @@ SDL_Downsample_S8_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S8, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S8, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8610,7 +8574,6 @@ SDL_Upsample_S8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8610,7 +8574,6 @@ SDL_Upsample_S8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S8, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 8; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 8;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -8673,7 +8636,6 @@ SDL_Downsample_S8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8673,7 +8636,6 @@ SDL_Downsample_S8_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S8, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8728,7 +8690,6 @@ SDL_Upsample_S8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8728,7 +8690,6 @@ SDL_Upsample_S8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S8, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 8; Sint8 *dst = ((Sint8 *) (cvt->buf + dstsize)) - 8;
const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint8 *src = ((Sint8 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -8807,7 +8768,6 @@ SDL_Downsample_S8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8807,7 +8768,6 @@ SDL_Downsample_S8_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S8, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S8, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint8 *dst = (Sint8 *) cvt->buf; Sint8 *dst = (Sint8 *) cvt->buf;
const Sint8 *src = (Sint8 *) cvt->buf; const Sint8 *src = (Sint8 *) cvt->buf;
...@@ -8862,7 +8822,6 @@ SDL_Upsample_U16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8862,7 +8822,6 @@ SDL_Upsample_U16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -8890,7 +8849,6 @@ SDL_Downsample_U16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8890,7 +8849,6 @@ SDL_Downsample_U16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -8917,7 +8875,6 @@ SDL_Upsample_U16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8917,7 +8875,6 @@ SDL_Upsample_U16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -8947,7 +8904,6 @@ SDL_Downsample_U16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8947,7 +8904,6 @@ SDL_Downsample_U16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -8974,7 +8930,6 @@ SDL_Upsample_U16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -8974,7 +8930,6 @@ SDL_Upsample_U16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -9007,7 +8962,6 @@ SDL_Downsample_U16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9007,7 +8962,6 @@ SDL_Downsample_U16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9038,7 +8992,6 @@ SDL_Upsample_U16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9038,7 +8992,6 @@ SDL_Upsample_U16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -9075,7 +9028,6 @@ SDL_Downsample_U16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9075,7 +9028,6 @@ SDL_Downsample_U16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9106,7 +9058,6 @@ SDL_Upsample_U16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9106,7 +9058,6 @@ SDL_Upsample_U16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -9149,7 +9100,6 @@ SDL_Downsample_U16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9149,7 +9100,6 @@ SDL_Downsample_U16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9188,7 +9138,6 @@ SDL_Upsample_U16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9188,7 +9138,6 @@ SDL_Upsample_U16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -9239,7 +9188,6 @@ SDL_Downsample_U16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9239,7 +9188,6 @@ SDL_Downsample_U16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9278,7 +9226,6 @@ SDL_Upsample_U16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9278,7 +9226,6 @@ SDL_Upsample_U16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -9331,7 +9278,6 @@ SDL_Downsample_U16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9331,7 +9278,6 @@ SDL_Downsample_U16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9378,7 +9324,6 @@ SDL_Upsample_U16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9378,7 +9324,6 @@ SDL_Upsample_U16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -9443,7 +9388,6 @@ SDL_Downsample_U16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9443,7 +9388,6 @@ SDL_Downsample_U16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9490,7 +9434,6 @@ SDL_Upsample_U16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9490,7 +9434,6 @@ SDL_Upsample_U16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -9553,7 +9496,6 @@ SDL_Downsample_U16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9553,7 +9496,6 @@ SDL_Downsample_U16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9608,7 +9550,6 @@ SDL_Upsample_U16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9608,7 +9550,6 @@ SDL_Upsample_U16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -9687,7 +9628,6 @@ SDL_Downsample_U16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9687,7 +9628,6 @@ SDL_Downsample_U16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -9742,7 +9682,6 @@ SDL_Upsample_S16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9742,7 +9682,6 @@ SDL_Upsample_S16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -9770,7 +9709,6 @@ SDL_Downsample_S16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9770,7 +9709,6 @@ SDL_Downsample_S16LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -9797,7 +9735,6 @@ SDL_Upsample_S16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9797,7 +9735,6 @@ SDL_Upsample_S16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -9827,7 +9764,6 @@ SDL_Downsample_S16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9827,7 +9764,6 @@ SDL_Downsample_S16LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -9854,7 +9790,6 @@ SDL_Upsample_S16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9854,7 +9790,6 @@ SDL_Upsample_S16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -9887,7 +9822,6 @@ SDL_Downsample_S16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9887,7 +9822,6 @@ SDL_Downsample_S16LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -9918,7 +9852,6 @@ SDL_Upsample_S16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9918,7 +9852,6 @@ SDL_Upsample_S16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -9955,7 +9888,6 @@ SDL_Downsample_S16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9955,7 +9888,6 @@ SDL_Downsample_S16LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -9986,7 +9918,6 @@ SDL_Upsample_S16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -9986,7 +9918,6 @@ SDL_Upsample_S16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -10029,7 +9960,6 @@ SDL_Downsample_S16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10029,7 +9960,6 @@ SDL_Downsample_S16LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -10068,7 +9998,6 @@ SDL_Upsample_S16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10068,7 +9998,6 @@ SDL_Upsample_S16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -10119,7 +10048,6 @@ SDL_Downsample_S16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10119,7 +10048,6 @@ SDL_Downsample_S16LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -10158,7 +10086,6 @@ SDL_Upsample_S16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10158,7 +10086,6 @@ SDL_Upsample_S16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -10211,7 +10138,6 @@ SDL_Downsample_S16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10211,7 +10138,6 @@ SDL_Downsample_S16LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -10258,7 +10184,6 @@ SDL_Upsample_S16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10258,7 +10184,6 @@ SDL_Upsample_S16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -10323,7 +10248,6 @@ SDL_Downsample_S16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10323,7 +10248,6 @@ SDL_Downsample_S16LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -10370,7 +10294,6 @@ SDL_Upsample_S16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10370,7 +10294,6 @@ SDL_Upsample_S16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -10433,7 +10356,6 @@ SDL_Downsample_S16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10433,7 +10356,6 @@ SDL_Downsample_S16LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -10488,7 +10410,6 @@ SDL_Upsample_S16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10488,7 +10410,6 @@ SDL_Upsample_S16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -10567,7 +10488,6 @@ SDL_Downsample_S16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10567,7 +10488,6 @@ SDL_Downsample_S16LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -10622,7 +10542,6 @@ SDL_Upsample_U16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10622,7 +10542,6 @@ SDL_Upsample_U16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -10650,7 +10569,6 @@ SDL_Downsample_U16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10650,7 +10569,6 @@ SDL_Downsample_U16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -10677,7 +10595,6 @@ SDL_Upsample_U16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10677,7 +10595,6 @@ SDL_Upsample_U16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 1;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -10707,7 +10624,6 @@ SDL_Downsample_U16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10707,7 +10624,6 @@ SDL_Downsample_U16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -10734,7 +10650,6 @@ SDL_Upsample_U16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10734,7 +10650,6 @@ SDL_Upsample_U16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -10767,7 +10682,6 @@ SDL_Downsample_U16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10767,7 +10682,6 @@ SDL_Downsample_U16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -10798,7 +10712,6 @@ SDL_Upsample_U16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10798,7 +10712,6 @@ SDL_Upsample_U16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 2;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -10835,7 +10748,6 @@ SDL_Downsample_U16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10835,7 +10748,6 @@ SDL_Downsample_U16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -10866,7 +10778,6 @@ SDL_Upsample_U16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10866,7 +10778,6 @@ SDL_Upsample_U16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -10909,7 +10820,6 @@ SDL_Downsample_U16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10909,7 +10820,6 @@ SDL_Downsample_U16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -10948,7 +10858,6 @@ SDL_Upsample_U16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10948,7 +10858,6 @@ SDL_Upsample_U16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 4;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -10999,7 +10908,6 @@ SDL_Downsample_U16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -10999,7 +10908,6 @@ SDL_Downsample_U16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -11038,7 +10946,6 @@ SDL_Upsample_U16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11038,7 +10946,6 @@ SDL_Upsample_U16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -11091,7 +10998,6 @@ SDL_Downsample_U16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11091,7 +10998,6 @@ SDL_Downsample_U16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -11138,7 +11044,6 @@ SDL_Upsample_U16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11138,7 +11044,6 @@ SDL_Upsample_U16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 6;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -11203,7 +11108,6 @@ SDL_Downsample_U16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11203,7 +11108,6 @@ SDL_Downsample_U16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -11250,7 +11154,6 @@ SDL_Upsample_U16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11250,7 +11154,6 @@ SDL_Upsample_U16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_U16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -11313,7 +11216,6 @@ SDL_Downsample_U16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11313,7 +11216,6 @@ SDL_Downsample_U16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_U16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -11368,7 +11270,6 @@ SDL_Upsample_U16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11368,7 +11270,6 @@ SDL_Upsample_U16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_U16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8; Uint16 *dst = ((Uint16 *) (cvt->buf + dstsize)) - 8;
const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Uint16 *src = ((Uint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -11447,7 +11348,6 @@ SDL_Downsample_U16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11447,7 +11348,6 @@ SDL_Downsample_U16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_U16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Uint16 *dst = (Uint16 *) cvt->buf; Uint16 *dst = (Uint16 *) cvt->buf;
const Uint16 *src = (Uint16 *) cvt->buf; const Uint16 *src = (Uint16 *) cvt->buf;
...@@ -11502,7 +11402,6 @@ SDL_Upsample_S16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11502,7 +11402,6 @@ SDL_Upsample_S16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -11530,7 +11429,6 @@ SDL_Downsample_S16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11530,7 +11429,6 @@ SDL_Downsample_S16MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -11557,7 +11455,6 @@ SDL_Upsample_S16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11557,7 +11455,6 @@ SDL_Upsample_S16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 1;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -11587,7 +11484,6 @@ SDL_Downsample_S16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11587,7 +11484,6 @@ SDL_Downsample_S16MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -11614,7 +11510,6 @@ SDL_Upsample_S16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11614,7 +11510,6 @@ SDL_Upsample_S16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -11647,7 +11542,6 @@ SDL_Downsample_S16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11647,7 +11542,6 @@ SDL_Downsample_S16MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -11678,7 +11572,6 @@ SDL_Upsample_S16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11678,7 +11572,6 @@ SDL_Upsample_S16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -11715,7 +11608,6 @@ SDL_Downsample_S16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11715,7 +11608,6 @@ SDL_Downsample_S16MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -11746,7 +11638,6 @@ SDL_Upsample_S16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11746,7 +11638,6 @@ SDL_Upsample_S16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -11789,7 +11680,6 @@ SDL_Downsample_S16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11789,7 +11680,6 @@ SDL_Downsample_S16MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -11828,7 +11718,6 @@ SDL_Upsample_S16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11828,7 +11718,6 @@ SDL_Upsample_S16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -11879,7 +11768,6 @@ SDL_Downsample_S16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11879,7 +11768,6 @@ SDL_Downsample_S16MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -11918,7 +11806,6 @@ SDL_Upsample_S16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11918,7 +11806,6 @@ SDL_Upsample_S16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -11971,7 +11858,6 @@ SDL_Downsample_S16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -11971,7 +11858,6 @@ SDL_Downsample_S16MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -12018,7 +11904,6 @@ SDL_Upsample_S16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12018,7 +11904,6 @@ SDL_Upsample_S16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 6;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -12083,7 +11968,6 @@ SDL_Downsample_S16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12083,7 +11968,6 @@ SDL_Downsample_S16MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -12130,7 +12014,6 @@ SDL_Upsample_S16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12130,7 +12014,6 @@ SDL_Upsample_S16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -12193,7 +12076,6 @@ SDL_Downsample_S16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12193,7 +12076,6 @@ SDL_Downsample_S16MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -12248,7 +12130,6 @@ SDL_Upsample_S16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12248,7 +12130,6 @@ SDL_Upsample_S16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8; Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 8;
const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint16 *src = ((Sint16 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -12327,7 +12208,6 @@ SDL_Downsample_S16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12327,7 +12208,6 @@ SDL_Downsample_S16MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S16MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint16 *dst = (Sint16 *) cvt->buf; Sint16 *dst = (Sint16 *) cvt->buf;
const Sint16 *src = (Sint16 *) cvt->buf; const Sint16 *src = (Sint16 *) cvt->buf;
...@@ -12382,7 +12262,6 @@ SDL_Upsample_S32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12382,7 +12262,6 @@ SDL_Upsample_S32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -12410,7 +12289,6 @@ SDL_Downsample_S32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12410,7 +12289,6 @@ SDL_Downsample_S32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12437,7 +12315,6 @@ SDL_Upsample_S32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12437,7 +12315,6 @@ SDL_Upsample_S32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -12467,7 +12344,6 @@ SDL_Downsample_S32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12467,7 +12344,6 @@ SDL_Downsample_S32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12494,7 +12370,6 @@ SDL_Upsample_S32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12494,7 +12370,6 @@ SDL_Upsample_S32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -12527,7 +12402,6 @@ SDL_Downsample_S32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12527,7 +12402,6 @@ SDL_Downsample_S32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12558,7 +12432,6 @@ SDL_Upsample_S32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12558,7 +12432,6 @@ SDL_Upsample_S32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -12595,7 +12468,6 @@ SDL_Downsample_S32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12595,7 +12468,6 @@ SDL_Downsample_S32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12626,7 +12498,6 @@ SDL_Upsample_S32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12626,7 +12498,6 @@ SDL_Upsample_S32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -12669,7 +12540,6 @@ SDL_Downsample_S32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12669,7 +12540,6 @@ SDL_Downsample_S32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12708,7 +12578,6 @@ SDL_Upsample_S32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12708,7 +12578,6 @@ SDL_Upsample_S32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -12759,7 +12628,6 @@ SDL_Downsample_S32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12759,7 +12628,6 @@ SDL_Downsample_S32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12798,7 +12666,6 @@ SDL_Upsample_S32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12798,7 +12666,6 @@ SDL_Upsample_S32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -12851,7 +12718,6 @@ SDL_Downsample_S32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12851,7 +12718,6 @@ SDL_Downsample_S32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -12898,7 +12764,6 @@ SDL_Upsample_S32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12898,7 +12764,6 @@ SDL_Upsample_S32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -12963,7 +12828,6 @@ SDL_Downsample_S32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -12963,7 +12828,6 @@ SDL_Downsample_S32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13010,7 +12874,6 @@ SDL_Upsample_S32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13010,7 +12874,6 @@ SDL_Upsample_S32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -13073,7 +12936,6 @@ SDL_Downsample_S32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13073,7 +12936,6 @@ SDL_Downsample_S32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13128,7 +12990,6 @@ SDL_Upsample_S32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13128,7 +12990,6 @@ SDL_Upsample_S32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -13207,7 +13068,6 @@ SDL_Downsample_S32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13207,7 +13068,6 @@ SDL_Downsample_S32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13262,7 +13122,6 @@ SDL_Upsample_S32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13262,7 +13122,6 @@ SDL_Upsample_S32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -13290,7 +13149,6 @@ SDL_Downsample_S32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13290,7 +13149,6 @@ SDL_Downsample_S32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13317,7 +13175,6 @@ SDL_Upsample_S32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13317,7 +13175,6 @@ SDL_Upsample_S32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 1;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -13347,7 +13204,6 @@ SDL_Downsample_S32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13347,7 +13204,6 @@ SDL_Downsample_S32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13374,7 +13230,6 @@ SDL_Upsample_S32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13374,7 +13230,6 @@ SDL_Upsample_S32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -13407,7 +13262,6 @@ SDL_Downsample_S32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13407,7 +13262,6 @@ SDL_Downsample_S32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13438,7 +13292,6 @@ SDL_Upsample_S32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13438,7 +13292,6 @@ SDL_Upsample_S32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 2;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -13475,7 +13328,6 @@ SDL_Downsample_S32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13475,7 +13328,6 @@ SDL_Downsample_S32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13506,7 +13358,6 @@ SDL_Upsample_S32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13506,7 +13358,6 @@ SDL_Upsample_S32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -13549,7 +13400,6 @@ SDL_Downsample_S32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13549,7 +13400,6 @@ SDL_Downsample_S32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13588,7 +13438,6 @@ SDL_Upsample_S32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13588,7 +13438,6 @@ SDL_Upsample_S32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 4;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -13639,7 +13488,6 @@ SDL_Downsample_S32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13639,7 +13488,6 @@ SDL_Downsample_S32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13678,7 +13526,6 @@ SDL_Upsample_S32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13678,7 +13526,6 @@ SDL_Upsample_S32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -13731,7 +13578,6 @@ SDL_Downsample_S32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13731,7 +13578,6 @@ SDL_Downsample_S32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13778,7 +13624,6 @@ SDL_Upsample_S32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13778,7 +13624,6 @@ SDL_Upsample_S32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 6;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -13843,7 +13688,6 @@ SDL_Downsample_S32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13843,7 +13688,6 @@ SDL_Downsample_S32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -13890,7 +13734,6 @@ SDL_Upsample_S32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13890,7 +13734,6 @@ SDL_Upsample_S32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_S32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -13953,7 +13796,6 @@ SDL_Downsample_S32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -13953,7 +13796,6 @@ SDL_Downsample_S32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_S32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -14008,7 +13850,6 @@ SDL_Upsample_S32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14008,7 +13850,6 @@ SDL_Upsample_S32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_S32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8; Sint32 *dst = ((Sint32 *) (cvt->buf + dstsize)) - 8;
const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8; const Sint32 *src = ((Sint32 *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -14087,7 +13928,6 @@ SDL_Downsample_S32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14087,7 +13928,6 @@ SDL_Downsample_S32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_S32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
Sint32 *dst = (Sint32 *) cvt->buf; Sint32 *dst = (Sint32 *) cvt->buf;
const Sint32 *src = (Sint32 *) cvt->buf; const Sint32 *src = (Sint32 *) cvt->buf;
...@@ -14142,7 +13982,6 @@ SDL_Upsample_F32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14142,7 +13982,6 @@ SDL_Upsample_F32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 1; float *dst = ((float *) (cvt->buf + dstsize)) - 1;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -14170,7 +14009,6 @@ SDL_Downsample_F32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14170,7 +14009,6 @@ SDL_Downsample_F32LSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14197,7 +14035,6 @@ SDL_Upsample_F32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14197,7 +14035,6 @@ SDL_Upsample_F32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 1; float *dst = ((float *) (cvt->buf + dstsize)) - 1;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -14227,7 +14064,6 @@ SDL_Downsample_F32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14227,7 +14064,6 @@ SDL_Downsample_F32LSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14254,7 +14090,6 @@ SDL_Upsample_F32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14254,7 +14090,6 @@ SDL_Upsample_F32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 2; float *dst = ((float *) (cvt->buf + dstsize)) - 2;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -14287,7 +14122,6 @@ SDL_Downsample_F32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14287,7 +14122,6 @@ SDL_Downsample_F32LSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14318,7 +14152,6 @@ SDL_Upsample_F32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14318,7 +14152,6 @@ SDL_Upsample_F32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 2; float *dst = ((float *) (cvt->buf + dstsize)) - 2;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -14355,7 +14188,6 @@ SDL_Downsample_F32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14355,7 +14188,6 @@ SDL_Downsample_F32LSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14386,7 +14218,6 @@ SDL_Upsample_F32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14386,7 +14218,6 @@ SDL_Upsample_F32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 4; float *dst = ((float *) (cvt->buf + dstsize)) - 4;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -14429,7 +14260,6 @@ SDL_Downsample_F32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14429,7 +14260,6 @@ SDL_Downsample_F32LSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14468,7 +14298,6 @@ SDL_Upsample_F32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14468,7 +14298,6 @@ SDL_Upsample_F32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 4; float *dst = ((float *) (cvt->buf + dstsize)) - 4;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -14519,7 +14348,6 @@ SDL_Downsample_F32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14519,7 +14348,6 @@ SDL_Downsample_F32LSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14558,7 +14386,6 @@ SDL_Upsample_F32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14558,7 +14386,6 @@ SDL_Upsample_F32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 6; float *dst = ((float *) (cvt->buf + dstsize)) - 6;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -14611,7 +14438,6 @@ SDL_Downsample_F32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14611,7 +14438,6 @@ SDL_Downsample_F32LSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14658,7 +14484,6 @@ SDL_Upsample_F32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14658,7 +14484,6 @@ SDL_Upsample_F32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 6; float *dst = ((float *) (cvt->buf + dstsize)) - 6;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -14723,7 +14548,6 @@ SDL_Downsample_F32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14723,7 +14548,6 @@ SDL_Downsample_F32LSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14770,7 +14594,6 @@ SDL_Upsample_F32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14770,7 +14594,6 @@ SDL_Upsample_F32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 8; float *dst = ((float *) (cvt->buf + dstsize)) - 8;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -14833,7 +14656,6 @@ SDL_Downsample_F32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14833,7 +14656,6 @@ SDL_Downsample_F32LSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -14888,7 +14710,6 @@ SDL_Upsample_F32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14888,7 +14710,6 @@ SDL_Upsample_F32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 8; float *dst = ((float *) (cvt->buf + dstsize)) - 8;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -14967,7 +14788,6 @@ SDL_Downsample_F32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -14967,7 +14788,6 @@ SDL_Downsample_F32LSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32LSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15022,7 +14842,6 @@ SDL_Upsample_F32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15022,7 +14842,6 @@ SDL_Upsample_F32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 1; float *dst = ((float *) (cvt->buf + dstsize)) - 1;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -15050,7 +14869,6 @@ SDL_Downsample_F32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15050,7 +14869,6 @@ SDL_Downsample_F32MSB_1c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15077,7 +14895,6 @@ SDL_Upsample_F32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15077,7 +14895,6 @@ SDL_Upsample_F32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 1 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 1; float *dst = ((float *) (cvt->buf + dstsize)) - 1;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 1;
...@@ -15107,7 +14924,6 @@ SDL_Downsample_F32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15107,7 +14924,6 @@ SDL_Downsample_F32MSB_1c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 1 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 1 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15134,7 +14950,6 @@ SDL_Upsample_F32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15134,7 +14950,6 @@ SDL_Upsample_F32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 2; float *dst = ((float *) (cvt->buf + dstsize)) - 2;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -15167,7 +14982,6 @@ SDL_Downsample_F32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15167,7 +14982,6 @@ SDL_Downsample_F32MSB_2c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15198,7 +15012,6 @@ SDL_Upsample_F32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15198,7 +15012,6 @@ SDL_Upsample_F32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 2 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 2; float *dst = ((float *) (cvt->buf + dstsize)) - 2;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 2;
...@@ -15235,7 +15048,6 @@ SDL_Downsample_F32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15235,7 +15048,6 @@ SDL_Downsample_F32MSB_2c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 2 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 2 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15266,7 +15078,6 @@ SDL_Upsample_F32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15266,7 +15078,6 @@ SDL_Upsample_F32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 4; float *dst = ((float *) (cvt->buf + dstsize)) - 4;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -15309,7 +15120,6 @@ SDL_Downsample_F32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15309,7 +15120,6 @@ SDL_Downsample_F32MSB_4c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15348,7 +15158,6 @@ SDL_Upsample_F32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15348,7 +15158,6 @@ SDL_Upsample_F32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 4 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 4; float *dst = ((float *) (cvt->buf + dstsize)) - 4;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 4;
...@@ -15399,7 +15208,6 @@ SDL_Downsample_F32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15399,7 +15208,6 @@ SDL_Downsample_F32MSB_4c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 4 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 4 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15438,7 +15246,6 @@ SDL_Upsample_F32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15438,7 +15246,6 @@ SDL_Upsample_F32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 6; float *dst = ((float *) (cvt->buf + dstsize)) - 6;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -15491,7 +15298,6 @@ SDL_Downsample_F32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15491,7 +15298,6 @@ SDL_Downsample_F32MSB_6c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15538,7 +15344,6 @@ SDL_Upsample_F32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15538,7 +15344,6 @@ SDL_Upsample_F32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 6 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 6; float *dst = ((float *) (cvt->buf + dstsize)) - 6;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 6;
...@@ -15603,7 +15408,6 @@ SDL_Downsample_F32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15603,7 +15408,6 @@ SDL_Downsample_F32MSB_6c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 6 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 6 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15650,7 +15454,6 @@ SDL_Upsample_F32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15650,7 +15454,6 @@ SDL_Upsample_F32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x2) AUDIO_F32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 2; const int dstsize = cvt->len_cvt * 2;
float *dst = ((float *) (cvt->buf + dstsize)) - 8; float *dst = ((float *) (cvt->buf + dstsize)) - 8;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -15713,7 +15516,6 @@ SDL_Downsample_F32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15713,7 +15516,6 @@ SDL_Downsample_F32MSB_8c_x2(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x2) AUDIO_F32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 2; const int dstsize = cvt->len_cvt / 2;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
...@@ -15768,7 +15570,6 @@ SDL_Upsample_F32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15768,7 +15570,6 @@ SDL_Upsample_F32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 8 channels.\n"); fprintf(stderr, "Upsample (x4) AUDIO_F32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt * 4; const int dstsize = cvt->len_cvt * 4;
float *dst = ((float *) (cvt->buf + dstsize)) - 8; float *dst = ((float *) (cvt->buf + dstsize)) - 8;
const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8; const float *src = ((float *) (cvt->buf + cvt->len_cvt)) - 8;
...@@ -15847,7 +15648,6 @@ SDL_Downsample_F32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -15847,7 +15648,6 @@ SDL_Downsample_F32MSB_8c_x4(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 8 channels.\n"); fprintf(stderr, "Downsample (x4) AUDIO_F32MSB, 8 channels.\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt / 4; const int dstsize = cvt->len_cvt / 4;
float *dst = (float *) cvt->buf; float *dst = (float *) cvt->buf;
const float *src = (float *) cvt->buf; const float *src = (float *) cvt->buf;
......
...@@ -38,7 +38,7 @@ sub outputHeader { ...@@ -38,7 +38,7 @@ sub outputHeader {
/* DO NOT EDIT! This file is generated by sdlgenaudiocvt.pl */ /* DO NOT EDIT! This file is generated by sdlgenaudiocvt.pl */
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2011 Sam Lantinga <slouken\@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
...@@ -536,7 +536,6 @@ ${sym}(SDL_AudioCVT * cvt, SDL_AudioFormat format) ...@@ -536,7 +536,6 @@ ${sym}(SDL_AudioCVT * cvt, SDL_AudioFormat format)
fprintf(stderr, "$resample (x${multiple}) AUDIO_${from}, ${channels} channels.\\n"); fprintf(stderr, "$resample (x${multiple}) AUDIO_${from}, ${channels} channels.\\n");
#endif #endif
const int srcsize = cvt->len_cvt;
const int dstsize = cvt->len_cvt $lencvtop $multiple; const int dstsize = cvt->len_cvt $lencvtop $multiple;
EOF EOF
......
...@@ -29,6 +29,14 @@ extern "C" { ...@@ -29,6 +29,14 @@ extern "C" {
#include "../../video/android/SDL_androidtouch.h" #include "../../video/android/SDL_androidtouch.h"
#include "../../video/android/SDL_androidvideo.h" #include "../../video/android/SDL_androidvideo.h"
#include <android/log.h>
#define LOG_TAG "SDL_android"
//#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
//#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
#define LOGI(...) do {} while (false)
#define LOGE(...) do {} while (false)
/* Impelemented in audio/android/SDL_androidaudio.c */ /* Impelemented in audio/android/SDL_androidaudio.c */
extern void Android_RunAudioThread(); extern void Android_RunAudioThread();
} // C } // C
...@@ -45,6 +53,7 @@ extern void Android_RunAudioThread(); ...@@ -45,6 +53,7 @@ extern void Android_RunAudioThread();
*******************************************************************************/ *******************************************************************************/
static JNIEnv* mEnv = NULL; static JNIEnv* mEnv = NULL;
static JNIEnv* mAudioEnv = NULL; static JNIEnv* mAudioEnv = NULL;
static JavaVM* mJavaVM;
// Main activity // Main activity
static jclass mActivityClass; static jclass mActivityClass;
...@@ -68,6 +77,14 @@ static float fLastAccelerometer[3]; ...@@ -68,6 +77,14 @@ static float fLastAccelerometer[3];
// Library init // Library init
extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
{ {
JNIEnv *env;
mJavaVM = vm;
LOGI("JNI_OnLoad called");
if (mJavaVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
LOGE("Failed to get the environment using GetEnv()");
return -1;
}
return JNI_VERSION_1_4; return JNI_VERSION_1_4;
} }
...@@ -96,6 +113,7 @@ extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls) ...@@ -96,6 +113,7 @@ extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls)
!midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit) { !midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit) {
__android_log_print(ANDROID_LOG_WARN, "SDL", "SDL: Couldn't locate Java callbacks, check that they're named and typed correctly"); __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL: Couldn't locate Java callbacks, check that they're named and typed correctly");
} }
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init() finished!");
} }
// Resize // Resize
...@@ -123,9 +141,10 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyUp( ...@@ -123,9 +141,10 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyUp(
// Touch // Touch
extern "C" void Java_org_libsdl_app_SDLActivity_onNativeTouch( extern "C" void Java_org_libsdl_app_SDLActivity_onNativeTouch(
JNIEnv* env, jclass jcls, JNIEnv* env, jclass jcls,
jint touch_device_id_in, jint pointer_finger_id_in,
jint action, jfloat x, jfloat y, jfloat p) jint action, jfloat x, jfloat y, jfloat p)
{ {
Android_OnTouch(action, x, y, p); Android_OnTouch(touch_device_id_in, pointer_finger_id_in, action, x, y, p);
} }
// Accelerometer // Accelerometer
...@@ -203,29 +222,48 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan ...@@ -203,29 +222,48 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan
{ {
int audioBufferFrames; int audioBufferFrames;
int status;
JNIEnv *env;
static bool isAttached = false;
status = mJavaVM->GetEnv((void **) &env, JNI_VERSION_1_4);
if(status < 0) {
LOGE("callback_handler: failed to get JNI environment, assuming native thread");
status = mJavaVM->AttachCurrentThread(&env, NULL);
if(status < 0) {
LOGE("callback_handler: failed to attach current thread");
return 0;
}
isAttached = true;
}
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device"); __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device");
audioBuffer16Bit = is16Bit; audioBuffer16Bit = is16Bit;
audioBufferStereo = channelCount > 1; audioBufferStereo = channelCount > 1;
audioBuffer = mEnv->CallStaticObjectMethod(mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames); audioBuffer = env->CallStaticObjectMethod(mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames);
if (audioBuffer == NULL) { if (audioBuffer == NULL) {
__android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: didn't get back a good audio buffer!"); __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: didn't get back a good audio buffer!");
return 0; return 0;
} }
audioBuffer = mEnv->NewGlobalRef(audioBuffer); audioBuffer = env->NewGlobalRef(audioBuffer);
jboolean isCopy = JNI_FALSE; jboolean isCopy = JNI_FALSE;
if (audioBuffer16Bit) { if (audioBuffer16Bit) {
audioBufferPinned = mEnv->GetShortArrayElements((jshortArray)audioBuffer, &isCopy); audioBufferPinned = env->GetShortArrayElements((jshortArray)audioBuffer, &isCopy);
audioBufferFrames = mEnv->GetArrayLength((jshortArray)audioBuffer); audioBufferFrames = env->GetArrayLength((jshortArray)audioBuffer);
} else { } else {
audioBufferPinned = mEnv->GetByteArrayElements((jbyteArray)audioBuffer, &isCopy); audioBufferPinned = env->GetByteArrayElements((jbyteArray)audioBuffer, &isCopy);
audioBufferFrames = mEnv->GetArrayLength((jbyteArray)audioBuffer); audioBufferFrames = env->GetArrayLength((jbyteArray)audioBuffer);
} }
if (audioBufferStereo) { if (audioBufferStereo) {
audioBufferFrames /= 2; audioBufferFrames /= 2;
} }
if (isAttached) {
mJavaVM->DetachCurrentThread();
}
return audioBufferFrames; return audioBufferFrames;
} }
...@@ -250,13 +288,31 @@ extern "C" void Android_JNI_WriteAudioBuffer() ...@@ -250,13 +288,31 @@ extern "C" void Android_JNI_WriteAudioBuffer()
extern "C" void Android_JNI_CloseAudioDevice() extern "C" void Android_JNI_CloseAudioDevice()
{ {
mEnv->CallStaticVoidMethod(mActivityClass, midAudioQuit); int status;
JNIEnv *env;
static bool isAttached = false;
status = mJavaVM->GetEnv((void **) &env, JNI_VERSION_1_4);
if(status < 0) {
LOGE("callback_handler: failed to get JNI environment, assuming native thread");
status = mJavaVM->AttachCurrentThread(&env, NULL);
if(status < 0) {
LOGE("callback_handler: failed to attach current thread");
return;
}
isAttached = true;
}
env->CallStaticVoidMethod(mActivityClass, midAudioQuit);
if (audioBuffer) { if (audioBuffer) {
mEnv->DeleteGlobalRef(audioBuffer); env->DeleteGlobalRef(audioBuffer);
audioBuffer = NULL; audioBuffer = NULL;
audioBufferPinned = NULL; audioBufferPinned = NULL;
} }
if (isAttached) {
mJavaVM->DetachCurrentThread();
}
} }
// Test for an exception and call SDL_SetError with its detail if one occurs // Test for an exception and call SDL_SetError with its detail if one occurs
...@@ -345,11 +401,6 @@ static int Android_JNI_FileOpen(SDL_RWops* ctx) ...@@ -345,11 +401,6 @@ static int Android_JNI_FileOpen(SDL_RWops* ctx)
ctx->hidden.androidio.inputStream = inputStream; ctx->hidden.androidio.inputStream = inputStream;
ctx->hidden.androidio.inputStreamRef = mEnv->NewGlobalRef(inputStream); ctx->hidden.androidio.inputStreamRef = mEnv->NewGlobalRef(inputStream);
// Store .skip id for seeking purposes
mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream),
"skip", "(J)J");
ctx->hidden.androidio.skipMethod = mid;
// Despite all the visible documentation on [Asset]InputStream claiming // Despite all the visible documentation on [Asset]InputStream claiming
// that the .available() method is not guaranteed to return the entire file // that the .available() method is not guaranteed to return the entire file
// size, comments in <sdk>/samples/<ver>/ApiDemos/src/com/example/ ... // size, comments in <sdk>/samples/<ver>/ApiDemos/src/com/example/ ...
...@@ -517,16 +568,24 @@ extern "C" long Android_JNI_FileSeek(SDL_RWops* ctx, long offset, int whence) ...@@ -517,16 +568,24 @@ extern "C" long Android_JNI_FileSeek(SDL_RWops* ctx, long offset, int whence)
long movement = newPosition - ctx->hidden.androidio.position; long movement = newPosition - ctx->hidden.androidio.position;
jobject inputStream = (jobject)ctx->hidden.androidio.inputStream; jobject inputStream = (jobject)ctx->hidden.androidio.inputStream;
jmethodID skipMethod = (jmethodID)ctx->hidden.androidio.skipMethod;
if (movement > 0) { if (movement > 0) {
unsigned char buffer[1024];
// The easy case where we're seeking forwards // The easy case where we're seeking forwards
while (movement > 0) { while (movement > 0) {
// inputStream.skip(...); long amount = (long) sizeof (buffer);
movement -= mEnv->CallLongMethod(inputStream, skipMethod, movement); if (amount > movement) {
if (Android_JNI_ExceptionOccurred()) { amount = movement;
}
size_t result = Android_JNI_FileRead(ctx, buffer, 1, amount);
if (result <= 0) {
// Failed to read/skip the required amount, so fail
return -1; return -1;
} }
movement -= result;
} }
} else if (movement < 0) { } else if (movement < 0) {
// We can't seek backwards so we have to reopen the file and seek // We can't seek backwards so we have to reopen the file and seek
......
...@@ -384,6 +384,8 @@ SDL_GetCPUType(void) ...@@ -384,6 +384,8 @@ SDL_GetCPUType(void)
return SDL_CPUType; return SDL_CPUType;
} }
#ifdef TEST_MAIN /* !!! FIXME: only used for test at the moment. */
static const char * static const char *
SDL_GetCPUName(void) SDL_GetCPUName(void)
{ {
...@@ -455,6 +457,7 @@ SDL_GetCPUName(void) ...@@ -455,6 +457,7 @@ SDL_GetCPUName(void)
} }
return SDL_CPUName; return SDL_CPUName;
} }
#endif
int int
SDL_GetCPUCacheLineSize(void) SDL_GetCPUCacheLineSize(void)
......
...@@ -390,10 +390,11 @@ int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points) { ...@@ -390,10 +390,11 @@ int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points) {
float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch) { float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch) {
SDL_FloatPoint points[DOLLARNPOINTS]; SDL_FloatPoint points[DOLLARNPOINTS];
int numPoints = dollarNormalize(path,points);
int i; int i;
float bestDiff = 10000; float bestDiff = 10000;
dollarNormalize(path,points);
//PrintPath(points); //PrintPath(points);
*bestTempl = -1; *bestTempl = -1;
for(i = 0;i < touch->numDollarTemplates;i++) { for(i = 0;i < touch->numDollarTemplates;i++) {
......
...@@ -349,7 +349,6 @@ SDL_Cursor * ...@@ -349,7 +349,6 @@ SDL_Cursor *
SDL_CreateCursor(const Uint8 * data, const Uint8 * mask, SDL_CreateCursor(const Uint8 * data, const Uint8 * mask,
int w, int h, int hot_x, int hot_y) int w, int h, int hot_x, int hot_y)
{ {
SDL_Mouse *mouse = SDL_GetMouse();
SDL_Surface *surface; SDL_Surface *surface;
SDL_Cursor *cursor; SDL_Cursor *cursor;
int x, y; int x, y;
......
...@@ -128,7 +128,6 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery, ...@@ -128,7 +128,6 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery,
char *val = NULL; char *val = NULL;
SDL_bool charge = SDL_FALSE; SDL_bool charge = SDL_FALSE;
SDL_bool choose = SDL_FALSE; SDL_bool choose = SDL_FALSE;
SDL_bool is_ac = SDL_FALSE;
int maximum = -1; int maximum = -1;
int remaining = -1; int remaining = -1;
int secs = -1; int secs = -1;
...@@ -214,13 +213,6 @@ check_proc_acpi_ac_adapter(const char * node, SDL_bool * have_ac) ...@@ -214,13 +213,6 @@ check_proc_acpi_ac_adapter(const char * node, SDL_bool * have_ac)
char *ptr = NULL; char *ptr = NULL;
char *key = NULL; char *key = NULL;
char *val = NULL; char *val = NULL;
SDL_bool charge = SDL_FALSE;
SDL_bool choose = SDL_FALSE;
SDL_bool is_ac = SDL_FALSE;
int maximum = -1;
int remaining = -1;
int secs = -1;
int pct = -1;
if (!load_acpi_file(base, node, "state", state, sizeof (state))) { if (!load_acpi_file(base, node, "state", state, sizeof (state))) {
return; return;
......
...@@ -348,8 +348,6 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) ...@@ -348,8 +348,6 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
static void static void
GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{ {
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) { if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) {
/* Rebind the context to the window area and update matrices */ /* Rebind the context to the window area and update matrices */
SDL_CurrentContext = NULL; SDL_CurrentContext = NULL;
......
...@@ -124,7 +124,6 @@ SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2, ...@@ -124,7 +124,6 @@ SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2,
SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
SDL_bool draw_end) SDL_bool draw_end)
{ {
const SDL_PixelFormat *fmt = dst->format;
unsigned r, g, b, a, inva; unsigned r, g, b, a, inva;
if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) { if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
...@@ -216,7 +215,6 @@ SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2, ...@@ -216,7 +215,6 @@ SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2,
SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
SDL_bool draw_end) SDL_bool draw_end)
{ {
const SDL_PixelFormat *fmt = dst->format;
unsigned r, g, b, a, inva; unsigned r, g, b, a, inva;
if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) { if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
...@@ -492,7 +490,6 @@ SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2, ...@@ -492,7 +490,6 @@ SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
SDL_bool draw_end) SDL_bool draw_end)
{ {
const SDL_PixelFormat *fmt = dst->format;
unsigned r, g, b, a, inva; unsigned r, g, b, a, inva;
if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) { if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
...@@ -584,7 +581,6 @@ SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2, ...@@ -584,7 +581,6 @@ SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
SDL_bool draw_end) SDL_bool draw_end)
{ {
const SDL_PixelFormat *fmt = dst->format;
unsigned r, g, b, a, inva; unsigned r, g, b, a, inva;
if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) { if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
......
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
#define DRAW_SETPIXEL(setpixel) \ #define DRAW_SETPIXEL(setpixel) \
do { \ do { \
unsigned sr = r, sg = g, sb = b, sa = a; \ unsigned sr = r, sg = g, sb = b, sa = a; (void) sa; \
setpixel; \ setpixel; \
} while (0) } while (0)
#define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \ #define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \
do { \ do { \
unsigned sr, sg, sb, sa; sa; \ unsigned sr, sg, sb, sa; (void) sa; \
getpixel; \ getpixel; \
sr = DRAW_MUL(inva, sr) + r; \ sr = DRAW_MUL(inva, sr) + r; \
sg = DRAW_MUL(inva, sg) + g; \ sg = DRAW_MUL(inva, sg) + g; \
...@@ -61,7 +61,7 @@ do { \ ...@@ -61,7 +61,7 @@ do { \
#define DRAW_SETPIXEL_ADD(getpixel, setpixel) \ #define DRAW_SETPIXEL_ADD(getpixel, setpixel) \
do { \ do { \
unsigned sr, sg, sb, sa; sa; \ unsigned sr, sg, sb, sa; (void) sa; \
getpixel; \ getpixel; \
sr += r; if (sr > 0xff) sr = 0xff; \ sr += r; if (sr > 0xff) sr = 0xff; \
sg += g; if (sg > 0xff) sg = 0xff; \ sg += g; if (sg > 0xff) sg = 0xff; \
...@@ -71,7 +71,7 @@ do { \ ...@@ -71,7 +71,7 @@ do { \
#define DRAW_SETPIXEL_MOD(getpixel, setpixel) \ #define DRAW_SETPIXEL_MOD(getpixel, setpixel) \
do { \ do { \
unsigned sr, sg, sb, sa; sa; \ unsigned sr, sg, sb, sa; (void) sa; \
getpixel; \ getpixel; \
sr = DRAW_MUL(sr, r); \ sr = DRAW_MUL(sr, r); \
sg = DRAW_MUL(sg, g); \ sg = DRAW_MUL(sg, g); \
......
...@@ -66,8 +66,9 @@ int ...@@ -66,8 +66,9 @@ int
SDL_SYS_CreateThread(SDL_Thread * thread, void *args) SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
{ {
/* The docs say the thread name can't be longer than B_OS_NAME_LENGTH. */ /* The docs say the thread name can't be longer than B_OS_NAME_LENGTH. */
const char *threadname = thread->name ? thread->name : "SDL Thread";
char name[B_OS_NAME_LENGTH]; char name[B_OS_NAME_LENGTH];
SDL_snprintf(name, sizeof (name), "%s", thread->name); SDL_snprintf(name, sizeof (name), "%s", threadname);
name[sizeof (name) - 1] = '\0'; name[sizeof (name) - 1] = '\0';
/* Create the thread and go! */ /* Create the thread and go! */
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include <sys/time.h>
#include "SDL_thread.h" #include "SDL_thread.h"
#include "SDL_timer.h" #include "SDL_timer.h"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#include "SDL_config.h" #include "SDL_config.h"
#include <pthread.h> #include <pthread.h>
...@@ -31,6 +32,8 @@ ...@@ -31,6 +32,8 @@
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <unistd.h>
extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) __THROW __nonnull ((2));
#endif #endif
#include "SDL_platform.h" #include "SDL_platform.h"
...@@ -79,14 +82,16 @@ SDL_SYS_SetupThread(const char *name) ...@@ -79,14 +82,16 @@ SDL_SYS_SetupThread(const char *name)
int i; int i;
sigset_t mask; sigset_t mask;
if (name != NULL) {
#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \ #if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
(__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) ) (__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
if (pthread_setname_np != NULL) { pthread_setname_np(name); } if (pthread_setname_np != NULL) { pthread_setname_np(name); }
#elif HAVE_PTHREAD_SETNAME_NP #elif HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), name); pthread_setname_np(pthread_self(), name);
#elif HAVE_PTHREAD_SET_NAME_NP #elif HAVE_PTHREAD_SET_NAME_NP
pthread_set_name_np(pthread_self(), name); pthread_set_name_np(pthread_self(), name);
#endif #endif
}
/* Mask asynchronous signals for this thread */ /* Mask asynchronous signals for this thread */
sigemptyset(&mask); sigemptyset(&mask);
......
...@@ -161,25 +161,27 @@ typedef struct tagTHREADNAME_INFO ...@@ -161,25 +161,27 @@ typedef struct tagTHREADNAME_INFO
void void
SDL_SYS_SetupThread(const char *name) SDL_SYS_SetupThread(const char *name)
{ {
#if 0 /* !!! FIXME: __except needs C runtime, which we don't link against. */ if (name != NULL) {
#ifdef _MSC_VER /* !!! FIXME: can we do SEH on other compilers yet? */ #if 0 /* !!! FIXME: __except needs C runtime, which we don't link against. */
/* This magic tells the debugger to name a thread if it's listening. */ #ifdef _MSC_VER /* !!! FIXME: can we do SEH on other compilers yet? */
THREADNAME_INFO inf; /* This magic tells the debugger to name a thread if it's listening. */
inf.dwType = 0x1000; THREADNAME_INFO inf;
inf.szName = name; inf.dwType = 0x1000;
inf.dwThreadID = (DWORD) -1; inf.szName = name;
inf.dwFlags = 0; inf.dwThreadID = (DWORD) -1;
inf.dwFlags = 0;
__try
{ __try
RaiseException(0x406D1388, 0, sizeof(inf)/sizeof(DWORD), (DWORD*)&inf); {
RaiseException(0x406D1388, 0, sizeof(inf)/sizeof(DWORD), (DWORD*)&inf);
}
__except(EXCEPTION_CONTINUE_EXECUTION)
{
/* The program itself should ignore this bogus exception. */
}
#endif
#endif
} }
__except(EXCEPTION_CONTINUE_EXECUTION)
{
/* The program itself should ignore this bogus exception. */
}
#endif
#endif
} }
SDL_threadID SDL_threadID
......
...@@ -29,26 +29,43 @@ ...@@ -29,26 +29,43 @@
#include <android/log.h> #include <android/log.h>
#include <dlfcn.h>
static void* Android_GLHandle = NULL;
/* GL functions */ /* GL functions */
int int
Android_GL_LoadLibrary(_THIS, const char *path) Android_GL_LoadLibrary(_THIS, const char *path)
{ {
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); if (!Android_GLHandle) {
Android_GLHandle = dlopen("libGLESv1_CM.so",RTLD_GLOBAL);
if (!Android_GLHandle) {
SDL_SetError("Could not initialize GL ES library\n");
return -1;
}
}
return 0; return 0;
} }
void * void *
Android_GL_GetProcAddress(_THIS, const char *proc) Android_GL_GetProcAddress(_THIS, const char *proc)
{ {
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n"); /*
return 0; !!! FIXME: this _should_ use eglGetProcAddress(), but it appears to be
!!! FIXME: busted on Android at the moment...
!!! FIXME: http://code.google.com/p/android/issues/detail?id=7681
!!! FIXME: ...so revisit this later. --ryan.
*/
return dlsym(Android_GLHandle, proc);
} }
void void
Android_GL_UnloadLibrary(_THIS) Android_GL_UnloadLibrary(_THIS)
{ {
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n"); if(Android_GLHandle) {
dlclose(Android_GLHandle);
Android_GLHandle = NULL;
}
} }
SDL_GLContext SDL_GLContext
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "SDL_events.h" #include "SDL_events.h"
#include "../../events/SDL_mouse_c.h" #include "../../events/SDL_mouse_c.h"
#include "../../events/SDL_touch_c.h"
#include "SDL_androidtouch.h" #include "SDL_androidtouch.h"
...@@ -33,27 +34,55 @@ ...@@ -33,27 +34,55 @@
#define ACTION_MOVE 2 #define ACTION_MOVE 2
#define ACTION_CANCEL 3 #define ACTION_CANCEL 3
#define ACTION_OUTSIDE 4 #define ACTION_OUTSIDE 4
// The following two are deprecated but it seems they are still emitted (instead the corresponding ACTION_UP/DOWN) as of Android 3.2
#define ACTION_POINTER_1_DOWN 5
#define ACTION_POINTER_1_UP 6
void Android_OnTouch(int action, float x, float y, float p) void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p)
{ {
SDL_TouchID touchDeviceId = 0;
SDL_FingerID fingerId = 0;
if (!Android_Window) { if (!Android_Window) {
return; return;
} }
touchDeviceId = (SDL_TouchID)touch_device_id_in;
if (!SDL_GetTouch(touchDeviceId)) {
SDL_Touch touch;
memset( &touch, 0, sizeof(touch) );
touch.id = touchDeviceId;
touch.x_min = 0.0f;
touch.x_max = (float)Android_ScreenWidth;
touch.native_xres = touch.x_max - touch.x_min;
touch.y_min = 0.0f;
touch.y_max = (float)Android_ScreenHeight;
touch.native_yres = touch.y_max - touch.y_min;
touch.pressure_min = 0.0f;
touch.pressure_max = 1.0f;
touch.native_pressureres = touch.pressure_max - touch.pressure_min;
if (SDL_AddTouch(&touch, "") < 0) {
SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
}
}
if ((action != ACTION_CANCEL) && (action != ACTION_OUTSIDE)) {
SDL_SetMouseFocus(Android_Window); fingerId = (SDL_FingerID)pointer_finger_id_in;
SDL_SendMouseMotion(Android_Window, 0, (int)x, (int)y); switch (action) {
switch(action) {
case ACTION_DOWN: case ACTION_DOWN:
SDL_SendMouseButton(Android_Window, SDL_PRESSED, SDL_BUTTON_LEFT); case ACTION_POINTER_1_DOWN:
SDL_SendFingerDown(touchDeviceId, fingerId, SDL_TRUE, x, y, p);
break;
case ACTION_MOVE:
SDL_SendTouchMotion(touchDeviceId, fingerId, SDL_FALSE, x, y, p);
break; break;
case ACTION_UP: case ACTION_UP:
SDL_SendMouseButton(Android_Window, SDL_RELEASED, SDL_BUTTON_LEFT); case ACTION_POINTER_1_UP:
SDL_SendFingerDown(touchDeviceId, fingerId, SDL_FALSE, x, y, p);
break; break;
} default:
} else { break;
SDL_SetMouseFocus(NULL); }
}
} }
/* vi: set ts=4 sw=4 expandtab: */ /* vi: set ts=4 sw=4 expandtab: */
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
#include "SDL_androidvideo.h" #include "SDL_androidvideo.h"
extern void Android_OnTouch(int action, float x, float y, float p); extern void Android_OnTouch( int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p);
/* vi: set ts=4 sw=4 expandtab: */ /* vi: set ts=4 sw=4 expandtab: */
...@@ -176,7 +176,8 @@ UIKit_AddDisplay(UIScreen *uiscreen, UIScreenMode *uimode, int w, int h) ...@@ -176,7 +176,8 @@ UIKit_AddDisplay(UIScreen *uiscreen, UIScreenMode *uimode, int w, int h)
mode.h = h; mode.h = h;
mode.refresh_rate = 0; mode.refresh_rate = 0;
[uimode retain]; [uimode retain]; // once for the desktop_mode
[uimode retain]; // once for the current_mode
mode.driverdata = uimode; mode.driverdata = uimode;
SDL_zero(display); SDL_zero(display);
...@@ -248,13 +249,14 @@ UIKit_VideoQuit(_THIS) ...@@ -248,13 +249,14 @@ UIKit_VideoQuit(_THIS)
UIScreen *uiscreen = (UIScreen *) display->driverdata; UIScreen *uiscreen = (UIScreen *) display->driverdata;
[uiscreen release]; [uiscreen release];
display->driverdata = NULL; display->driverdata = NULL;
[((UIScreenMode *) display->desktop_mode.driverdata) release];
display->desktop_mode.driverdata = NULL;
[((UIScreenMode *) display->current_mode.driverdata) release];
display->current_mode.driverdata = NULL;
for (j = 0; j < display->num_display_modes; j++) { for (j = 0; j < display->num_display_modes; j++) {
SDL_DisplayMode *mode = &display->display_modes[j]; SDL_DisplayMode *mode = &display->display_modes[j];
UIScreenMode *uimode = (UIScreenMode *) mode->driverdata; [((UIScreenMode *) mode->driverdata) release];
if (uimode) { mode->driverdata = NULL;
[uimode release];
mode->driverdata = NULL;
}
} }
} }
} }
......
...@@ -151,8 +151,13 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) ...@@ -151,8 +151,13 @@ UIKit_CreateWindow(_THIS, SDL_Window *window)
if (bestmode) { if (bestmode) {
UIScreenMode *uimode = (UIScreenMode *) bestmode->driverdata; UIScreenMode *uimode = (UIScreenMode *) bestmode->driverdata;
[uiscreen setCurrentMode:uimode]; [uiscreen setCurrentMode:uimode];
display->desktop_mode = *bestmode;
// desktop_mode doesn't change here (the higher level will
// use it to set all the screens back to their defaults
// upon window destruction, SDL_Quit(), etc.
[((UIScreenMode *) display->current_mode.driverdata) release];
display->current_mode = *bestmode; display->current_mode = *bestmode;
[((UIScreenMode *) display->current_mode.driverdata) retain];
} }
} }
} }
......
...@@ -88,6 +88,8 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created) ...@@ -88,6 +88,8 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
data->mouse_pressed = SDL_FALSE; data->mouse_pressed = SDL_FALSE;
data->videodata = videodata; data->videodata = videodata;
window->driverdata = data;
/* Associate the data with the window */ /* Associate the data with the window */
if (!SetProp(hwnd, TEXT("SDL_WindowData"), data)) { if (!SetProp(hwnd, TEXT("SDL_WindowData"), data)) {
ReleaseDC(hwnd, data->hdc); ReleaseDC(hwnd, data->hdc);
...@@ -183,7 +185,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created) ...@@ -183,7 +185,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
} }
/* All done! */ /* All done! */
window->driverdata = data;
return 0; return 0;
} }
......
...@@ -234,7 +234,6 @@ X11_DispatchEvent(_THIS) ...@@ -234,7 +234,6 @@ X11_DispatchEvent(_THIS)
case KeyPress:{ case KeyPress:{
KeyCode keycode = xevent.xkey.keycode; KeyCode keycode = xevent.xkey.keycode;
KeySym keysym = NoSymbol; KeySym keysym = NoSymbol;
SDL_Scancode scancode;
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
Status status = 0; Status status = 0;
...@@ -243,7 +242,7 @@ X11_DispatchEvent(_THIS) ...@@ -243,7 +242,7 @@ X11_DispatchEvent(_THIS)
#endif #endif
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
#if 1 #if 1
if (videodata->key_layout[keycode] == SDLK_UNKNOWN) { if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN) {
int min_keycode, max_keycode; int min_keycode, max_keycode;
XDisplayKeycodes(display, &min_keycode, &max_keycode); XDisplayKeycodes(display, &min_keycode, &max_keycode);
keysym = XKeycodeToKeysym(display, keycode, 0); keysym = XKeycodeToKeysym(display, keycode, 0);
...@@ -522,6 +521,11 @@ X11_Pending(Display * display) ...@@ -522,6 +521,11 @@ X11_Pending(Display * display)
return (0); return (0);
} }
/* !!! FIXME: this should be exposed in a header, or something. */
int SDL_GetNumTouch(void);
void void
X11_PumpEvents(_THIS) X11_PumpEvents(_THIS)
{ {
...@@ -545,7 +549,6 @@ X11_PumpEvents(_THIS) ...@@ -545,7 +549,6 @@ X11_PumpEvents(_THIS)
#ifdef SDL_INPUT_LINUXEV #ifdef SDL_INPUT_LINUXEV
/* Process Touch events - TODO When X gets touch support, use that instead*/ /* Process Touch events - TODO When X gets touch support, use that instead*/
int i = 0,rd; int i = 0,rd;
char name[256];
struct input_event ev[64]; struct input_event ev[64];
int size = sizeof (struct input_event); int size = sizeof (struct input_event);
......
...@@ -183,7 +183,10 @@ X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects, ...@@ -183,7 +183,10 @@ X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects,
rect->x, rect->y, rect->w, rect->h); rect->x, rect->y, rect->w, rect->h);
} }
} }
XSync(display, False); XSync(display, False);
return 0;
} }
void void
......
...@@ -136,7 +136,7 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) ...@@ -136,7 +136,7 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y)
/* Code below assumes ARGB pixel format */ /* Code below assumes ARGB pixel format */
SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888); SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
rfg = gfg = bfg = rbg = gbg = bbg = fgBits = 0; rfg = gfg = bfg = rbg = gbg = bbg = fgBits = bgBits = 0;
for (y = 0; y < surface->h; ++y) { for (y = 0; y < surface->h; ++y) {
ptr = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch); ptr = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch);
for (x = 0; x < surface->w; ++x) { for (x = 0; x < surface->w; ++x) {
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#include "SDL_config.h" #include "SDL_config.h"
#include "SDL_x11video.h" #include "SDL_x11video.h"
#include "SDL_assert.h"
/* GLX implementation of SDL OpenGL support */ /* GLX implementation of SDL OpenGL support */
...@@ -388,8 +388,10 @@ X11_GL_GetVisual(_THIS, Display * display, int screen) ...@@ -388,8 +388,10 @@ X11_GL_GetVisual(_THIS, Display * display, int screen)
XVisualInfo *vinfo; XVisualInfo *vinfo;
/* 64 seems nice. */ /* 64 seems nice. */
int attribs[64]; const int max_attrs = 64;
int i = X11_GL_GetAttributes(_this,display,screen,attribs,64); int attribs[max_attrs];
const int i = X11_GL_GetAttributes(_this,display,screen,attribs,max_attrs);
SDL_assert(i <= max_attrs);
vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs);
if (!vinfo) { if (!vinfo) {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "SDL_x11video.h" #include "SDL_x11video.h"
#include "SDL_x11shape.h" #include "SDL_x11shape.h"
#include "SDL_x11window.h" #include "SDL_x11window.h"
#include "../SDL_shape_internals.h"
SDL_Window* SDL_Window*
X11_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { X11_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) {
......
...@@ -178,17 +178,17 @@ SDL_X11_SYM(int,ipUnallocateAndSendData,(ChannelPtr a,IPCard b),(a,b),return) ...@@ -178,17 +178,17 @@ SDL_X11_SYM(int,ipUnallocateAndSendData,(ChannelPtr a,IPCard b),(a,b),return)
/* XCursor support */ /* XCursor support */
#if SDL_VIDEO_DRIVER_X11_XCURSOR #if SDL_VIDEO_DRIVER_X11_XCURSOR
SDL_X11_MODULE(XCURSOR) SDL_X11_MODULE(XCURSOR)
SDL_X11_SYM(XcursorImage*,XcursorImageCreate,(int a,int b),(a,b),) SDL_X11_SYM(XcursorImage*,XcursorImageCreate,(int a,int b),(a,b),return)
SDL_X11_SYM(void,XcursorImageDestroy,(XcursorImage *a),(a),) SDL_X11_SYM(void,XcursorImageDestroy,(XcursorImage *a),(a),)
SDL_X11_SYM(Cursor,XcursorImageLoadCursor,(Display *a,const XcursorImage *b),(a,b),) SDL_X11_SYM(Cursor,XcursorImageLoadCursor,(Display *a,const XcursorImage *b),(a,b),return)
#endif #endif
/* Xinerama support */ /* Xinerama support */
#if SDL_VIDEO_DRIVER_X11_XINERAMA #if SDL_VIDEO_DRIVER_X11_XINERAMA
SDL_X11_MODULE(XINERAMA) SDL_X11_MODULE(XINERAMA)
SDL_X11_SYM(Bool,XineramaIsActive,(Display *a),(a),) SDL_X11_SYM(Bool,XineramaIsActive,(Display *a),(a),return)
SDL_X11_SYM(Bool,XineramaQueryExtension,(Display *a,int *b,int *c),(a,b,c),) SDL_X11_SYM(Bool,XineramaQueryExtension,(Display *a,int *b,int *c),(a,b,c),return)
SDL_X11_SYM(XineramaScreenInfo*,XineramaQueryScreens,(Display *a, int *b),(a,b),) SDL_X11_SYM(XineramaScreenInfo*,XineramaQueryScreens,(Display *a, int *b),(a,b),return)
#endif #endif
/* XInput support for multiple mice, tablets, etc. */ /* XInput support for multiple mice, tablets, etc. */
...@@ -229,12 +229,12 @@ SDL_X11_SYM(void,XShapeCombineMask,(Display *dpy,Window dest,int dest_kind,int x ...@@ -229,12 +229,12 @@ SDL_X11_SYM(void,XShapeCombineMask,(Display *dpy,Window dest,int dest_kind,int x
#if SDL_VIDEO_DRIVER_X11_XVIDMODE #if SDL_VIDEO_DRIVER_X11_XVIDMODE
SDL_X11_MODULE(XVIDMODE) SDL_X11_MODULE(XVIDMODE)
SDL_X11_SYM(Bool,XF86VidModeGetAllModeLines,(Display *a,int b,int *c,XF86VidModeModeInfo ***d),(a,b,c,d),) SDL_X11_SYM(Bool,XF86VidModeGetAllModeLines,(Display *a,int b,int *c,XF86VidModeModeInfo ***d),(a,b,c,d),return)
SDL_X11_SYM(Bool,XF86VidModeGetModeLine,(Display *a,int b,int *c,XF86VidModeModeLine *d),(a,b,c,d),) SDL_X11_SYM(Bool,XF86VidModeGetModeLine,(Display *a,int b,int *c,XF86VidModeModeLine *d),(a,b,c,d),return)
SDL_X11_SYM(Bool,XF86VidModeGetViewPort,(Display *a,int b,int *c,int *d),(a,b,c,d),) SDL_X11_SYM(Bool,XF86VidModeGetViewPort,(Display *a,int b,int *c,int *d),(a,b,c,d),return)
SDL_X11_SYM(Bool,XF86VidModeQueryExtension,(Display *a,int *b,int *c),(a,b,c),) SDL_X11_SYM(Bool,XF86VidModeQueryExtension,(Display *a,int *b,int *c),(a,b,c),return)
SDL_X11_SYM(Bool,XF86VidModeQueryVersion,(Display *a,int *b,int *c),(a,b,c),) SDL_X11_SYM(Bool,XF86VidModeQueryVersion,(Display *a,int *b,int *c),(a,b,c),return)
SDL_X11_SYM(Bool,XF86VidModeSwitchToMode,(Display *a,int b,XF86VidModeModeInfo *c),(a,b,c),) SDL_X11_SYM(Bool,XF86VidModeSwitchToMode,(Display *a,int b,XF86VidModeModeInfo *c),(a,b,c),return)
#endif #endif
/* *INDENT-ON* */ /* *INDENT-ON* */
......
...@@ -39,7 +39,6 @@ X11_InitTouch(_THIS) ...@@ -39,7 +39,6 @@ X11_InitTouch(_THIS)
FILE *fd; FILE *fd;
fd = fopen("/proc/bus/input/devices","r"); fd = fopen("/proc/bus/input/devices","r");
char c;
int i = 0; int i = 0;
int tsfd; int tsfd;
char line[256]; char line[256];
...@@ -111,7 +110,7 @@ X11_InitTouch(_THIS) ...@@ -111,7 +110,7 @@ X11_InitTouch(_THIS)
} }
} }
close(fd); fclose(fd);
#endif #endif
} }
......
...@@ -86,31 +86,6 @@ X11_GetWMStateProperty(_THIS, SDL_Window * window, Atom atoms[3]) ...@@ -86,31 +86,6 @@ X11_GetWMStateProperty(_THIS, SDL_Window * window, Atom atoms[3])
return count; return count;
} }
static void
X11_GetDisplaySize(_THIS, SDL_Window * window, int *w, int *h)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
SDL_DisplayData *displaydata =
(SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
XWindowAttributes attr;
XGetWindowAttributes(data->display, RootWindow(data->display, displaydata->screen), &attr);
if (window->flags & SDL_WINDOW_FULLSCREEN) {
/* The bounds when this window is visible is the fullscreen mode */
SDL_DisplayMode fullscreen_mode;
if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) {
attr.width = fullscreen_mode.w;
attr.height = fullscreen_mode.h;
}
}
if (w) {
*w = attr.width;
}
if (h) {
*h = attr.height;
}
}
static int static int
SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created) SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created)
{ {
...@@ -320,7 +295,6 @@ X11_CreateWindow(_THIS, SDL_Window * window) ...@@ -320,7 +295,6 @@ X11_CreateWindow(_THIS, SDL_Window * window)
xattr.border_pixel = 0; xattr.border_pixel = 0;
if (visual->class == DirectColor) { if (visual->class == DirectColor) {
Status status;
XColor *colorcells; XColor *colorcells;
int i; int i;
int ncolors; int ncolors;
...@@ -757,7 +731,6 @@ X11_SetWindowPosition(_THIS, SDL_Window * window) ...@@ -757,7 +731,6 @@ X11_SetWindowPosition(_THIS, SDL_Window * window)
{ {
SDL_WindowData *data = (SDL_WindowData *) window->driverdata; SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display; Display *display = data->videodata->display;
int x, y;
XMoveWindow(display, data->xwindow, window->x, window->y); XMoveWindow(display, data->xwindow, window->x, window->y);
XFlush(display); XFlush(display);
...@@ -952,7 +925,7 @@ X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) ...@@ -952,7 +925,7 @@ X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
int ncolors; int ncolors;
int rmask, gmask, bmask; int rmask, gmask, bmask;
int rshift, gshift, bshift; int rshift, gshift, bshift;
int i, j; int i;
if (visual->class != DirectColor) { if (visual->class != DirectColor) {
SDL_SetError("Window doesn't have DirectColor visual"); SDL_SetError("Window doesn't have DirectColor visual");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment