Browse Source

Fixed a very old spelling mistake!(SystemStats::getCpuSpeedInMegaherz -> SystemStats::getCpuSpeedInMegahertz)

tags/2021-05-28
jules 7 years ago
parent
commit
abe01671d4
8 changed files with 19 additions and 19 deletions
  1. +4
    -6
      examples/Plugins/SamplerPluginDemo.h
  2. +1
    -1
      examples/Utilities/SystemInfoDemo.h
  3. +1
    -1
      extras/Projucer/Source/Application/jucer_Application.cpp
  4. +1
    -1
      modules/juce_core/native/juce_android_SystemStats.cpp
  5. +1
    -1
      modules/juce_core/native/juce_linux_SystemStats.cpp
  6. +1
    -1
      modules/juce_core/native/juce_mac_SystemStats.mm
  7. +1
    -1
      modules/juce_core/native/juce_win32_SystemStats.cpp
  8. +9
    -7
      modules/juce_core/system/juce_SystemStats.h

+ 4
- 6
examples/Plugins/SamplerPluginDemo.h View File

@@ -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;
}; };
//============================================================================== //==============================================================================


+ 1
- 1
examples/Utilities/SystemInfoDemo.h View File

@@ -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


+ 1
- 1
extras/Projucer/Source/Application/jucer_Application.cpp View File

@@ -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");


+ 1
- 1
modules/juce_core/native/juce_android_SystemStats.cpp View File

@@ -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;


+ 1
- 1
modules/juce_core/native/juce_linux_SystemStats.cpp View File

@@ -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());
} }


+ 1
- 1
modules/juce_core/native/juce_mac_SystemStats.mm View File

@@ -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);


+ 1
- 1
modules/juce_core/native/juce_win32_SystemStats.cpp View File

@@ -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();


+ 9
- 7
modules/juce_core/system/juce_SystemStats.h View File

@@ -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)
}; };


Loading…
Cancel
Save