Remove cpu runtime checks

This commit is contained in:
Vestral
2022-01-22 20:47:15 +09:00
committed by Megamouse
parent d994965fbb
commit f6a2e1e0b0
3 changed files with 2 additions and 18 deletions

View File

@@ -282,29 +282,20 @@ void * FIRFilter::operator new(size_t)
FIRFilter * FIRFilter::newInstance()
{
uint uExtensions;
uExtensions = detectCPUextensions();
(void)uExtensions;
// Check if MMX/SSE instruction set extensions supported by CPU
#ifdef SOUNDTOUCH_ALLOW_MMX
// MMX routines available only with integer sample types
if (uExtensions & SUPPORT_MMX)
{
return ::new FIRFilterMMX;
}
else
#endif // SOUNDTOUCH_ALLOW_MMX
#ifdef SOUNDTOUCH_ALLOW_SSE
if (uExtensions & SUPPORT_SSE)
{
// SSE support
return ::new FIRFilterSSE;
}
else
#endif // SOUNDTOUCH_ALLOW_SSE
{

View File

@@ -750,30 +750,21 @@ void * TDStretch::operator new(size_t)
TDStretch * TDStretch::newInstance()
{
uint uExtensions;
uExtensions = detectCPUextensions();
(void)uExtensions;
// Check if MMX/SSE instruction set extensions supported by CPU
#ifdef SOUNDTOUCH_ALLOW_MMX
// MMX routines available only with integer sample types
if (uExtensions & SUPPORT_MMX)
{
return ::new TDStretchMMX;
}
else
#endif // SOUNDTOUCH_ALLOW_MMX
#ifdef SOUNDTOUCH_ALLOW_SSE
if (uExtensions & SUPPORT_SSE)
{
// SSE support
return ::new TDStretchSSE;
}
else
#endif // SOUNDTOUCH_ALLOW_SSE
{

View File

@@ -33,6 +33,7 @@
//
////////////////////////////////////////////////////////////////////////////////
#if 0
#ifndef _CPU_DETECT_H_
#define _CPU_DETECT_H_
@@ -53,3 +54,4 @@ uint detectCPUextensions(void);
void disableExtensions(uint wDisableMask);
#endif // _CPU_DETECT_H_
#endif