[sldev] [BUG] Voice chat output on leenooks.

Carsten Juttner carjay at gmx.net
Tue Mar 11 12:09:58 PDT 2008


Dr Scofield wrote:
> Carsten Juttner wrote:
>> Personally I setup ALSA with the dmix-plugin to make it possible and 
>> since KDE also allows arts to go through ALSA I now have all 
>> (behaving) applications output sound concurrently.
> care to share your alsa config file?
>

Sure, but I didn't do much customization, took it from some page on the 
web and only fiddled with the "rate" setting.

If I don't set that to 44100 I get a lot of noise in the output as if 
samples were missing. This happened with 2 different sound cards 
(built-in and USB) but not for all applications (it did though for SL 
and even the ALSA test applications). The way it is now it works fine.

Put it in /etc/asound.conf (which didn't exist before on my system, I 
use Kubuntu Feisty).

Here you go:


# define sound card
pcm.snd_card {
    type hw
    card 0
}

# define dmix plug-in
pcm.dmixer {
    type dmix
    ipc_key 1024
    ipc_perm 0666    # allow other users to use dmix as well
    slave.pcm "snd_card"
    slave {
        # adjust buffer_size if necessary
        period_time 0
        period_size 1024
        buffer_size 4096
        # if you get noise, try enabling a conversion rate of 44100
        rate 44100
    }
    bindings {
        0 0
        1 1
    }
}

# dsnoop-plug-in to enable parallel capturing
pcm.dsnooper {
    type dsnoop
    ipc_key 2048
    ipc_perm 0666
    slave.pcm "snd_card"
    slave
    {
        period_time 0
        period_size 1024
        buffer_size 4096
        # if you get noise, try enabling a conversion rate of 44100
        # rate 44100
    }
    bindings {
        0 0
        1 1
    }
}

# define full duplex plug-in as default for all ALSA clients
pcm.duplex {
    type asym
    playback.pcm "dmixer"
    capture.pcm "dsnooper"
}

pcm.!default {
    type plug
    slave.pcm "duplex"
}

########
# AOSS #
########

# emulate DSP through dmix plug-in
pcm.dsp "duplex"
pcm.dsp1 "duplex"

# OSS-control for dsp0 (if necessary ...)
ctl.dsp {
    type plug
    slave.pcm "snd_card"
}

# OSS-control for dsp0 (if necessary ...)
ctl.mixer {
    type plug
    slave.pcm "snd_card"
}


Regards,
Carsten



More information about the SLDev mailing list