Implement configurable system volume following and replace JSON IPC with binary struct. - New Feature: Introduce `system_volume_following` CLI and runtime option. - Enhancement: Extend CLI options, reload, and user‑config APIs to propagate the new flag. - Enhancement: Add `VbxEvent` binary IPC struct and logging macros for better performance. - Enhancement: Add helper to persist system volume following state. - Bug Fix: Remove stale `parse_keyboard_event` prototype.
48 lines
961 B
C
48 lines
961 B
C
#ifndef VBX_AUDIO_TYPES_H
|
|
#define VBX_AUDIO_TYPES_H
|
|
|
|
#include <sndfile.h>
|
|
|
|
#define MAX_CONCURRENT_SOUNDS 10
|
|
|
|
typedef struct {
|
|
int start_ms;
|
|
int duration_ms;
|
|
} SoundMapping;
|
|
|
|
typedef struct {
|
|
char press_file[256];
|
|
char release_file[256];
|
|
char generic_press_files[5][256];
|
|
int num_generic_press_files;
|
|
char sound_file[256];
|
|
SoundMapping key_mappings[512];
|
|
struct {
|
|
char *press;
|
|
char *release;
|
|
} multi_key_mappings[512];
|
|
int is_multi;
|
|
SF_INFO sf_info;
|
|
} SoundPack;
|
|
|
|
typedef struct {
|
|
int key_code;
|
|
int thread_id;
|
|
int is_pressed;
|
|
} PlaybackData;
|
|
|
|
extern SoundPack g_sound_pack;
|
|
extern SoundPack g_mouse_sound_pack;
|
|
extern float g_volume;
|
|
extern float g_mouse_volume;
|
|
extern int g_verbose;
|
|
extern int g_mute;
|
|
extern int g_keyboard_mute;
|
|
extern int g_mouse_mute;
|
|
extern int g_keyboard_enabled;
|
|
extern int g_mouse_enabled;
|
|
extern int g_system_volume_following;
|
|
extern float g_system_volume_multiplier;
|
|
|
|
#endif // VBX_AUDIO_TYPES_H
|