Initial prototyping hackery.
This commit is contained in:
37
main.go
Normal file
37
main.go
Normal file
@ -0,0 +1,37 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"remote-mic/socketops"
|
||||
"remote-mic/pulsectl"
|
||||
)
|
||||
|
||||
|
||||
func nop() {
|
||||
fmt.Print("Listening for TCP connection on port 8080... ")
|
||||
conn, err := socketops.AcceptConn(":8080")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer conn.Close()
|
||||
fmt.Println("Connection accepted!")
|
||||
|
||||
data := make(chan []byte, 10)
|
||||
go socketops.HandleConn(conn, data)
|
||||
socketops.HandleData(data)
|
||||
|
||||
fmt.Println("Exiting.")
|
||||
}
|
||||
|
||||
func main() {
|
||||
pulsectl.LoadPipeSource(pulsectl.PipeSourceConfig{
|
||||
"remote-mic",
|
||||
"/dev/shm",
|
||||
"s16le",
|
||||
44100,
|
||||
2,
|
||||
})
|
||||
time.Sleep(10 * time.Second)
|
||||
pulsectl.UnloadPipeSource()
|
||||
}
|
Reference in New Issue
Block a user