Mixer engine: output routing, full state restore, MIDI learn API, PipeWire multi-channel support
This commit is contained in:
@@ -87,6 +87,17 @@ public:
|
||||
/// Get the full mixer state as a JSON string
|
||||
std::string getStateJson() const;
|
||||
|
||||
/// --- Output Routing ---
|
||||
|
||||
/// Get output routes as a JSON array string
|
||||
std::string getOutputRoutesJson() const;
|
||||
|
||||
/// Set output routes from a JSON array string
|
||||
void setOutputRoutesFromJson(const std::string& json);
|
||||
|
||||
/// Apply a full mixer state from a JSON string
|
||||
void setFullState(const std::string& stateJson);
|
||||
|
||||
/// --- Scenes ---
|
||||
|
||||
/// Save current mixer state as a scene
|
||||
@@ -101,6 +112,52 @@ public:
|
||||
/// Delete a scene
|
||||
bool deleteScene(const std::string& sceneId);
|
||||
|
||||
/// --- MIDI Control Surface Mapping ---
|
||||
|
||||
/// Get all MIDI mappings as JSON
|
||||
std::string getMidiMappingsJson() const;
|
||||
|
||||
/// Set all MIDI mappings from JSON
|
||||
void setMidiMappingsFromJson(const std::string& json);
|
||||
|
||||
/// Add a single MIDI mapping
|
||||
void addMidiMapping(int midiChannel, int ccNumber,
|
||||
const std::string& targetType, int64_t targetId,
|
||||
float minValue, float maxValue);
|
||||
|
||||
/// Remove MIDI mapping by CC and channel
|
||||
void removeMidiMapping(int midiChannel, int ccNumber);
|
||||
|
||||
/// Remove MIDI mapping by index
|
||||
void removeMidiMappingByIndex(size_t index);
|
||||
|
||||
/// Clear all MIDI mappings
|
||||
void clearMidiMappings();
|
||||
|
||||
/// Toggle MIDI learn mode
|
||||
void setMidiLearnMode(bool enabled);
|
||||
bool getMidiLearnMode() const;
|
||||
|
||||
/// Set the pending learn target (which UI control was touched)
|
||||
void setMidiLearnTarget(const std::string& targetType, int64_t targetId);
|
||||
|
||||
/// Commit a learned mapping (captured CC + pending target)
|
||||
bool commitMidiLearnMapping();
|
||||
|
||||
/// Get last learned CC event info (for UI feedback)
|
||||
struct LearnedEventInfo {
|
||||
bool hasEvent = false;
|
||||
int midiChannel = -1;
|
||||
int ccNumber = -1;
|
||||
};
|
||||
LearnedEventInfo getLastLearnedMidiEvent() const;
|
||||
|
||||
/// Save MIDI mappings to config file
|
||||
void saveMidiMappingsToFile() const;
|
||||
|
||||
/// Load MIDI mappings from config file
|
||||
void loadMidiMappingsFromFile();
|
||||
|
||||
private:
|
||||
MixerEngine* mixerEngine_ = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user