mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2025-08-03 10:31:47 +00:00
Compare commits
2 Commits
040ece840c
...
1c0ef025c1
Author | SHA1 | Date | |
---|---|---|---|
1c0ef025c1 | |||
2b7b8e0bd5 |
@ -22,6 +22,7 @@ tasks:
|
||||
cmds:
|
||||
- task: build-windows
|
||||
- task: build-linux
|
||||
- task: build-macos
|
||||
|
||||
vet:
|
||||
desc: Vet the code
|
||||
@ -46,6 +47,12 @@ tasks:
|
||||
- GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.version={{.VERSION}}'" -o {{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64
|
||||
internal: true
|
||||
|
||||
build-macos:
|
||||
desc: Build the gobs-cli project for macOS
|
||||
cmds:
|
||||
- GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.version={{.VERSION}}'" -o {{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64
|
||||
internal: true
|
||||
|
||||
test:
|
||||
desc: Run tests
|
||||
cmds:
|
||||
|
12
main_test.go
12
main_test.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -108,10 +109,19 @@ func setup(client *goobs.Client) {
|
||||
WithSceneItemEnabled(true))
|
||||
|
||||
// ensure Desktop Audio input is created
|
||||
var inputKind string
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
inputKind = "wasapi_output_capture"
|
||||
case "linux":
|
||||
inputKind = "pulse_output_capture"
|
||||
case "darwin":
|
||||
inputKind = "coreaudio_output_capture"
|
||||
}
|
||||
client.Inputs.CreateInput(inputs.NewCreateInputParams().
|
||||
WithSceneName("gobs-test").
|
||||
WithInputName("Desktop Audio").
|
||||
WithInputKind("wasapi_output_capture").
|
||||
WithInputKind(inputKind).
|
||||
WithInputSettings(map[string]any{
|
||||
"device_id": "default",
|
||||
}))
|
||||
|
Loading…
x
Reference in New Issue
Block a user