aboutsummaryrefslogtreecommitdiff
path: root/audio/coreaudio.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2020-02-02 20:38:07 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-02-06 14:35:57 +0100
commited2a4a794184df3dbd5ee4cc06e86fe220663faf (patch)
treeed340e8120188691fd89b764ef45ad509005c9a6 /audio/coreaudio.c
parent180b044ffde2cdd4a7209c727b5a8ce93d36741f (diff)
audio: proper support for float samples in mixeng
This adds proper support for float samples in mixeng by adding a new audio format for it. Limitations: only native endianness is supported. None of the virtual sound cards support float samples (it looks like most of them only support 8 and 16 bit, only hda supports 32 bit), it is only used for the audio backends (i.e. host side). Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-id: 8a8b0b5698401b78d3c4c8ec90aef83b95babb06.1580672076.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/coreaudio.c')
-rw-r--r--audio/coreaudio.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index e3620b274b..4b4365660f 100644
--- a/audio/coreaudio.c
+++ b/audio/coreaudio.c
@@ -491,14 +491,9 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as,
return -1;
}
- /*
- * The canonical audio format for CoreAudio on macOS is float. Currently
- * there is no generic code for AUDIO_FORMAT_F32 in qemu. Here we select
- * AUDIO_FORMAT_S32 instead because only the sample size has to match.
- */
fake_as = *as;
as = &fake_as;
- as->fmt = AUDIO_FORMAT_S32;
+ as->fmt = AUDIO_FORMAT_F32;
audio_pcm_init_info (&hw->info, as);
status = coreaudio_get_voice(&core->outputDeviceID);