Commit Request - Step 1 Restore Files
Restored files.
This commit is contained in:
@@ -39,12 +39,6 @@ jobs:
|
||||
git submodule update --init --recursive
|
||||
./react-config
|
||||
|
||||
- name: Run frontend lint
|
||||
working-directory: vite
|
||||
run: |
|
||||
npm ci
|
||||
npm run lint -- --fix
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
|
||||
+2
-40
@@ -110,36 +110,6 @@ static void GetCpuFrequency(uint64_t *freqMin, uint64_t *freqMax)
|
||||
*freqMin = fMin;
|
||||
*freqMax = fMax;
|
||||
}
|
||||
static float GetMemoryUsagePercent()
|
||||
{
|
||||
try {
|
||||
std::ifstream f("/proc/meminfo");
|
||||
if (!f.is_open()) return 0.0f;
|
||||
std::string label;
|
||||
uint64_t memTotal = 0;
|
||||
uint64_t memAvailable = 0;
|
||||
while (f >> label)
|
||||
{
|
||||
if (label == "MemTotal:")
|
||||
{
|
||||
f >> memTotal;
|
||||
} else if (label == "MemAvailable:")
|
||||
{
|
||||
f >> memAvailable;
|
||||
} else {
|
||||
std::string rest;
|
||||
std::getline(f, rest);
|
||||
}
|
||||
if (memTotal && memAvailable) break;
|
||||
}
|
||||
if (memTotal == 0) return 0.0f;
|
||||
return (float)(memTotal - memAvailable) * 100.0f / (float)memTotal;
|
||||
} catch (const std::exception &)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
static std::string GetGovernor()
|
||||
{
|
||||
return pipedal::GetCpuGovernor();
|
||||
@@ -2086,8 +2056,6 @@ public:
|
||||
virtual void UpdateServerConfiguration(const JackServerSettings &jackServerSettings,
|
||||
std::function<void(bool success, const std::string &errorMessage)> onComplete)
|
||||
{
|
||||
|
||||
|
||||
std::lock_guard guard(restart_mutex);
|
||||
RestartThread *pShutdown = new RestartThread(this, jackServerSettings, onComplete);
|
||||
restartThreads.push_back(pShutdown);
|
||||
@@ -2151,13 +2119,8 @@ public:
|
||||
|
||||
if (this->audioDriver != nullptr)
|
||||
{
|
||||
result.cpuUsage_ = audioDriver->CpuUse();
|
||||
if (!std::isfinite(result.cpuUsage_))
|
||||
{
|
||||
result.cpuUsage_ = 0.0f;
|
||||
}
|
||||
result.cpuUsage_ = audioDriver->CpuUse();
|
||||
}
|
||||
result.memoryUsage_ = GetMemoryUsagePercent();
|
||||
GetCpuFrequency(&result.cpuFreqMin_, &result.cpuFreqMax_);
|
||||
result.hasCpuGovernor_ = HasCpuGovernor();
|
||||
if (result.hasCpuGovernor_)
|
||||
@@ -2357,11 +2320,10 @@ JSON_MAP_REFERENCE(JackHostStatus, errorMessage)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, restarting)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, underruns)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, cpuUsage)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, memoryUsage)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, msSinceLastUnderrun)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, temperaturemC)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, cpuFreqMin)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, cpuFreqMax)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, hasCpuGovernor)
|
||||
JSON_MAP_REFERENCE(JackHostStatus, governor)
|
||||
JSON_MAP_END()
|
||||
JSON_MAP_END()
|
||||
|
||||
@@ -191,7 +191,6 @@ namespace pipedal
|
||||
bool restarting_;
|
||||
uint64_t underruns_;
|
||||
float cpuUsage_ = 0;
|
||||
float memoryUsage_ = 0;
|
||||
uint64_t msSinceLastUnderrun_ = 0;
|
||||
int32_t temperaturemC_ = -100000;
|
||||
uint64_t cpuFreqMax_ = 0;
|
||||
|
||||
@@ -81,21 +81,6 @@ namespace pipedal
|
||||
|
||||
bool IsValid() const { return valid_; }
|
||||
|
||||
// Legacy constructor used by tests prior to the addition of
|
||||
// separate input and output ALSA devices.
|
||||
// JackServerSettings(const std::string &device,
|
||||
// uint64_t sampleRate,
|
||||
// uint32_t bufferSize,
|
||||
// uint32_t numberOfBuffers)
|
||||
// {
|
||||
// this->valid_ = true;
|
||||
// this->rebootRequired_ = true;
|
||||
// this->alsaInputDevice_ = device;
|
||||
// this->alsaOutputDevice_ = device;
|
||||
// this->sampleRate_ = sampleRate;
|
||||
// this->bufferSize_ = bufferSize;
|
||||
// this->numberOfBuffers_ = numberOfBuffers;
|
||||
// }
|
||||
void WriteDaemonConfig(); // requires root perms.
|
||||
void SetRebootRequired(bool value)
|
||||
{
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
|
||||
|
||||
interface AlsaDeviceInfoJson {
|
||||
cardId: number;
|
||||
id: string;
|
||||
name: string;
|
||||
longName: string;
|
||||
sampleRates: number[];
|
||||
minBufferSize: number;
|
||||
maxBufferSize: number;
|
||||
supportsCapture?: boolean;
|
||||
supportsPlayback?: boolean;
|
||||
}
|
||||
|
||||
export default class AlsaDeviceInfo {
|
||||
deserialize(input: AlsaDeviceInfoJson): AlsaDeviceInfo {
|
||||
deserialize(input: any): AlsaDeviceInfo {
|
||||
this.cardId = input.cardId;
|
||||
this.id = input.id;
|
||||
this.name = input.name;
|
||||
@@ -21,11 +9,9 @@ export default class AlsaDeviceInfo {
|
||||
this.sampleRates = input.sampleRates as number[];
|
||||
this.minBufferSize = input.minBufferSize;
|
||||
this.maxBufferSize = input.maxBufferSize;
|
||||
this.supportsCapture = input.supportsCapture ? true : false;
|
||||
this.supportsPlayback = input.supportsPlayback ? true : false;
|
||||
return this;
|
||||
}
|
||||
static deserialize_array(input: AlsaDeviceInfoJson[]): AlsaDeviceInfo[]
|
||||
static deserialize_array(input: any): AlsaDeviceInfo[]
|
||||
{
|
||||
let result: AlsaDeviceInfo[] = [];
|
||||
for (let i = 0; i < input.length; ++i)
|
||||
@@ -76,7 +62,5 @@ export default class AlsaDeviceInfo {
|
||||
longName: string = "";
|
||||
sampleRates: number[] = [];
|
||||
minBufferSize: number = 0;
|
||||
maxBufferSize: number = 0;
|
||||
supportsCapture: boolean = false;
|
||||
supportsPlayback: boolean = false;
|
||||
maxBufferSize: number = 0;
|
||||
};
|
||||
@@ -22,18 +22,13 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
interface AlsaMidiDeviceInfoJson {
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export class AlsaMidiDeviceInfo {
|
||||
deserialize(input: AlsaMidiDeviceInfoJson) : AlsaMidiDeviceInfo{
|
||||
deserialize(input: any) : AlsaMidiDeviceInfo{
|
||||
this.name = input.name;
|
||||
this.description = input.description;
|
||||
return this;
|
||||
}
|
||||
static deserializeArray(input: AlsaMidiDeviceInfoJson[]): AlsaMidiDeviceInfo[] {
|
||||
static deserializeArray(input: any[]): AlsaMidiDeviceInfo[] {
|
||||
let result: AlsaMidiDeviceInfo[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaMidiDeviceInfo().deserialize(input[i]);
|
||||
|
||||
@@ -17,20 +17,14 @@
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
interface AlsaSequencerPortSelectionJson {
|
||||
id: string;
|
||||
name: string;
|
||||
sortOrder: number;
|
||||
}
|
||||
|
||||
export class AlsaSequencerPortSelection {
|
||||
deserialize(json: AlsaSequencerPortSelectionJson) {
|
||||
deserialize(json: any) {
|
||||
this.id = json.id;
|
||||
this.name = json.name;
|
||||
this.sortOrder = json.sortOrder;
|
||||
return this;
|
||||
};
|
||||
static deserialize_array(input: AlsaSequencerPortSelectionJson[]): AlsaSequencerPortSelection[] {
|
||||
static deserialize_array(input: any): AlsaSequencerPortSelection[] {
|
||||
let result: AlsaSequencerPortSelection[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaSequencerPortSelection().deserialize(input[i]);
|
||||
@@ -42,16 +36,12 @@ export class AlsaSequencerPortSelection {
|
||||
sortOrder: number = 0;
|
||||
};
|
||||
|
||||
interface AlsaSequencerConfigurationJson {
|
||||
connections: AlsaSequencerPortSelectionJson[];
|
||||
}
|
||||
|
||||
export class AlsaSequencerConfiguration {
|
||||
deserialize(input: AlsaSequencerConfigurationJson) {
|
||||
deserialize(input: any) {
|
||||
this.connections = AlsaSequencerPortSelection.deserialize_array(input.connections);
|
||||
return this;
|
||||
}
|
||||
deserialize_array(input: AlsaSequencerConfigurationJson[]): AlsaSequencerConfiguration[] {
|
||||
deserialize_array(input: any): AlsaSequencerConfiguration[] {
|
||||
let result: AlsaSequencerConfiguration[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaSequencerConfiguration().deserialize(input[i]);
|
||||
|
||||
@@ -705,9 +705,6 @@ const SettingsDialog = withStyles(
|
||||
showJackServerSettingsDialog: false,
|
||||
jackServerSettings: jackServerSettings
|
||||
});
|
||||
// Apply immediately so the audio driver is
|
||||
// restarted with the chosen devices before
|
||||
// saving the settings.
|
||||
this.model.setJackServerSettings(jackServerSettings);
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user