qemu-devel
[Top][All Lists]
Advanced

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

Re: Audio playback speed issue on sam460ex and pegasos2


From: Volker Rümelin
Subject: Re: Audio playback speed issue on sam460ex and pegasos2
Date: Wed, 29 Mar 2023 23:19:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

Am 29.03.23 um 21:20 schrieb BALATON Zoltan:
On Tue, 28 Mar 2023, Volker Rümelin wrote:
it seems your Mac uses a 48kHz sample rate, although QEMU requested a 44.1kHz sample rate. Could you add -audiodev coreaudio,id=audio0,out.frequency=48000 to your command line and test if the playback speed and pitch is now correct?

I guess you could also set the sampling rate in the guest to match the host but if that results it to do resampling then it may use more CPU that way.

With default settings QEMU resamples the selected guest rate to out.frequency.


The default for out.frequency is 44100.

I think ALSA and Pulseaudio may also default to 48kHz. I remember configuring ALSA to 44.1 kHz on my machine to avoid resampling in the more common case of playing music. So is this a general problem or something with the coreadio backend? Should this somehow detect the host sampling rate and do something about it?

Querying the host sample rate and using the host sample rate instead of out.frequency seems easy. It gets difficult when someone changes the host sample rate when QEMU is running. Current QEMU code can't change the sample rate for an established audio stream. I think the Google Android emulator fork of QEMU uses the Core Audio API to resample the audio stream in this case.


Regards,
BALATON Zoltan




reply via email to

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