fix: add comma consumption between positional WS args in mixer handlers

This commit is contained in:
2026-06-20 20:21:16 -04:00
parent 8068f5d168
commit 7f24a0f807
11 changed files with 3108 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
config/config.json
+1 -1
View File
@@ -8,7 +8,7 @@
/* whether to lock a process pages into memroy. should be true unless running on a very memory constrained system. /* whether to lock a process pages into memroy. should be true unless running on a very memory constrained system.
Setting to false will cause unpredictable audio dropouts. Setting to false will cause unpredictable audio dropouts.
*/ */
"mlock": true, "mlock": false,
/* Address on which Piddle listens for websocket connections */ /* Address on which Piddle listens for websocket connections */
"socketServerAddress": "0.0.0.0:8080", "socketServerAddress": "0.0.0.0:8080",
+1
View File
@@ -0,0 +1 @@
../default_presets
+12
View File
@@ -0,0 +1,12 @@
{
"valid": true,
"isOnboarding": false,
"isJackAudio": false,
"alsaInputDevice": "hw:3,0",
"alsaInputDeviceName": "GP-5",
"alsaOutputDevice": "hw:3,0",
"alsaOutputDeviceName": "GP-5",
"sampleRate": 44100,
"bufferSize": 256,
"numberOfBuffers": 3
}
+34
View File
@@ -0,0 +1,34 @@
{
"modified": false,
"preset": {
"name": "Default Preset",
"input_volume_db": 0,
"output_volume_db": 0,
"items": [
{
"instanceId": 1,
"uri": "uri://two-play/pipedal/pedalboard#Empty",
"isEnabled": true,
"controlValues": [],
"pluginName": "",
"midiBindings": [],
"midiChannelBinding": null,
"stateUpdateCount": 0,
"lv2State": [
false,
{}
],
"lilvPresetUri": "",
"pathProperties": {},
"title": "",
"useModUi": false,
"iconColor": "",
"sideChainInputId": -1
}
],
"nextInstanceId": 1,
"snapshots": [],
"selectedSnapshot": -1,
"selectedPlugin": -1
}
}
+1
View File
@@ -0,0 +1 @@
config/iso_codes.json
@@ -0,0 +1 @@
[]
+1
View File
@@ -0,0 +1 @@
config/plugin_classes.json
+5
View File
@@ -37,6 +37,11 @@ void MixerEngine::setSampleRate(uint32_t sampleRate)
void MixerEngine::setMaxBufferSize(size_t frames) void MixerEngine::setMaxBufferSize(size_t frames)
{ {
maxBufferSize_ = frames; maxBufferSize_ = frames;
// Allocate bus buffers for any existing buses (including the master bus
// created in the constructor, which does not have buffers yet).
for (auto& [_, bus] : buses_) {
bus->allocateBuffers(maxBufferSize_);
}
} }
// --- Channel Management --- // --- Channel Management ---
+21
View File
@@ -1234,6 +1234,7 @@ public:
int channelIndex; int channelIndex;
double volume; double volume;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&volume); pReader->read(&volume);
this->mixerApi.setChannelVolume(channelIndex, (float)volume); this->mixerApi.setChannelVolume(channelIndex, (float)volume);
} }
@@ -1244,6 +1245,7 @@ public:
int channelIndex; int channelIndex;
double pan; double pan;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&pan); pReader->read(&pan);
this->mixerApi.setChannelPan(channelIndex, (float)pan); this->mixerApi.setChannelPan(channelIndex, (float)pan);
} }
@@ -1254,6 +1256,7 @@ public:
int channelIndex; int channelIndex;
bool mute; bool mute;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&mute); pReader->read(&mute);
this->mixerApi.setChannelMute(channelIndex, mute); this->mixerApi.setChannelMute(channelIndex, mute);
} }
@@ -1264,6 +1267,7 @@ public:
int channelIndex; int channelIndex;
bool solo; bool solo;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&solo); pReader->read(&solo);
this->mixerApi.setChannelSolo(channelIndex, solo); this->mixerApi.setChannelSolo(channelIndex, solo);
} }
@@ -1274,6 +1278,7 @@ public:
int channelIndex; int channelIndex;
std::string label; std::string label;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&label); pReader->read(&label);
this->mixerApi.setChannelLabel(channelIndex, label); this->mixerApi.setChannelLabel(channelIndex, label);
} }
@@ -1285,7 +1290,9 @@ public:
bool enabled; bool enabled;
double frequency; double frequency;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&enabled); pReader->read(&enabled);
pReader->consume(',');
pReader->read(&frequency); pReader->read(&frequency);
this->mixerApi.setChannelHpf(channelIndex, enabled, (float)frequency); this->mixerApi.setChannelHpf(channelIndex, enabled, (float)frequency);
} }
@@ -1320,6 +1327,7 @@ public:
int64_t busId; int64_t busId;
double volume; double volume;
pReader->read(&busId); pReader->read(&busId);
pReader->consume(',');
pReader->read(&volume); pReader->read(&volume);
this->mixerApi.setBusVolume(busId, (float)volume); this->mixerApi.setBusVolume(busId, (float)volume);
} }
@@ -1330,6 +1338,7 @@ public:
int64_t busId; int64_t busId;
bool mute; bool mute;
pReader->read(&busId); pReader->read(&busId);
pReader->consume(',');
pReader->read(&mute); pReader->read(&mute);
this->mixerApi.setBusMute(busId, mute); this->mixerApi.setBusMute(busId, mute);
} }
@@ -1341,7 +1350,9 @@ public:
int64_t busId; int64_t busId;
double level; double level;
pReader->read(&channelIndex); pReader->read(&channelIndex);
pReader->consume(',');
pReader->read(&busId); pReader->read(&busId);
pReader->consume(',');
pReader->read(&level); pReader->read(&level);
this->mixerApi.routeChannelToBus(channelIndex, busId, (float)level); this->mixerApi.routeChannelToBus(channelIndex, busId, (float)level);
} }
@@ -1353,7 +1364,9 @@ public:
std::string name; std::string name;
int channels; int channels;
pReader->read(&type); pReader->read(&type);
pReader->consume(',');
pReader->read(&name); pReader->read(&name);
pReader->consume(',');
pReader->read(&channels); pReader->read(&channels);
int64_t busId = this->mixerApi.addBus(type, name, channels); int64_t busId = this->mixerApi.addBus(type, name, channels);
this->Reply(replyTo, "mixerAddBus", busId); this->Reply(replyTo, "mixerAddBus", busId);
@@ -1373,6 +1386,7 @@ public:
int64_t sceneId; int64_t sceneId;
std::string name; std::string name;
pReader->read(&sceneId); pReader->read(&sceneId);
pReader->consume(',');
pReader->read(&name); pReader->read(&name);
std::string result = this->mixerApi.saveScene(name); std::string result = this->mixerApi.saveScene(name);
this->JsonReply(replyTo, "mixerSaveScene", result.c_str()); this->JsonReply(replyTo, "mixerSaveScene", result.c_str());
@@ -1442,10 +1456,15 @@ public:
double minValue = 0.0; double minValue = 0.0;
double maxValue = 1.0; double maxValue = 1.0;
pReader->read(&midiChannel); pReader->read(&midiChannel);
pReader->consume(',');
pReader->read(&ccNumber); pReader->read(&ccNumber);
pReader->consume(',');
pReader->read(&targetType); pReader->read(&targetType);
pReader->consume(',');
pReader->read(&targetId); pReader->read(&targetId);
pReader->consume(',');
pReader->read(&minValue); pReader->read(&minValue);
pReader->consume(',');
pReader->read(&maxValue); pReader->read(&maxValue);
this->mixerApi.addMidiMapping( this->mixerApi.addMidiMapping(
midiChannel, ccNumber, targetType, targetId, midiChannel, ccNumber, targetType, targetId,
@@ -1458,6 +1477,7 @@ public:
int midiChannel; int midiChannel;
int ccNumber; int ccNumber;
pReader->read(&midiChannel); pReader->read(&midiChannel);
pReader->consume(',');
pReader->read(&ccNumber); pReader->read(&ccNumber);
this->mixerApi.removeMidiMapping(midiChannel, ccNumber); this->mixerApi.removeMidiMapping(midiChannel, ccNumber);
} }
@@ -1482,6 +1502,7 @@ public:
std::string targetType; std::string targetType;
int64_t targetId; int64_t targetId;
pReader->read(&targetType); pReader->read(&targetType);
pReader->consume(',');
pReader->read(&targetId); pReader->read(&targetId);
this->mixerApi.setMidiLearnTarget(targetType, targetId); this->mixerApi.setMidiLearnTarget(targetType, targetId);
} }
File diff suppressed because it is too large Load Diff