PDA

View Full Version : soundcard > slimserver on linux?



ethan@audio-crusade.com
2004-04-04, 09:23
Loving my squeezebox.

I've decided my top prority is figuring out how to redirect soundcard
input/output through slimserver to my squeezbox. If I could get this going
I could monitor digital audio transfers wihtout sitting at the computer. I
frequently do DAT > WAV digital transfers. I have a whole bunch of ideas
for using my slimserver to facilitate some of the audio work I do and they
all hinge on figuring out how to do this.

I'm ok with perl and I rely heavily on perldoc but I'm sure I can handle
the scope of looking into this and doing some reading.

Does anyone have any suggestions on the approach I should take, tools I
should look into or informational resources I should look at?

Has anyone alread contributed something like this?

Thanks!

-ethan

Roy M. Silvernail
2004-04-04, 09:50
On Sun, 2004-04-04 at 12:23, ethan (AT) audio-crusade (DOT) com wrote:
> Loving my squeezebox.
>
> I've decided my top prority is figuring out how to redirect soundcard
> input/output through slimserver to my squeezbox. If I could get this going
> I could monitor digital audio transfers wihtout sitting at the computer. I
> frequently do DAT > WAV digital transfers.

If you're running Linux, you could create a named pipe with 'mkfifo' in
your music directory tree and tee your final WAV output to it. Then
point SlimServer to it using the 'Browse Music Folder' mode. Untested,
but theoretically possible. :)
--
Roy M. Silvernail is roy (AT) rant-central (DOT) com, and you're not
Never Forget: It's Only 1's and 0's!
SpamAssassin->procmail->/dev/null->bliss
http://www.rant-central.com

ethan@audio-crusade.com
2004-04-04, 12:07
>
> If you're running Linux, you could create a named pipe with 'mkfifo' in
> your music directory tree and tee your final WAV output to it. Then
> point SlimServer to it using the 'Browse Music Folder' mode. Untested,
> but theoretically possible. :)

You sir are da man! Never occurred to me to use a fifo.

So I have steaming from my soundcard working!

I hadn't been using my linux box for audio but forunately my soundcard
module came with my 2.6.4 kernel. This was so simple I can't believe it.
I'm running debian. All I did was apt-get install alsa-utils. Ran
alsamixer (no X on my box) and set "line" to "CAPTURE" cranked the levels.
Then I created my fifo:

mkfifo ~/mymusic/soundcard.wav

Then:

arecord -f cd -t wav > ~/mymusic/soundcard.wav

Then start on my DAT deck.

Ding!

playing soundcard.wav from my music fold streams exactly what's going into
the soundcard line in. wow.



Thanks!

-ethan

dean
2004-04-04, 13:27
Great tip!

-dean

On Apr 4, 2004, at 12:07 PM, ethan (AT) audio-crusade (DOT) com wrote:

>
>>
>> If you're running Linux, you could create a named pipe with 'mkfifo'
>> in
>> your music directory tree and tee your final WAV output to it. Then
>> point SlimServer to it using the 'Browse Music Folder' mode.
>> Untested,
>> but theoretically possible. :)
>
> You sir are da man! Never occurred to me to use a fifo.
>
> So I have steaming from my soundcard working!
>
> I hadn't been using my linux box for audio but forunately my soundcard
> module came with my 2.6.4 kernel. This was so simple I can't believe
> it.
> I'm running debian. All I did was apt-get install alsa-utils. Ran
> alsamixer (no X on my box) and set "line" to "CAPTURE" cranked the
> levels.
> Then I created my fifo:
>
> mkfifo ~/mymusic/soundcard.wav
>
> Then:
>
> arecord -f cd -t wav > ~/mymusic/soundcard.wav
>
> Then start on my DAT deck.
>
> Ding!
>
> playing soundcard.wav from my music fold streams exactly what's going
> into
> the soundcard line in. wow.
>
>
>
> Thanks!
>
> -ethan
>

Ron Thigpen
2004-04-05, 08:42
ethan (AT) audio-crusade (DOT) com wrote:

> So I have steaming from my soundcard working!

Nice! Anyone with feet in both worlds wanna take a shot at describing
the Windows equivalent?

--rt

Simon Ekstrand
2004-04-06, 13:12
On Sun, Apr 04, 2004 at 03:07:20PM -0400, ethan (AT) audio-crusade (DOT) com wrote:
> I hadn't been using my linux box for audio but forunately my soundcard
> module came with my 2.6.4 kernel. This was so simple I can't believe it.
> I'm running debian. All I did was apt-get install alsa-utils. Ran
> alsamixer (no X on my box) and set "line" to "CAPTURE" cranked the levels.
> Then I created my fifo:
>
> mkfifo ~/mymusic/soundcard.wav
>
> Then:
>
> arecord -f cd -t wav > ~/mymusic/soundcard.wav
>
> Then start on my DAT deck.
>
> Ding!
>
> playing soundcard.wav from my music fold streams exactly what's going into
> the soundcard line in. wow.

I tried this to, only connecting line out on one machine to line in on
the slim server-server, works exactly as described above. The slight
problem I have encountered is that there's a lag of about ~1 second
before the sound comes out from the squeezebox. While this may not seem
like a big deal, it can get fairly amusing when doing something
interactive with the sound. I get the exact same results with both
arecord and ecasound, so i don't _think_ that the problem is on the
recording end.
Any ideas what's causing this? I suspect that's it's just the way things
work with slim server (ie. a slight buffering before it starts sending
to the squeezebox or some such), but if anyone has any ideas how to
minimize the delay I'd be happy to hear them.
Another minor detail i noticed is that the web interface is constantly
reloading when playing a fifo, my guess would be that slim server is
thinking that the song is about to end.

--
Simon