Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no sound with software mixer #235

Open
Luckyman7471 opened this issue Aug 16, 2021 · 1 comment
Open

no sound with software mixer #235

Luckyman7471 opened this issue Aug 16, 2021 · 1 comment
Labels
audio external The source of this issue lies outside of the Twinkle codebase info needed

Comments

@Luckyman7471
Copy link

Luckyman7471 commented Aug 16, 2021

Hello,

I am using a software audio mixer and would like to use it as an output device in Twinkle

However, I get the following error:

Critical: Opening ALSA driver failed: snd_pcm_hw_params_set_rate(8000) failed: Invalid argument

Is there a way to play the audio through the software mixer as well?

Here is my Alsa config:

`

the real device

pcm.realdev {
type hw
card 0
device 0
}

software mixing

pcm.dmixer {
type dmix
ipc_key 3129397
ipc_key_add_uid false
ipc_perm 0666
slave.pcm "realdev"
slave {
#period_time 0
#period_size 1024
#buffer_size 8192
# we're enforcing 44100, since thats what most apps use
#rate 8000
}
bindings {
0 0
1 1
}
}

software volume

pcm.softvol {
type softvol
slave.pcm "dmixer"
control {
name "Software"
card 0
}
}
pcm.mpdvol {
type softvol
slave.pcm "dmixer"
control {
name "MPD"
card 0
}
}

input

pcm.input {
type dsnoop
ipc_key 3129398
ipc_key_add_uid false
ipc_perm 0660
slave.pcm "realdev"
}

duplex device

pcm.duplex {
type asym
playback.pcm "softvol"
capture.pcm "input"
}

default devices

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

@fbriere
Copy link
Collaborator

fbriere commented Feb 13, 2022

Critical: Opening ALSA driver failed: snd_pcm_hw_params_set_rate(8000) failed: Invalid argument

This means that Twinkle tried (and failed) to open the sound device with a 8000 Hz sampling rate. Twinkle does not resample, so when using a narrowband codec (i.e. most of them), it opens the device at that rate.

# we're enforcing 44100, since thats what most apps use
#rate 8000

If a rate of 44100 is enforced, that's the cause of your problem right there. Have you tried uncommenting this directive, setting it at 8000?

@fbriere fbriere added external The source of this issue lies outside of the Twinkle codebase info needed labels Feb 13, 2022
@fbriere fbriere added the audio label Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio external The source of this issue lies outside of the Twinkle codebase info needed
Projects
None yet
Development

No branches or pull requests

2 participants