RanzQ / hyperion-audio-effects

Hyperion audio effects dev kit using Gstreamer
MIT License
47 stars 8 forks source link

Problems with snd-aloop #1

Closed RanzQ closed 9 years ago

RanzQ commented 9 years ago

I've got a working setup over network but for some reason I don't get alsa loopback device working on my KodiBuntu. It doesn't work properly on my virtualbox either (I don't get any sound to my host like I did with pulseaudio) but atleast gstreamer doesn't freeze anymore. It captures the audio and I can visualize it. I found the alsa setup here: http://www.raspberrypi.org/forums/viewtopic.php?t=86115&p=610070

And here's my .asoundrc in case some "alsa-pro" could give some advice:

# --auto-generated-- by /etc/xbmc/live.d/01-make-asoundrc.sh
# AUTOUPDATE=False  # change this to disable updating of this file
#pcm.!default {
#  type plug;
#  slave.pcm "plughw:CARD=Audio,DEV=0";
#}

pcm.!default {
    type asym
    playback.pcm "alsa_sink"
    capture.pcm "alsa_monitor"
}

pcm.alsa_sink {
    type plug
    slave {pcm "alsa_loopback"}
    route_policy "duplicate"
}

pcm.alsa_monitor {
    type plug
    slave {pcm "hw:Loopback,1,0"}
}

pcm.alsa_loopback {
    type multi

    slaves.a.pcm "hw:2,0" # Set this according to your soundcard (aplay -l)
    slaves.a.channels 2
    slaves.b.pcm "hw:Loopback,0,0"
    slaves.b.channels 2

    bindings.0.slave a
    bindings.0.channel 0
    bindings.1.slave a
    bindings.1.channel 1
    bindings.2.slave b
    bindings.2.channel 0
    bindings.3.slave b
    bindings.3.channel 1
}

I have an external USB DAC / HF-amp which has an audio-out (not sure if it outputs anything when the amp-plug is connected). Thought I could use it to pass the audio back to my line-in if I don't get the virtual device to work.

Update: I was able to get the loopback device working on Spotify (after reboot it strangely just worked) but doesn't seem to work on Kodi. Also I noticed that after playing for awhile, the leds started to have a delay, don't know if it's the loopback which caused that. But otherwise it worked quite well, didn't take much CPU.

RanzQ commented 9 years ago

Delay problem should be fixed, haven't tested the new version with Kodi yet.

RanzQ commented 9 years ago

Loopback device works on normal applications but not with sound from Kodi.