sfizz/sources/Globals.h

40 lines
1 KiB
C
Raw Normal View History

2019-07-29 02:13:03 +02:00
#pragma once
namespace sfz
{
2019-07-30 18:26:35 +02:00
namespace config
2019-07-29 02:13:03 +02:00
{
inline constexpr double defaultSampleRate { 48000 };
inline constexpr int defaultSamplesPerBlock { 1024 };
inline constexpr int preloadSize { 32768 };
inline constexpr int numChannels { 2 };
inline constexpr int numVoices { 64 };
inline constexpr int numLoadingThreads { 4 };
inline constexpr int centPerSemitone { 100 };
inline constexpr float virtuallyZero { 0.00005f };
inline constexpr double fastReleaseDuration { 0.01 };
inline constexpr char defineCharacter { '$' };
inline constexpr int oversamplingFactor { 2 };
} // namespace config
2019-07-30 18:26:35 +02:00
} // namespace sfz
2019-08-03 18:14:58 +02:00
enum class SIMD { scalar, sse, neon };
2019-08-04 16:42:44 +02:00
namespace SIMDConfig
2019-07-30 18:26:35 +02:00
{
inline constexpr unsigned int defaultAlignment { 16 };
2019-08-04 16:42:44 +02:00
#if HAVE_X86INTRIN_H || HAVE_INTRIN_H
inline constexpr SIMD supported { SIMD::sse };
#else
inline constexpr SIMD supported {SIMD::scalar};
#endif
2019-07-31 01:45:58 +02:00
} // namespace config
2019-08-03 18:14:58 +02:00
#if HAVE_X86INTRIN_H
#include <x86intrin.h>
2019-08-04 16:07:09 +02:00
#endif
#if HAVE_INTRIN_H
#include <intrin.h>
2019-08-03 18:14:58 +02:00
#endif