[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qemu modifies host audio sample rate with coreaudio backend to 44.1k

From: Christian Schoenebeck
Subject: Re: qemu modifies host audio sample rate with coreaudio backend to 44.1khz on startup
Date: Fri, 24 Mar 2023 13:04:49 +0100

On Friday, March 24, 2023 8:54:35 AM CET Thomas Huth wrote:
> On 23/03/2023 21.03, Frank Carmickle wrote:
> > Greetings all,
> > 
> > Every time a qemu instance is run, the host systems audio hardware sample 
> > rate is set to 44.1khz. Is it possible to change this behavior, and if so, 
> > how?
>   Hi,
> not sure if I've got the question right, and I'm not an expert when it comes 
> to QEMU audio, but I think you can set the playback frequency like this for 
> example:
>   qemu-system-x86_64 --audiodev alsa,id=a1,out.frequency=48000
> ... but seems like the QEMU documentation is really lacking here, so I might 
> be wrong. Maybe Christian, Gerd or Marc-André could correct me in that case 
> (now on CC:).

By default host's audio backend is opened with audio parameters requested by
guest. So if guest requests 44.1 kHz then host's audio system is opened with
44.1 kHz as well (if supported by host's audio system that is).

By supplying out.frequency=x you can override host's sample rate, but as guest
apparently requested 44.1 kHz before, guest would probably still use 44.1 kHz
and QEMU would resample the audio stream to the requested host's sample rate.

So the question is what you really want to achieve. Maybe it would be better
to force guest using the desired sample rate instead.

Best regards,
Christian Schoenebeck

reply via email to

[Prev in Thread] Current Thread [Next in Thread]