[Alsa-user] Poor man's network transparency.
Brought to you by:
perex
From: Rene H. <ren...@gm...> - 2012-12-17 09:52:32
|
Good day. I am setting up basic, "manual" network-transparency on my local network using alsa. Getting sound data from "server" to "player" is easily accomplished with the "file" plugin and netcat: [rene@server ~]$ cat .asoundrc pcm.player { type file slave.pcm "null" file "| nc player <port>" } [rene@server ~]$ aplay -D player foo.wav ... where on "player" I have a listener running that does: "nc -l -p <port> server | aplay -t raw -f cd" (never mind this only working until aplay on "server" closes its output for now; it's only a minimal example) I was wondering/expecting if/that there is a nicer way to do this on "player", though. Specifically, I was expecting to be able to mirror the server-side of things by defining a "server" PCM on player that *captured* from "nc -l -p <port> server |", after which I'd use a daemonized "alsaloop" as my actual player-application. Am I right in believing this to not be the case? I tried all sorts of variants of "infile" or slave definitions, but nothing worked. It seems a little unexpected though, so thought I'd ask before giving up on it. (please note by the way that I'm aware of the more involved solutions such as pulse or nas; I'm trying to avoid them). Regards, Rene |