Initial prototyping hackery.

This commit is contained in:
2020-04-28 23:42:45 +02:00
commit d6f9ac7138
4 changed files with 123 additions and 0 deletions

37
main.go Normal file
View 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()
}