|
From: <man...@us...> - 2013-04-12 15:13:21
|
Revision: 1859
http://sourceforge.net/p/modplug/code/1859
Author: manxorist
Date: 2013-04-12 15:13:14 +0000 (Fri, 12 Apr 2013)
Log Message:
-----------
[Ref] Only use X86_Dither if compiled with ENABLE_X86.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Fastmix.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/Waveform.cpp
Modified: trunk/OpenMPT/soundlib/Fastmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-12 14:57:05 UTC (rev 1858)
+++ trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-12 15:13:14 UTC (rev 1859)
@@ -2069,6 +2069,8 @@
#pragma warning(disable:4731) // ebp modified
+
+#ifdef ENABLE_X86
void MPPASMCALL X86_Dither(int *pBuffer, UINT nSamples, UINT nBits)
//-----------------------------------------------------------------
{
@@ -2116,6 +2118,7 @@
mov gDitherB, ebx
}
}
+#endif
void MPPASMCALL X86_InterleaveFrontRear(int *pFrontBuf, int *pRearBuf, DWORD nSamples)
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2013-04-12 14:57:05 UTC (rev 1858)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2013-04-12 15:13:14 UTC (rev 1859)
@@ -40,8 +40,9 @@
extern DWORD MPPASMCALL X86_Convert32To24(LPVOID lpBuffer, int *, DWORD nSamples);
extern DWORD MPPASMCALL X86_Convert32To32(LPVOID lpBuffer, int *, DWORD nSamples);
extern DWORD MPPASMCALL Convert32ToFloat32(LPVOID lpBuffer, int *pBuffer, DWORD lSampleCount);
-extern UINT MPPASMCALL X86_AGC(int *pBuffer, UINT nSamples, UINT nAGC);
+#ifdef ENABLE_X86
extern VOID MPPASMCALL X86_Dither(int *pBuffer, UINT nSamples, UINT nBits);
+#endif
extern VOID MPPASMCALL X86_InterleaveFrontRear(int *pFrontBuf, int *pRearBuf, DWORD nSamples);
extern VOID MPPASMCALL X86_StereoFill(int *pBuffer, UINT nSamples, LPLONG lpROfs, LPLONG lpLOfs);
extern VOID MPPASMCALL X86_MonoFromStereo(int *pMixBuf, UINT nSamples);
@@ -330,12 +331,14 @@
lTotalSampleCount *= 2;
}
+#ifdef ENABLE_X86
// Noise Shaping
if (m_MixerSettings.GetBitsPerSample() <= 16)
{
if(m_Resampler.IsHQ())
X86_Dither(MixSoundBuffer, lTotalSampleCount, m_MixerSettings.GetBitsPerSample());
}
+#endif
#ifdef MODPLUG_TRACKER
// Hook Function
Modified: trunk/OpenMPT/soundlib/Waveform.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Waveform.cpp 2013-04-12 14:57:05 UTC (rev 1858)
+++ trunk/OpenMPT/soundlib/Waveform.cpp 2013-04-12 15:13:14 UTC (rev 1859)
@@ -12,7 +12,7 @@
#include "stdafx.h"
#include "sndfile.h"
-#ifdef ENABLE_ASM
+#ifdef ENABLE_X86
#pragma warning(disable:4100)
#pragma warning(disable:4731)
@@ -53,7 +53,9 @@
#endif
+#ifdef ENABLE_X86
extern void MPPASMCALL X86_Dither(int *pBuffer, UINT nSamples, UINT nBits);
+#endif
extern DWORD MPPASMCALL X86_Convert32To8(LPVOID lpBuffer, int *, DWORD nSamples);
extern DWORD MPPASMCALL X86_Convert32To16(LPVOID lpBuffer, int *, DWORD nSamples);
extern DWORD MPPASMCALL X86_Convert32To24(LPVOID lpBuffer, int *, DWORD nSamples);
@@ -61,7 +63,7 @@
UINT CSoundFile::Normalize24BitBuffer(LPBYTE pbuffer, UINT dwSize, DWORD lmax24, DWORD dwByteInc)
//-----------------------------------------------------------------------------------------------
{
-#ifdef ENABLE_ASM
+#ifdef ENABLE_X86
int * const tempbuf = MixSoundBuffer;
int n = dwSize / 3;
while (n > 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|