I want to play youtube videos and programmatically direct firefox's audio out to a particular sound card.
I think I would do something like firefox | aplay -D hw:x,y.
Yields:
Playing raw data 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono aplay: set_params:1059: Sample format non available Available formats: - S16_LE
Trying firefox | aplay -D hw:1,0 -f S16_LE -c 2
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo Warning: rate is not accurate (requested = 8000Hz, got = 44100Hz) please, try the plug plugin
Finally, firefox | aplay -D plughw:1,0 -f S16_LE -c 2
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
The command-line suggests that it worked, but audio came out of hw:0,0 (the default).
Do I need to make my own plugin? Or do I need to force alsa to take 44100Hz?
Also, I refuse to use pulse since the memory leak bug makes it crash often.