Files
mediadevices/pkg/driver/microphone/microphone_stub.go
T
sean yu 932e23af03 Add conditional build tag to exclude microphones for camera-only builds (#679)
* Add tag

* Add nomicrophone build tag for optional microphone support

- Changed from platform-specific (!windows) to opt-out build tag (!nomicrophone)
- Microphone support included by default (non-breaking)
- Use -tags nomicrophone to exclude when malgo deps unavailable
- Useful for cross-compilation and minimal builds
- Renamed microphone_windows.go to microphone_stub.go for clarity

* Update README
2026-02-05 13:30:34 -05:00

16 lines
528 B
Go

//go:build nomicrophone
// +build nomicrophone
package microphone
// This stub file is used when building with the 'nomicrophone' build tag.
// Use this when cross-compiling or when malgo (miniaudio) dependencies are not available.
//
// To build without microphone support:
// go build -tags nomicrophone
//
// This is particularly useful for:
// - Cross-compilation where CGO dependencies are unavailable
// - Environments without audio system development libraries
// - Minimal builds that only need camera/video support