Home › Support › Java Application (Speaker) – Feedback and Troubleshooting › Jittering on RasPi with USB Audio Card › Reply To: Jittering on RasPi with USB Audio Card
OK, so that makes it possible to use USB Audio, Excellent.
using .asoundrc to set the USB card as the default still doesn’t work without jittering (other audio software on the same systems needs .asoundrc), but that is OK for now. Added bonus with being able to specify the device on the command line is that (I assume) you can run multiple instances, each sending output to a different device.
When the -m option is used it shows quite a few mixers, they can’t all be used as that results in errors, which makes it a bit tricky to find the correct number to use. One of my RPis has 2 USB audio cards and I can play through 1 of the USB devices without jittering, but the other USB Audio card jitters very bad. Also if a .asoundrc is present with a different default card then I cannot play through one of the USB cards at all).
Details below.
Kitchen-Pi (Standard Raspbian with 1 external USB Audio)
========================================================
java -jar soundseederspeaker_v0.4.1b.jar -m 3
SoundSeeder Speaker
Version 0.4.1 beta – built50117
Copyright 2015 JekApps – http://www.soundseeder.com
Available mixers:
[0]ALSA [default], version 3.12.35+
[1]ALSA [plughw:0,0], version 3.12.35+
[2]ALSA [plughw:0,1], version 3.12.35+
[3]Device [plughw:1,0], version 3.12.35+
[4]Port ALSA [hw:0], version 3.12.35+
[5]Port Device [hw:1], version 3.12.35+
Selected mixer: 3
Device [plughw:1,0], version 3.12.35+
Supported source line types:
interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
interface Clip supporting 8 audio formats, and buffers of at least 32 bytes
LivingRoom-Pi (Standard Raspbian with 2 external USB Audio)
===========================================================
[0]ALSA [default], version 3.12.35+
[1]Device_1 [plughw:0,0], version 3.12.35+
[2]Device [plughw:1,0], version 3.12.35+
[3]ALSA [plughw:2,0], version 3.12.35+
[4]ALSA [plughw:2,1], version 3.12.35+
[5]Port Device_1 [hw:0], version 3.12.35+
[6]Port Device [hw:1], version 3.12.35+
[7]Port ALSA [hw:2], version 3.12.35+
With .asoundrc set to “defaults.pcm.card 2”
– Works: 0 (onboard), 2 (USB1), 3 (onboard), 4 (onboard)
– Error: 1, 5, 6, 7
With no .asoundrc
– Jittering: 0 (USB2)
– Works: 2 (USB1), 3 (onboard), 4 (onboard)
– Error: 1, 5, 6, 7
‘Error’ means the following:
Exception in thread “SpeakerPlaybackThread” java.lang.IllegalArgumentException: Line unsupported: interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
at com.sun.media.sound.DirectAudioDevice.getLine(DirectAudioDevice.java:174)
at com.soundseeder.speaker.g.run(Unknown Source)
So, great progress, but would like to be able to play through the second USB card as well