ref: 0ae7a5a616127349a3a14c77ccaf8ab49a05b924
parent: 48af8f2a6f60a3598a3186f16008848edf5f66e9
parent: d7cf30f8e9393af9a83fbdfa2f7e07a9fabff072
author: qwx <qwx@sciops.net>
date: Sun Jan 28 11:37:40 EST 2024
sync upstream
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
*.recipe
*.iobj
*.enc
+release/macos/ft2-clone-macos.app/Contents/MacOS/ft2-clone-macos
--- a/HOW-TO-COMPILE.txt
+++ b/HOW-TO-COMPILE.txt
@@ -10,12 +10,16 @@
Ubuntu/Debian and similar: build-essential libsdl2-dev
Fedora: gcc gcc-c++ alsa-lib-devel SDL2-devel
Others: www.google.com (you want gcc, g++ (or c++), alsa dev and SDL2 dev)
- 2. Compile the FT2 clone: (folder: "ft2-clone")
- chmod +x make-linux.sh (only needed once)
+ 2. Compile the FT2 clone for command line: (folder: "ft2-clone")
+ chmod +x make-linux.sh (only needed once)
./make-linux.sh
-
+ Compile the FT2 clone as an AppImage:
+ chmod +x make-linux-appimage.sh
+ ./make-linux-appimage.sh
+
Note: If you don't have libstdc++ and/or can't compile rtmidi, try running
- make-linux-nomidi.sh instead.
+ make-linux-nomidi-noflac.sh or make-linux-appimage-nomidi-noflac.sh
+ instead.
Known issues: Audio recording (sampling) can update VERY slowly or not work at
all... I have no idea why, it works really well on Windows/maCOS.
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
BSD 3-Clause License
-Copyright (c) 2016-2023, Olav Sørensen
+Copyright (c) 2016-2024, Olav Sørensen
All rights reserved.
Redistribution and use in source and binary forms, with or without
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
If these don't work for you, you'll have to compile the code manually.
# Improvements over original DOS version
-- The channel resampler/mixer uses floating-point arithmetics for less errors, and has a high-quality interpolation option (8-point and 16-point windowed-sinc)
+- The channel resampler/mixer uses floating-point arithmetics for less errors, and has extra interpolation options (4-point cubic spline, 8-point/16-point windowed-sinc)
- The sample loader supports FLAC/AIFF samples and more WAV types than original FT2. It will also attempt to tune the sample (finetune and rel. note) to its playback frequency on load.
- It contains a new "Trim" feature, which will remove unused stuff to potentially make the module smaller
- Drag n' drop of modules/samples
--- /dev/null
+++ b/make-linux-appimage-nomidi-noflac.sh
@@ -1,0 +1,33 @@
+#!/bin/bash
+
+LINUXDEPLOY="linuxdeploy-$(uname -m).AppImage"
+BUILDDIR="release/linux"
+
+rm "$BUILDDIR/$LINUXDEPLOY" &>/dev/null
+rm "$BUILDDIR/ft2-clone.desktop" &>/dev/null
+rm -r "$BUILDDIR/ft2-clone.AppDir" &> /dev/null
+echo Compiling, please wait patiently...
+
+mkdir -p "$BUILDDIR/ft2-clone.AppDir/usr/bin" || exit 1
+
+gcc -DNDEBUG src/gfxdata/*.c src/mixer/*.c src/scopes/*.c src/modloaders/*.c src/smploaders/*.c src/*.c -lSDL2 -lm -Wshadow -Winit-self -Wall -Wno-missing-field-initializers -Wno-unused-result -Wno-strict-aliasing -Wextra -Wunused -Wunreachable-code -Wswitch-default -Wno-stringop-overflow -O3 -o "$BUILDDIR//ft2-clone.AppDir/usr/bin/ft2-clone" || exit 1
+
+rm src/rtmidi/*.o src/gfxdata/*.o src/*.o &> /dev/null
+
+curl "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LINUXDEPLOY" -L -o "$BUILDDIR/$LINUXDEPLOY" || exit 1
+chmod +x "$BUILDDIR/$LINUXDEPLOY" || exit 1
+
+cat >"$BUILDDIR/ft2-clone.desktop" <<EOF
+[Desktop Entry]
+Name=ft2-clone
+Exec=ft2-clone
+Icon=ft2-clone
+Type=Application
+Categories=Audio;AudioVideo;
+EOF
+
+ROOTDIR="$PWD"
+cd "$BUILDDIR"
+"./$LINUXDEPLOY" --appdir ft2-clone.AppDir --output appimage --icon-file "$ROOTDIR/src/gfxdata/icon/ft2-clone.png" --icon-filename "ft2-clone" --desktop-file "ft2-clone.desktop" || exit 1
+
+echo Done. The AppImage can be found at \'$BUILDDIR/ft2-clone-$(uname -m).AppImage\' if everything went well.
--- /dev/null
+++ b/make-linux-appimage.sh
@@ -1,0 +1,33 @@
+#!/bin/bash
+
+LINUXDEPLOY="linuxdeploy-$(uname -m).AppImage"
+BUILDDIR="release/linux"
+
+rm "$BUILDDIR/$LINUXDEPLOY" &>/dev/null
+rm "$BUILDDIR/ft2-clone.desktop" &>/dev/null
+rm -r "$BUILDDIR/ft2-clone.AppDir" &> /dev/null
+echo Compiling, please wait patiently...
+
+mkdir -p "$BUILDDIR/ft2-clone.AppDir/usr/bin" || exit 1
+
+gcc -DNDEBUG -DHAS_MIDI -D__LINUX_ALSA__ -DHAS_LIBFLAC src/rtmidi/*.cpp src/gfxdata/*.c src/mixer/*.c src/scopes/*.c src/modloaders/*.c src/smploaders/*.c src/libflac/*.c src/*.c -lSDL2 -lpthread -lasound -lstdc++ -lm -Wshadow -Winit-self -Wall -Wno-missing-field-initializers -Wno-unused-result -Wno-strict-aliasing -Wextra -Wunused -Wunreachable-code -Wswitch-default -Wno-stringop-overflow -O3 -o "$BUILDDIR/ft2-clone.AppDir/usr/bin/ft2-clone" || exit 1
+
+rm src/rtmidi/*.o src/gfxdata/*.o src/*.o &> /dev/null
+
+curl "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LINUXDEPLOY" -L -o "$BUILDDIR/$LINUXDEPLOY" || exit 1
+chmod +x "$BUILDDIR/$LINUXDEPLOY" || exit 1
+
+cat >"$BUILDDIR/ft2-clone.desktop" <<EOF
+[Desktop Entry]
+Name=ft2-clone
+Exec=ft2-clone
+Icon=ft2-clone
+Type=Application
+Categories=Audio;AudioVideo;
+EOF
+
+ROOTDIR="$PWD"
+cd "$BUILDDIR"
+"./$LINUXDEPLOY" --appdir ft2-clone.AppDir --output appimage --icon-file "$ROOTDIR/src/gfxdata/icon/ft2-clone.png" --icon-filename "ft2-clone" --desktop-file "ft2-clone.desktop" || exit 1
+
+echo Done. The AppImage can be found at \'$BUILDDIR/ft2-clone-$(uname -m).AppImage\' if everything went well.
--- a/mkfile.plan9
+++ b/mkfile.plan9
@@ -48,7 +48,6 @@
src/ft2_video.h\
src/ft2_wav_renderer.h\
src/helpdata/ft2_help_data.h\
- src/mixer/ft2_center_mix.h\
src/mixer/ft2_cubic_spline.h\
src/mixer/ft2_mix.h\
src/mixer/ft2_mix_macros.h\
@@ -108,7 +107,6 @@
src/gfxdata/ft2_bmp_mouse.$O\
src/gfxdata/ft2_bmp_nibbles.$O\
src/gfxdata/ft2_bmp_scopes.$O\
- src/mixer/ft2_center_mix.$O\
src/mixer/ft2_cubic_spline.$O\
src/mixer/ft2_mix.$O\
src/mixer/ft2_silence_mix.$O\
--- a/release/LICENSES.txt
+++ b/release/LICENSES.txt
@@ -2,7 +2,7 @@
---------------------- Source code (BSD 3-clause license) ----------------------
--------------------------------------------------------------------------------
-Copyright (c) 2016-2023, Olav Sørensen
+Copyright (c) 2016-2024, Olav Sørensen
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -99,7 +99,7 @@
------------------------ SDL (Simple DirectMedia Layer) ------------------------
--------------------------------------------------------------------------------
-Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
+Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/release/linux/.gitignore
@@ -1,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
--- a/src/LICENSE.txt
+++ b/src/LICENSE.txt
@@ -1,6 +1,6 @@
BSD 3-clause license:
-Copyright (c) 2016-2023, Olav S�rensen
+Copyright (c) 2016-2024, Olav S�rensen
All rights reserved.
Redistribution and use in source and binary forms, with or without
--- a/src/ft2_audio.c
+++ b/src/ft2_audio.c
@@ -16,7 +16,6 @@
#include "ft2_tables.h"
#include "ft2_structs.h"
#include "mixer/ft2_mix.h"
-#include "mixer/ft2_center_mix.h"
#include "mixer/ft2_silence_mix.h"
// hide POSIX warnings
@@ -463,32 +462,15 @@
{
if (v->active)
{
- bool centerMixFlag;
-
const bool volRampFlag = (v->volumeRampLength > 0);
- if (volRampFlag)
- {
- centerMixFlag = (v->fTargetVolumeL == v->fTargetVolumeR) && (v->fVolumeLDelta == v->fVolumeRDelta);
- }
- else // no volume ramping active
- {
- if (v->fCurrVolumeL == 0.0f && v->fCurrVolumeR == 0.0f)
- {
- silenceMixRoutine(v, samplesToMix);
- continue;
- }
-
- centerMixFlag = (v->fCurrVolumeL == v->fCurrVolumeR);
- }
-
- mixFuncTab[((int32_t)centerMixFlag * (3*5*2*2)) + ((int32_t)volRampFlag * (3*5*2)) + v->mixFuncOffset](v, bufferPosition, samplesToMix);
+ if (!volRampFlag && v->fCurrVolumeL == 0.0f && v->fCurrVolumeR == 0.0f)
+ silenceMixRoutine(v, samplesToMix);
+ else
+ mixFuncTab[((int32_t)volRampFlag * (3*5*2)) + v->mixFuncOffset](v, bufferPosition, samplesToMix);
}
if (r->active) // volume ramp fadeout-voice
- {
- const bool centerMixFlag = (r->fTargetVolumeL == r->fTargetVolumeR) && (r->fVolumeLDelta == r->fVolumeRDelta);
- mixFuncTab[((int32_t)centerMixFlag * (3*5*2*2)) + (3*5*2) + r->mixFuncOffset](r, bufferPosition, samplesToMix);
- }
+ mixFuncTab[(3*5*2) + r->mixFuncOffset](r, bufferPosition, samplesToMix);
}
}
--- a/src/ft2_audioselector.c
+++ b/src/ft2_audioselector.c
@@ -267,7 +267,7 @@
strcpy(audio.currOutputDevice, devString);
if (!setNewAudioSettings())
- okBox(0, "System message", "Couldn't open audio input device!", NULL);
+ okBox(0, "System message", "Couldn't open audio output device!", NULL);
else
drawAudioOutputList();
}
--- a/src/ft2_edit.c
+++ b/src/ft2_edit.c
@@ -931,12 +931,15 @@
if (markY1 == markY2 || markY1 > markY2)
return 0;
- if (markX1 >= song.numChannels-1)
- markX1 = song.numChannels-2;
+ if (markX1 > song.numChannels-1)
+ markX1 = song.numChannels-1;
- if (markX2 >= song.numChannels)
- markX2 = (song.numChannels-1)-markX1;
+ if (markX2 > song.numChannels-1)
+ markX2 = song.numChannels-1;
+ if (markX2 < markX1)
+ markX2 = markX1;
+
if (markY1 >= numRows)
markY1 = numRows-1;
@@ -1075,12 +1078,15 @@
if (markY1 == markY2 || markY1 > markY2)
return;
- if (markX1 >= song.numChannels-1)
- markX1 = song.numChannels-2;
+ if (markX1 > song.numChannels-1)
+ markX1 = song.numChannels-1;
- if (markX2 >= song.numChannels)
- markX2 = (song.numChannels-1)-markX1;
+ if (markX2 > song.numChannels-1)
+ markX2 = song.numChannels-1;
+ if (markX2 < markX1)
+ markX2 = markX1;
+
if (markY1 >= numRows)
markY1 = numRows-1;
@@ -1503,12 +1509,15 @@
if (markY1 == markY2 || markY1 > markY2)
return;
- if (markX1 >= song.numChannels-1)
- markX1 = song.numChannels-2;
+ if (markX1 > song.numChannels-1)
+ markX1 = song.numChannels-1;
- if (markX2 >= song.numChannels)
- markX2 = (song.numChannels-1)-markX1;
+ if (markX2 > song.numChannels-1)
+ markX2 = song.numChannels-1;
+ if (markX2 < markX1)
+ markX2 = markX1;
+
if (markY1 >= numRows)
markY1 = numRows-1;
@@ -1562,12 +1571,15 @@
if (markY1 == markY2 || markY1 > markY2)
return;
- if (markX1 >= song.numChannels-1)
- markX1 = song.numChannels-2;
+ if (markX1 > song.numChannels-1)
+ markX1 = song.numChannels-1;
- if (markX2 >= song.numChannels)
- markX2 = (song.numChannels-1)-markX1;
+ if (markX2 > song.numChannels-1)
+ markX2 = song.numChannels-1;
+ if (markX2 < markX1)
+ markX2 = markX1;
+
if (markY1 >= numRows)
markY1 = numRows-1;
@@ -1642,11 +1654,14 @@
if (pattPtr == NULL)
return;
- if (x1 >= song.numChannels-1)
- x1 = song.numChannels-2;
+ if (x1 > song.numChannels-1)
+ x1 = song.numChannels-1;
- if (x2 >= song.numChannels)
- x2 = (song.numChannels-1)-x1;
+ if (x2 > song.numChannels-1)
+ x2 = song.numChannels-1;
+
+ if (x2 < x1)
+ x2 = x1;
const int16_t numRows = patternNumRows[pattNum];
if (y1 >= numRows)
--- a/src/ft2_header.h
+++ b/src/ft2_header.h
@@ -13,7 +13,7 @@
#endif
#include "ft2_replayer.h"
-#define PROG_VER_STR "1.74"
+#define PROG_VER_STR "1.76"
// do NOT change these! It will only mess things up...
--- a/src/gfxdata/icon/LICENSE.txt
+++ b/src/gfxdata/icon/LICENSE.txt
@@ -1,6 +1,6 @@
Someone made this icon for me for free, and I don't really know what license it
-has... This icon is only used for the macOS/Windows release binary, so you can
-simply remove it if it causes issue with licensing.
+has... This icon is only used for the macOS/Windows/Linux release binary, so you
+can simply remove it if it causes issue with licensing.
Other than that, I'm fairly sure the creator would be permissive about its use,
so as long as it's not used under commercial circumstances, it should be fine.
--- a/src/mixer/ft2_center_mix.c
+++ /dev/null
@@ -1,3479 +1,0 @@
-#include <stdint.h>
-#include <stdbool.h>
-#include "ft2_mix_macros.h"
-#include "../ft2_cpu.h"
-
-/* Check out ft2_mix.c for comments on how this works.
-** These are duplicates for center-mixing (slightly faster when it can be used).
-*/
-
-/* ----------------------------------------------------------------------- */
-/* 8-BIT CENTER MIXING ROUTINES */
-/* ----------------------------------------------------------------------- */
-
-void centerMix8bNoLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bBidiLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bNoLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bBidiLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8_BIDI
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- }
- }
-
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bNoLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bBidiLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bNoLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bBidiLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8_BIDI
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- }
- }
-
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bNoLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bBidiLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE8_BIDI
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- }
- }
-
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampNoLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampBidiLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampNoLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampBidiLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8_BIDI
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampNoLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampBidiLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampNoLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampBidiLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8_BIDI
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampNoLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix8bRampBidiLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int8_t *base, *revBase, *smpPtr;
- int8_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE8_BIDI
- PREPARE_TAP_FIX8
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_8BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-/* ----------------------------------------------------------------------- */
-/* 16-BIT CENTER MIXING ROUTINES */
-/* ----------------------------------------------------------------------- */
-
-void centerMix16bNoLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bBidiLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bNoLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bBidiLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16_BIDI
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bNoLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bBidiLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_LINTRP
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bNoLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bBidiLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16_BIDI
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bNoLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bBidiLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO
- GET_MIXER_VARS
- SET_BASE16_BIDI
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampNoLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampBidiLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampNoLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampBidiLoopS8Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16_BIDI
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S8INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampNoLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampBidiLoopLIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16_BIDI
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_LINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampNoLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampBidiLoopS16Intrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16_BIDI
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_S16INTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampNoLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
-
- HANDLE_SAMPLE_END
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS
- }
- }
-
- WRAP_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
-
-void centerMix16bRampBidiLoopCIntrp(voice_t *v, uint32_t bufferPos, uint32_t numSamples)
-{
- const int16_t *base, *revBase, *smpPtr;
- int16_t *smpTapPtr;
- float fSample, *fMixBufferL, *fMixBufferR;
- int32_t position;
- float fVolumeLDelta, fVolumeL;
- uint32_t i, samplesToMix, samplesLeft;
- uintCPUWord_t positionFrac, tmpDelta;
-
- GET_VOL_MONO_RAMP
- GET_MIXER_VARS_MONO_RAMP
- SET_BASE16_BIDI
- PREPARE_TAP_FIX16
-
- samplesLeft = numSamples;
- while (samplesLeft > 0)
- {
- LIMIT_MIX_NUM
- LIMIT_MIX_NUM_MONO_RAMP
- samplesLeft -= samplesToMix;
-
- START_BIDI
- if (v->hasLooped) // the negative interpolation taps need a special case after the sample has looped once
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- else
- {
- for (i = 0; i < (samplesToMix & 3); i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- samplesToMix >>= 2;
- for (i = 0; i < samplesToMix; i++)
- {
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- RENDER_16BIT_SMP_MONO_CINTRP
- VOLUME_RAMPING_MONO
- INC_POS_BIDI
- }
- }
- END_BIDI
-
- WRAP_BIDI_LOOP
- }
-
- SET_VOL_BACK_MONO
- SET_BACK_MIXER_POS
-}
--- a/src/mixer/ft2_mix.c
+++ b/src/mixer/ft2_mix.c
@@ -2,7 +2,6 @@
#include <stdbool.h>
#include "ft2_mix.h"
#include "ft2_mix_macros.h"
-#include "ft2_center_mix.h"
#include "../ft2_cpu.h"
/*
@@ -17,7 +16,7 @@
**
** This file has separate routines for EVERY possible sampling variation:
** Interpolation none/sinc/linear/cubic, volumeramp on/off, 8-bit, 16-bit, no loop, loop, bidi.
-** (36 mixing routines in total + another 36 for center-mixing)
+** (48 mixing routines in total)
**
** Every voice has a function pointer set to the according mixing routine on
** sample trigger (from replayer, but set in audio thread), using a function
@@ -3499,12 +3498,6 @@
const mixFunc mixFuncTab[] =
{
- /*
- ** ---------------------------------
- ** stereo mixing (this file)
- ** ---------------------------------
- */
-
// no volume ramping
// 8-bit
@@ -3575,83 +3568,5 @@
(mixFunc)mix16bRampBidiLoopS16Intrp,
(mixFunc)mix16bRampNoLoopCIntrp,
(mixFunc)mix16bRampLoopCIntrp,
- (mixFunc)mix16bRampBidiLoopCIntrp,
-
- /*
- ** ---------------------------------
- ** center mixing (ft2_center_mix.c)
- ** ---------------------------------
- */
-
- // no volume ramping
-
- // 8-bit
- (mixFunc)centerMix8bNoLoop,
- (mixFunc)centerMix8bLoop,
- (mixFunc)centerMix8bBidiLoop,
- (mixFunc)centerMix8bNoLoopS8Intrp,
- (mixFunc)centerMix8bLoopS8Intrp,
- (mixFunc)centerMix8bBidiLoopS8Intrp,
- (mixFunc)centerMix8bNoLoopLIntrp,
- (mixFunc)centerMix8bLoopLIntrp,
- (mixFunc)centerMix8bBidiLoopLIntrp,
- (mixFunc)centerMix8bNoLoopS16Intrp,
- (mixFunc)centerMix8bLoopS16Intrp,
- (mixFunc)centerMix8bBidiLoopS16Intrp,
- (mixFunc)centerMix8bNoLoopCIntrp,
- (mixFunc)centerMix8bLoopCIntrp,
- (mixFunc)centerMix8bBidiLoopCIntrp,
-
- // 16-bit
- (mixFunc)centerMix16bNoLoop,
- (mixFunc)centerMix16bLoop,
- (mixFunc)centerMix16bBidiLoop,
- (mixFunc)centerMix16bNoLoopS8Intrp,
- (mixFunc)centerMix16bLoopS8Intrp,
- (mixFunc)centerMix16bBidiLoopS8Intrp,
- (mixFunc)centerMix16bNoLoopLIntrp,
- (mixFunc)centerMix16bLoopLIntrp,
- (mixFunc)centerMix16bBidiLoopLIntrp,
- (mixFunc)centerMix16bNoLoopS16Intrp,
- (mixFunc)centerMix16bLoopS16Intrp,
- (mixFunc)centerMix16bBidiLoopS16Intrp,
- (mixFunc)centerMix16bNoLoopCIntrp,
- (mixFunc)centerMix16bLoopCIntrp,
- (mixFunc)centerMix16bBidiLoopCIntrp,
-
- // volume ramping
-
- // 8-bit
- (mixFunc)centerMix8bRampNoLoop,
- (mixFunc)centerMix8bRampLoop,
- (mixFunc)centerMix8bRampBidiLoop,
- (mixFunc)centerMix8bRampNoLoopS8Intrp,
- (mixFunc)centerMix8bRampLoopS8Intrp,
- (mixFunc)centerMix8bRampBidiLoopS8Intrp,
- (mixFunc)centerMix8bRampNoLoopLIntrp,
- (mixFunc)centerMix8bRampLoopLIntrp,
- (mixFunc)centerMix8bRampBidiLoopLIntrp,
- (mixFunc)centerMix8bRampNoLoopS16Intrp,
- (mixFunc)centerMix8bRampLoopS16Intrp,
- (mixFunc)centerMix8bRampBidiLoopS16Intrp,
- (mixFunc)centerMix8bRampNoLoopCIntrp,
- (mixFunc)centerMix8bRampLoopCIntrp,
- (mixFunc)centerMix8bRampBidiLoopCIntrp,
-
- // 16-bit
- (mixFunc)centerMix16bRampNoLoop,
- (mixFunc)centerMix16bRampLoop,
- (mixFunc)centerMix16bRampBidiLoop,
- (mixFunc)centerMix16bRampNoLoopS8Intrp,
- (mixFunc)centerMix16bRampLoopS8Intrp,
- (mixFunc)centerMix16bRampBidiLoopS8Intrp,
- (mixFunc)centerMix16bRampNoLoopLIntrp,
- (mixFunc)centerMix16bRampLoopLIntrp,
- (mixFunc)centerMix16bRampBidiLoopLIntrp,
- (mixFunc)centerMix16bRampNoLoopS16Intrp,
- (mixFunc)centerMix16bRampLoopS16Intrp,
- (mixFunc)centerMix16bRampBidiLoopS16Intrp,
- (mixFunc)centerMix16bRampNoLoopCIntrp,
- (mixFunc)centerMix16bRampLoopCIntrp,
- (mixFunc)centerMix16bRampBidiLoopCIntrp
+ (mixFunc)mix16bRampBidiLoopCIntrp
};
--- a/src/mixer/ft2_mix_macros.h
+++ b/src/mixer/ft2_mix_macros.h
@@ -12,24 +12,14 @@
const float fVolumeL = v->fCurrVolumeL; \
const float fVolumeR = v->fCurrVolumeR;
-#define GET_VOL_MONO \
- const float fVolumeL = v->fCurrVolumeL;
-
#define GET_VOL_RAMP \
fVolumeL = v->fCurrVolumeL; \
fVolumeR = v->fCurrVolumeR;
-#define GET_VOL_MONO_RAMP \
- fVolumeL = v->fCurrVolumeL;
-
#define SET_VOL_BACK \
v->fCurrVolumeL = fVolumeL; \
v->fCurrVolumeR = fVolumeR;
-#define SET_VOL_BACK_MONO \
- v->fCurrVolumeL = fVolumeL; \
- v->fCurrVolumeR = fVolumeL;
-
#define GET_MIXER_VARS \
const uintCPUWord_t delta = v->delta; \
fMixBufferL = audio.fMixBufferL + bufferPos; \
@@ -46,14 +36,6 @@
position = v->position; \
positionFrac = v->positionFrac;
-#define GET_MIXER_VARS_MONO_RAMP \
- const uintCPUWord_t delta = v->delta; \
- fMixBufferL = audio.fMixBufferL + bufferPos; \
- fMixBufferR = audio.fMixBufferR + bufferPos; \
- fVolumeLDelta = v->fVolumeLDelta; \
- position = v->position; \
- positionFrac = v->positionFrac;
-
#define PREPARE_TAP_FIX8 \
const int8_t *loopStartPtr = &v->base8[v->loopStart]; \
const int8_t *leftEdgePtr = loopStartPtr+MAX_LEFT_TAPS;
@@ -93,16 +75,13 @@
v->positionFrac = positionFrac; \
v->position = position;
-/* ----------------------------------------------------------------------- */
-/* SAMPLE RENDERING MACROS */
-/* ----------------------------------------------------------------------- */
-
#define VOLUME_RAMPING \
fVolumeL += fVolumeLDelta; \
fVolumeR += fVolumeRDelta;
-#define VOLUME_RAMPING_MONO \
- fVolumeL += fVolumeLDelta;
+/* ----------------------------------------------------------------------- */
+/* NO INTERPOLATION */
+/* ----------------------------------------------------------------------- */
#define RENDER_8BIT_SMP \
fSample = *smpPtr * (1.0f / 128.0f); \
@@ -109,21 +88,11 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO \
- fSample = (*smpPtr * (1.0f / 128.0f)) * fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP \
fSample = *smpPtr * (1.0f / 32768.0f); \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO \
- fSample = (*smpPtr * (1.0f / 32768.0f)) * fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
/* ----------------------------------------------------------------------- */
/* LINEAR INTERPOLATION */
/* ----------------------------------------------------------------------- */
@@ -144,23 +113,11 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_LINTRP \
- LINEAR_INTERPOLATION(smpPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_LINTRP \
LINEAR_INTERPOLATION(smpPtr, positionFrac, 32768) \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO_LINTRP \
- LINEAR_INTERPOLATION(smpPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
/* ----------------------------------------------------------------------- */
/* CUBIC SPLINE INTERPOLATION */
/* ----------------------------------------------------------------------- */
@@ -172,7 +129,6 @@
** samples are stored according to loop mode (or no loop).
**
** There is also a second special case for the left edge (negative taps) after the sample has looped once.
-**
*/
#if CUBIC_FSHIFT>=0
@@ -200,26 +156,14 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_CINTRP \
- CUBIC_SPLINE_INTERPOLATION(smpPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_CINTRP \
CUBIC_SPLINE_INTERPOLATION(smpPtr, positionFrac, 32768) \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO_CINTRP \
- CUBIC_SPLINE_INTERPOLATION(smpPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
/* Special left-edge case mixers to get proper tap data after one loop cycle.
-** These are only used with cubic interpolation on looped samples.
+** These are only used on looped samples.
*/
#define RENDER_8BIT_SMP_CINTRP_TAP_FIX \
@@ -228,13 +172,6 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_CINTRP_TAP_FIX \
- smpTapPtr = (smpPtr <= leftEdgePtr) ? (int8_t *)&v->leftEdgeTaps8[(int32_t)(smpPtr-loopStartPtr)] : (int8_t *)smpPtr; \
- CUBIC_SPLINE_INTERPOLATION(smpTapPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_CINTRP_TAP_FIX \
smpTapPtr = (smpPtr <= leftEdgePtr) ? (int16_t *)&v->leftEdgeTaps16[(int32_t)(smpPtr-loopStartPtr)] : (int16_t *)smpPtr; \
CUBIC_SPLINE_INTERPOLATION(smpTapPtr, positionFrac, 32768) \
@@ -241,13 +178,6 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO_CINTRP_TAP_FIX \
- smpTapPtr = (smpPtr <= leftEdgePtr) ? (int16_t *)&v->leftEdgeTaps16[(int32_t)(smpPtr-loopStartPtr)] : (int16_t *)smpPtr; \
- CUBIC_SPLINE_INTERPOLATION(smpTapPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
/* ----------------------------------------------------------------------- */
/* WINDOWED-SINC INTERPOLATION */
/* ----------------------------------------------------------------------- */
@@ -259,7 +189,6 @@
** samples are stored according to loop mode (or no loop).
**
** There is also a second special case for the left edge (negative taps) after the sample has looped once.
-**
*/
#if SINC8_FSHIFT>=0
@@ -339,47 +268,23 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_S8INTRP \
- WINDOWED_SINC8_INTERPOLATION(smpPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_S8INTRP \
WINDOWED_SINC8_INTERPOLATION(smpPtr, positionFrac, 32768) \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO_S8INTRP \
- WINDOWED_SINC8_INTERPOLATION(smpPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_8BIT_SMP_S16INTRP \
WINDOWED_SINC16_INTERPOLATION(smpPtr, positionFrac, 128) \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_S16INTRP \
- WINDOWED_SINC16_INTERPOLATION(smpPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_S16INTRP \
WINDOWED_SINC16_INTERPOLATION(smpPtr, positionFrac, 32768) \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO_S16INTRP \
- WINDOWED_SINC16_INTERPOLATION(smpPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
/* Special left-edge case mixers to get proper tap data after one loop cycle.
-** These are only used with sinc interpolation on looped samples.
+** These are only used on looped samples.
*/
#define RENDER_8BIT_SMP_S8INTRP_TAP_FIX \
@@ -388,13 +293,6 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_S8INTRP_TAP_FIX \
- smpTapPtr = (smpPtr <= leftEdgePtr) ? (int8_t *)&v->leftEdgeTaps8[(int32_t)(smpPtr-loopStartPtr)] : (int8_t *)smpPtr; \
- WINDOWED_SINC8_INTERPOLATION(smpTapPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_S8INTRP_TAP_FIX \
smpTapPtr = (smpPtr <= leftEdgePtr) ? (int16_t *)&v->leftEdgeTaps16[(int32_t)(smpPtr-loopStartPtr)] : (int16_t *)smpPtr; \
WINDOWED_SINC8_INTERPOLATION(smpTapPtr, positionFrac, 32768) \
@@ -401,13 +299,6 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_16BIT_SMP_MONO_S8INTRP_TAP_FIX \
- smpTapPtr = (smpPtr <= leftEdgePtr) ? (int16_t *)&v->leftEdgeTaps16[(int32_t)(smpPtr-loopStartPtr)] : (int16_t *)smpPtr; \
- WINDOWED_SINC8_INTERPOLATION(smpTapPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_8BIT_SMP_S16INTRP_TAP_FIX \
smpTapPtr = (smpPtr <= leftEdgePtr) ? (int8_t *)&v->leftEdgeTaps8[(int32_t)(smpPtr-loopStartPtr)] : (int8_t *)smpPtr; \
WINDOWED_SINC16_INTERPOLATION(smpTapPtr, positionFrac, 128) \
@@ -414,25 +305,11 @@
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-#define RENDER_8BIT_SMP_MONO_S16INTRP_TAP_FIX \
- smpTapPtr = (smpPtr <= leftEdgePtr) ? (int8_t *)&v->leftEdgeTaps8[(int32_t)(smpPtr-loopStartPtr)] : (int8_t *)smpPtr; \
- WINDOWED_SINC16_INTERPOLATION(smpTapPtr, positionFrac, 128) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
-
#define RENDER_16BIT_SMP_S16INTRP_TAP_FIX \
smpTapPtr = (smpPtr <= leftEdgePtr) ? (int16_t *)&v->leftEdgeTaps16[(int32_t)(smpPtr-loopStartPtr)] : (int16_t *)smpPtr; \
WINDOWED_SINC16_INTERPOLATION(smpTapPtr, positionFrac, 32768) \
*fMixBufferL++ += fSample * fVolumeL; \
*fMixBufferR++ += fSample * fVolumeR;
-
-#define RENDER_16BIT_SMP_MONO_S16INTRP_TAP_FIX \
- smpTapPtr = (smpPtr <= leftEdgePtr) ? (int16_t *)&v->leftEdgeTaps16[(int32_t)(smpPtr-loopStartPtr)] : (int16_t *)smpPtr; \
- WINDOWED_SINC16_INTERPOLATION(smpTapPtr, positionFrac, 32768) \
- fSample *= fVolumeL; \
- *fMixBufferL++ += fSample; \
- *fMixBufferR++ += fSample;
/* ----------------------------------------------------------------------- */
/* SAMPLES-TO-MIX LIMITING MACROS */
--- a/vs2019_project/ft2-clone/ft2-clone.vcxproj
+++ b/vs2019_project/ft2-clone/ft2-clone.vcxproj
@@ -355,7 +355,6 @@
<ClCompile Include="..\..\src\mixer\ft2_cubic_spline.c" />
<ClCompile Include="..\..\src\mixer\ft2_windowed_sinc.c" />
<ClCompile Include="..\..\src\mixer\ft2_mix.c" />
- <ClCompile Include="..\..\src\mixer\ft2_center_mix.c" />
<ClCompile Include="..\..\src\mixer\ft2_silence_mix.c" />
<ClCompile Include="..\..\src\modloaders\ft2_load_digi.c" />
<ClCompile Include="..\..\src\modloaders\ft2_load_mod.c" />
@@ -431,7 +430,6 @@
<ClInclude Include="..\..\src\mixer\ft2_windowed_sinc.h" />
<ClInclude Include="..\..\src\mixer\ft2_mix.h" />
<ClInclude Include="..\..\src\mixer\ft2_mix_macros.h" />
- <ClInclude Include="..\..\src\mixer\ft2_center_mix.h" />
<ClInclude Include="..\..\src\mixer\ft2_silence_mix.h" />
<ClInclude Include="..\..\src\rtmidi\RtMidi.h" />
<ClInclude Include="..\..\src\rtmidi\rtmidi_c.h" />
--- a/vs2019_project/ft2-clone/ft2-clone.vcxproj.filters
+++ b/vs2019_project/ft2-clone/ft2-clone.vcxproj.filters
@@ -75,9 +75,6 @@
<ClCompile Include="..\..\src\mixer\ft2_mix.c">
<Filter>mixer</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\mixer\ft2_center_mix.c">
- <Filter>mixer</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\mixer\ft2_silence_mix.c">
<Filter>mixer</Filter>
</ClCompile>
@@ -302,9 +299,6 @@
<Filter>mixer</Filter>
</ClInclude>
<ClInclude Include="..\..\src\mixer\ft2_mix_macros.h">
- <Filter>mixer</Filter>
- </ClInclude>
- <ClInclude Include="..\..\src\mixer\ft2_center_mix.h">
<Filter>mixer</Filter>
</ClInclude>
<ClInclude Include="..\..\src\mixer\ft2_silence_mix.h">
--- a/vs2019_project/ft2-clone/sdl/LICENSE.txt
+++ b/vs2019_project/ft2-clone/sdl/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
+Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages