Skip to content

Commit

Permalink
feat(midi): add ClientMIDI interface for managing MIDI client operations
Browse files Browse the repository at this point in the history
Define an interface for MIDI operations, including device listing, selection, event capturing, and stopping the client. Added basic usage documentation.
  • Loading branch information
Leandro Ferreira committed Oct 26, 2024
1 parent 117b331 commit 8823708
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/contracts/midi/midi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package midi

import "github.com/leandrodaf/midi-client/internal/entity"

// ClientMIDI defines an interface for managing MIDI client operations.
type ClientMIDI interface {
Stop() error
ListDevices() ([]entity.DeviceInfo, error)
SelectDevice(deviceID int) error
StartCapture(eventChannel chan entity.MIDI)
Stop() error // Stops the MIDI client and disconnects any active device.
ListDevices() ([]entity.DeviceInfo, error) // Lists available MIDI devices.
SelectDevice(deviceID int) error // Selects a MIDI device by its ID.
StartCapture(eventChannel chan entity.MIDI) // Starts capturing MIDI events and sends them to the specified channel.
}

0 comments on commit 8823708

Please sign in to comment.