From 400b3473ae34034dbdc6d429f3f7ddb71b161976 Mon Sep 17 00:00:00 2001 From: Alex P Date: Mon, 17 Nov 2025 12:33:07 +0200 Subject: [PATCH] Fix: add stub implementations for non-ARM platforms to fix lint Adds cgo_source_stub.go with inverse build tag (!linux || (!arm && !arm64)) to provide stub function signatures for CI linting on amd64 runners. --- internal/audio/cgo_source_stub.go | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 internal/audio/cgo_source_stub.go diff --git a/internal/audio/cgo_source_stub.go b/internal/audio/cgo_source_stub.go new file mode 100644 index 00000000..f7ccfac6 --- /dev/null +++ b/internal/audio/cgo_source_stub.go @@ -0,0 +1,35 @@ +//go:build !linux || (!arm && !arm64) + +package audio + +// Stub implementations for non-ARM Linux platforms + +type CgoSource struct{} + +func NewCgoOutputSource(alsaDevice string) *CgoSource { + panic("audio CGO source not supported on this platform") +} + +func NewCgoInputSource(alsaDevice string) *CgoSource { + panic("audio CGO source not supported on this platform") +} + +func (c *CgoSource) Connect() error { + panic("audio CGO source not supported on this platform") +} + +func (c *CgoSource) Disconnect() { + panic("audio CGO source not supported on this platform") +} + +func (c *CgoSource) IsConnected() bool { + panic("audio CGO source not supported on this platform") +} + +func (c *CgoSource) ReadMessage() (uint8, []byte, error) { + panic("audio CGO source not supported on this platform") +} + +func (c *CgoSource) WriteMessage(msgType uint8, payload []byte) error { + panic("audio CGO source not supported on this platform") +}