twinkle icon indicating copy to clipboard operation
twinkle copied to clipboard

no sound with software mixer

Open Luckyman7471 opened this issue 4 years ago • 1 comments

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" } `

Luckyman7471 avatar Aug 16 '21 14:08 Luckyman7471

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 avatar Feb 13 '22 00:02 fbriere