[Spice-devel] [PATCH] hw/usb/dev-audio.c: make USB audio card sound perfect
Stefan Hajnoczi
stefanha at gmail.com
Mon Nov 2 05:07:49 PST 2015
On Fri, Oct 30, 2015 at 11:59:29AM +0100, Gerd Hoffmann wrote:
> > > What bothers me is that you have no qualms about making latency on
> > > everyone's system worse.
> >
> > How do you know it makes sound on other people's systems worse? If you have
> > actually done any testing, I would like to see the results.
>
> It's real. With that change we *do* actually trade latency for better
> sound quality.
>
> You probably wouldn't notice with pure music playback.
>
> Higher chance is with video playback. lip sync issues might show up,
> although you probably still have to watch carefully to actually notice.
Regarding the video playback workload: video playback is not a
low-latency audio use case. That's why you won't notice any difference
if the USB audio device has a larger buffer size.
Lip sync is about keeping the video frame and audio track timestamps
within reasonable timing bounds. Video player application periodically
checks the drift between the audio sample clock and the video clock.
This can be implemented with large audio buffers, there is no need to
sync every couple of milliseconds because the clock drift isn't that
extreme.
For examples of actual low-latency audio use cases, see:
http://manual.ardour.org/synchronization/latency-and-latency-compensation/
Typically the application needs to process audio samples and play them
back within ~10 milliseconds. An example is playing a software
synthesizer. If the synthesizer application uses 40 millisecond
buffers, then the piano will feel laggy because the user only hears the
note after 40 milliseconds. Therefore, the low-latency audio use cases
need small buffers to respond quickly enough.
I downloaded Ubuntu Studio but haven't had time to try running it in a
VM for testing yet:
https://ubuntustudio.org/download/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151102/33a3525c/attachment.sig>
More information about the Spice-devel
mailing list