A helper program for win32 functionality that communicates with the button-board server. This program communicates with the main process through Windows sockets.
The port can be configured by editing the helperPort
property in buttonboard-config.json
.
- Implement socket server to send events
- Implement loops to poll for:
- Audio device peak meters
- Audio session peak meters
- Implement sndvol style web interface for testing
- Try to get Github Actions working to:
- Build the executable
- Do releases
- Add VS project to Git
- Create notify and callbacks in CoreAudio for:
- Audio device changes (default device changed)
- Audio device volume & mute status updates
- Audio session creation updates
- Audio session volume & mute updates
- Audio session invalidation (deleted/disconnected/expired) updates
- Add to API documentation:
- Audio device add/remove update
- Audio device mute status update
- Audio session mute status update
- Change to API documentation:
- Add
receiveAudioSessionUpdates
toWinAudioDevice
. We may not be interested in getting updates for the device that is not active
- Add
- Below are the messages and payloads used to communicate with the helper program.
- JSON Types are annotated using brackets
{ }
, while text messages have no annotations.- The justification for using just plaintext is to reduce overhead when serializing/deserializing and transmitting messages that are usually spammed, like volume changes or peak meter updates.
- All messages must be provided with a unique int as the first argument in a payload that does not exceed Int32.Max. This number is passed back unchanged in a response message, and is useful for identifying the results of a previous message. If the payload is JSON, the ID must NOT be part of the JSON text, and must be before it.
- Messages that initially sent by the helper (e.g. updates) will not contain the message ID
payload = msgId: number
payload = msgId: number, value: boolean
payload = msgId: number, [{
deviceId: string,
friendlyName: string,
volumePercent: int (0 - 100),
muted: boolean,
selected: boolean
}]
payload = msgId: number, newState: boolean
payload = [{
deviceId: string,
friendlyName: string,
volumePercent: int (0 - 100),
muted: boolean,
selected: boolean
}]
payload = msgId: number, deviceId: string, value: boolean
payload = msgId: number, deviceId: string, value: boolean
payload = msgId: number, deviceId: string, value: boolean
payload = msgId: number, deviceId: string
payload = msgId: number, deviceId: string
payload = msgId: number, deviceId: string, muted: boolean, volumePercent: int (0 - 100), confirmVolumeChange: boolean
- 'confirmVolumeChange' supresses 'return_setDeviceVolume' if false.
- This method also does not fire 'update_deviceVolume'.
payload = msgId: number, deviceId: string, newState: boolean
payload = deviceId: string, newPeakValue: float (0 - 1)
payload = msgId: number, deviceId: string, newState: boolean
payload = deviceId: string, newMuted: boolean, newVolumePercent: int (0 - 100)
payload = msgId: number, deviceId: string, newState: boolean
payload = deviceId: string, [{
sessionId: string,
friendlyName: string,
iconPath: string | null,
volumePercent: int (0 - 100),
muted: boolean
}]
payload = [{
sessionId: string,
friendlyName: string,
iconPath: string | null,
volumePercent: int (0 - 100),
muted: boolean
}] | null
payload = msgId: number, currentActiveDeviceId: string
payload = msgId: number, deviceId: string, newMuted: boolean, newVolumePercent: int (0 - 100)
- Supressed if 'setDeviceVolume' is called with 'confirmValueChange = false'
payload = msgId: number, deviceId: string, sessionId: string, value: boolean
payload = msgId: number, deviceId: string, sessionId: string, value: boolean
payload = msgId: number, deviceId: string, sessionId: string, muted: boolean, volumePercent: int (0 - 100), confirmVolumeChange: boolean
- 'confirmVolumeChange' supresses 'return_setSessionVolume' if false.
- This method also does not fire 'update_sessionVolume'.
payload = msgId: number, deviceId: string, sessionId: string, newState: boolean
payload = deviceId: string, sessionId: string, newPeakValue: float (0 - 1)
payload = msgId: number, deviceId: string, sessionId: string, newState: boolean
payload = deviceId: string, sessionId: string, newMuted: boolean, newVolume: int (0 - 100)
payload = msgId: number, deviceId: string, sessionId: string, newMuted: boolean, newVolume: int (0 - 100)