| @@ -163,16 +163,14 @@ public: | |||||
| source.read (&data, 0, length + 4, 0, true, true); | source.read (&data, 0, length + 4, 0, true, true); | ||||
| } | } | ||||
| double getSampleRate() const { return sourceSampleRate; } | |||||
| int getLength() const { return length; } | |||||
| const AudioSampleBuffer& getBuffer() const { return data; } | |||||
| double getSampleRate() const { return sourceSampleRate; } | |||||
| int getLength() const { return length; } | |||||
| const AudioBuffer<float>& getBuffer() const { return data; } | |||||
| private: | private: | ||||
| double sourceSampleRate; | double sourceSampleRate; | ||||
| int length; | int length; | ||||
| AudioSampleBuffer data; | |||||
| AudioBuffer<float> data; | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -150,7 +150,7 @@ static String getAllSystemInfo() | |||||
| << "Memory size: " << SystemStats::getMemorySizeInMegabytes() << " MB" << newLine | << "Memory size: " << SystemStats::getMemorySizeInMegabytes() << " MB" << newLine | ||||
| << "CPU vendor: " << SystemStats::getCpuVendor() << newLine | << "CPU vendor: " << SystemStats::getCpuVendor() << newLine | ||||
| << "CPU model: " << SystemStats::getCpuModel() << newLine | << "CPU model: " << SystemStats::getCpuModel() << newLine | ||||
| << "CPU speed: " << SystemStats::getCpuSpeedInMegaherz() << " MHz" << newLine | |||||
| << "CPU speed: " << SystemStats::getCpuSpeedInMegahertz() << " MHz" << newLine | |||||
| << "CPU has MMX: " << (SystemStats::hasMMX() ? "yes" : "no") << newLine | << "CPU has MMX: " << (SystemStats::hasMMX() ? "yes" : "no") << newLine | ||||
| << "CPU has SSE: " << (SystemStats::hasSSE() ? "yes" : "no") << newLine | << "CPU has SSE: " << (SystemStats::hasSSE() ? "yes" : "no") << newLine | ||||
| << "CPU has SSE2: " << (SystemStats::hasSSE2() ? "yes" : "no") << newLine | << "CPU has SSE2: " << (SystemStats::hasSSE2() ? "yes" : "no") << newLine | ||||
| @@ -77,7 +77,7 @@ void ProjucerApplication::initialise (const String& commandLine) | |||||
| { | { | ||||
| initialiseLogger ("IDE_Log_"); | initialiseLogger ("IDE_Log_"); | ||||
| Logger::writeToLog (SystemStats::getOperatingSystemName()); | Logger::writeToLog (SystemStats::getOperatingSystemName()); | ||||
| Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegaherz()) | |||||
| Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegahertz()) | |||||
| + "MHz Cores: " + String (SystemStats::getNumCpus()) | + "MHz Cores: " + String (SystemStats::getNumCpus()) | ||||
| + " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB"); | + " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB"); | ||||
| @@ -433,7 +433,7 @@ String SystemStats::getCpuModel() | |||||
| return readPosixConfigFileValue ("/proc/cpuinfo", "Hardware"); | return readPosixConfigFileValue ("/proc/cpuinfo", "Hardware"); | ||||
| } | } | ||||
| int SystemStats::getCpuSpeedInMegaherz() | |||||
| int SystemStats::getCpuSpeedInMegahertz() | |||||
| { | { | ||||
| int maxFreqKHz = 0; | int maxFreqKHz = 0; | ||||
| @@ -80,7 +80,7 @@ String SystemStats::getCpuModel() | |||||
| return getCpuInfo ("model name"); | return getCpuInfo ("model name"); | ||||
| } | } | ||||
| int SystemStats::getCpuSpeedInMegaherz() | |||||
| int SystemStats::getCpuSpeedInMegahertz() | |||||
| { | { | ||||
| return roundToInt (getCpuInfo ("cpu MHz").getFloatValue()); | return roundToInt (getCpuInfo ("cpu MHz").getFloatValue()); | ||||
| } | } | ||||
| @@ -203,7 +203,7 @@ String SystemStats::getCpuModel() | |||||
| return {}; | return {}; | ||||
| } | } | ||||
| int SystemStats::getCpuSpeedInMegaherz() | |||||
| int SystemStats::getCpuSpeedInMegahertz() | |||||
| { | { | ||||
| uint64 speedHz = 0; | uint64 speedHz = 0; | ||||
| size_t speedSize = sizeof (speedHz); | size_t speedSize = sizeof (speedHz); | ||||
| @@ -386,7 +386,7 @@ static int64 juce_getClockCycleCounter() noexcept | |||||
| #endif | #endif | ||||
| } | } | ||||
| int SystemStats::getCpuSpeedInMegaherz() | |||||
| int SystemStats::getCpuSpeedInMegahertz() | |||||
| { | { | ||||
| const int64 cycles = juce_getClockCycleCounter(); | const int64 cycles = juce_getClockCycleCounter(); | ||||
| const uint32 millis = Time::getMillisecondCounter(); | const uint32 millis = Time::getMillisecondCounter(); | ||||
| @@ -156,7 +156,7 @@ public: | |||||
| @returns the speed in megahertz, e.g. 1500, 2500, 32000 (depending on | @returns the speed in megahertz, e.g. 1500, 2500, 32000 (depending on | ||||
| what year you're reading this...) | what year you're reading this...) | ||||
| */ | */ | ||||
| static int getCpuSpeedInMegaherz(); | |||||
| static int getCpuSpeedInMegahertz(); | |||||
| /** Returns a string to indicate the CPU vendor. | /** Returns a string to indicate the CPU vendor. | ||||
| Might not be known on some systems. | Might not be known on some systems. | ||||
| @@ -199,10 +199,10 @@ public: | |||||
| */ | */ | ||||
| static String getStackBacktrace(); | static String getStackBacktrace(); | ||||
| /** A function type for use in setApplicationCrashHandler(). The parameter will contain | |||||
| platform-specific data about the crash. | |||||
| /** A function type for use in setApplicationCrashHandler(). | |||||
| When called, its void* argument will contain platform-specific data about the crash. | |||||
| */ | */ | ||||
| using CrashHandlerFunction = void (*) (void*); | |||||
| using CrashHandlerFunction = void(*)(void*); | |||||
| /** Sets up a global callback function that will be called if the application | /** Sets up a global callback function that will be called if the application | ||||
| executes some kind of illegal instruction. | executes some kind of illegal instruction. | ||||
| @@ -213,15 +213,17 @@ public: | |||||
| static void setApplicationCrashHandler (CrashHandlerFunction); | static void setApplicationCrashHandler (CrashHandlerFunction); | ||||
| /** Returns true if this code is running inside an app extension sandbox. | /** Returns true if this code is running inside an app extension sandbox. | ||||
| This function will always return false on windows, linux and android. | This function will always return false on windows, linux and android. | ||||
| */ | */ | ||||
| static bool isRunningInAppExtensionSandbox() noexcept; | static bool isRunningInAppExtensionSandbox() noexcept; | ||||
| private: | |||||
| //============================================================================== | //============================================================================== | ||||
| SystemStats(); | |||||
| // This method was spelt wrong! Please change your code to use getCpuSpeedInMegahertz() instead | |||||
| JUCE_DEPRECATED_WITH_BODY (static int getCpuSpeedInMegaherz(), { return getCpuSpeedInMegahertz(); }) | |||||
| private: | |||||
| SystemStats() = delete; // uses only static methods | |||||
| JUCE_DECLARE_NON_COPYABLE (SystemStats) | JUCE_DECLARE_NON_COPYABLE (SystemStats) | ||||
| }; | }; | ||||