Skip to content

Audio sometimes has 1-2 second lag until virtual_oss is restarted #19

@cullumsmith

Description

@cullumsmith

I have a pretty basic setup: USB speakers and a webcam microphone. I use virtual_oss to use them both simultaneously via /dev/dsp:

virtual_oss_enable="YES"
virtual_oss_dsp="-T /dev/sndstat -C 2 -c 2 -S -r 48000 -b 16 -s 100ms -O /dev/dsp1 -R /dev/dsp0 -d dsp -t vsdp.ctl"

(After experimentation, I had to set a very large buffer size to prevent crackling/distortion during video chats...perhaps this is related to the problem?)

Occasionally, virtual_oss gets into a bad state where the audio coming out of the speakers has a 1-2 second lag behind the application. This is most noticeable when playing a video, as the audio is totally out of sync.

Running service virtual_oss restart fixes the problem until it returns a few days later.

My setup:

FreeBSD 14.2-RELEASE amd64
virtual_oss-1.3.1_2

Playback device:

ugen0.4: <vendor 0x0a12 product 0x4010> at usbus0
uhub1 on uhub0
uhub1: <vendor 0x0a12 product 0x4010, class 9/0, rev 2.00/15.49, addr 14> on usbus0
uhub1: 4 ports with 0 removable, bus powered
ugen0.5: <Audioengine LLC Audioengine 2+> at usbus0
uaudio1 on uhub1
uaudio1: <Audioengine LLC Audioengine 2+, class 0/0, rev 2.00/14.86, addr 15> on usbus0
uaudio1: Play[0]: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer. (selected)
uaudio1: Play[0]: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio1: Play[0]: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio1: Play[0]: 22050 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio1: Play[0]: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio1: Play[0]: 8000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio1: No recording.
uaudio1: No MIDI sequencer.
pcm1 on uaudio1
uaudio1: No HID volume keys found.
uhid0 on uhub1
uhid0: <Audioengine LLC Audioengine 2+, class 0/0, rev 2.00/14.86, addr 15> on usbus0

Recording device:

ugen0.2: <vendor 0x046d HD Pro Webcam C920> at usbus0
uaudio0 on uhub0
uaudio0: <vendor 0x046d HD Pro Webcam C920, class 239/2, rev 2.00/0.21, addr 20> on usbus0
uaudio0: No playback.
uaudio0: Record[0]: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer. (selected)
uaudio0: Record[0]: 24000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio0: Record[0]: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x4ms buffer.
uaudio0: No MIDI sequencer.
pcm0 on uaudio0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions