implement devices

This commit is contained in:
2025-12-02 18:58:56 +01:00
parent b864f3ff7b
commit 5998f0d1cb
8 changed files with 136 additions and 16 deletions

View File

@@ -42,6 +42,16 @@ func NewEndpoint(endpointData hardware.EndpointInfo, inputs []midi.In, outputs [
}
}
// SetDeviceArrivalCallback is called when we need to add a new device to the hardware
func (p *Endpoint) SetDeviceArrivalCallback(adc func(context.Context, hardware.DeviceInfo, hardware.Endpoint) error) {
}
// SetDeviceRemovalCallback is called when we need to remove a device from the hardware
func (p *Endpoint) SetDeviceRemovalCallback(rdc func(context.Context, string) error) {
}
// Connect connects the MIDI endpoint
func (p *Endpoint) Connect(ctx context.Context) error {
runtime.EventsEmit(ctx, string(hardware.EndpointStatusUpdated), p.GetInfo(), hardware.EndpointStatusConnecting)