30 |
|
|
31 |
namespace LinuxSampler { namespace gig { |
namespace LinuxSampler { namespace gig { |
32 |
|
|
33 |
|
/** @brief Synthesis Profiler |
34 |
|
* |
35 |
|
* Provides a benchmark algorithm to return a somewhat abstract Bogo |
36 |
|
* Voices value to reflect the voice count limit of the running system |
37 |
|
* with the given instrument patch und circumstances. Note that the |
38 |
|
* real voice count limitation will in practice be lower than this Bogo |
39 |
|
* Voice value. |
40 |
|
*/ |
41 |
class Profiler { |
class Profiler { |
42 |
public: |
public: |
43 |
static void Reset( void ) |
static void Reset(); |
44 |
{ |
|
45 |
profilingSamples = 0; |
static void enable(); |
46 |
profilingTime = 0; |
|
47 |
} |
static bool isEnabled() { |
48 |
|
return bEnabled; |
49 |
|
} |
50 |
|
|
51 |
static unsigned int GetBogoVoices( unsigned int SamplingFreq ); |
static unsigned int GetBogoVoices( unsigned int SamplingFreq ); |
52 |
|
|
69 |
static unsigned long long profilingSamples; |
static unsigned long long profilingSamples; |
70 |
static unsigned long long profilingTime; |
static unsigned long long profilingTime; |
71 |
static double tsPerSecond; |
static double tsPerSecond; |
72 |
|
static bool bEnabled; |
73 |
}; |
}; |
74 |
|
|
75 |
}} // namespace LinuxSampler::gig |
}} // namespace LinuxSampler::gig |