fix: add transport_state_to_string and clock_source_to_string to dispatcher
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
21
dispatcher.c
21
dispatcher.c
@@ -406,6 +406,27 @@ static void* dispatcher_thread_func(void *arg) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ============================================================
|
||||||
|
// Utility functions
|
||||||
|
// ============================================================
|
||||||
|
|
||||||
|
const char* transport_state_to_string(TransportState state) {
|
||||||
|
switch (state) {
|
||||||
|
case TRANSPORT_STOPPED: return "Stopped";
|
||||||
|
case TRANSPORT_PLAYING: return "Playing";
|
||||||
|
case TRANSPORT_PAUSED: return "Paused";
|
||||||
|
default: return "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* clock_source_to_string(ClockSource source) {
|
||||||
|
switch (source) {
|
||||||
|
case CLOCK_SOURCE_INTERNAL: return "Internal";
|
||||||
|
case CLOCK_SOURCE_MIDI: return "MIDI";
|
||||||
|
default: return "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Public API
|
// Public API
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|||||||
@@ -158,6 +158,12 @@ void dispatcher_stop(void);
|
|||||||
// Get current state (thread-safe snapshot)
|
// Get current state (thread-safe snapshot)
|
||||||
AppState dispatcher_get_state(void);
|
AppState dispatcher_get_state(void);
|
||||||
|
|
||||||
|
// ============================================================
|
||||||
|
// Utility functions for state enums
|
||||||
|
// ============================================================
|
||||||
|
const char* transport_state_to_string(TransportState state);
|
||||||
|
const char* clock_source_to_string(ClockSource source);
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Reducer - pure function
|
// Reducer - pure function
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user