aboutsummaryrefslogtreecommitdiff
path: root/audio/audio_win_int.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-03-08 23:34:13 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-11 10:29:26 +0100
commit85bc58520c0e43660cbbe51b9eb5022a0baafe9f (patch)
tree6a6e20f651bcb5ae047e90ed823d2dcaa10e06e1 /audio/audio_win_int.c
parent8c3a7d008794305b1304549f1d9249c12cbf5b2b (diff)
audio: use qapi AudioFormat instead of audfmt_e
I had to include an enum for audio sampling formats into qapi, but that meant duplicating the audfmt_e enum. This patch replaces audfmt_e and associated values with the qapi generated AudioFormat enum. This patch is mostly a search-and-replace, except for switches where the qapi generated AUDIO_FORMAT_MAX caused problems. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 01251b2758a1679c66842120b77c0fb46d7d0eaf.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/audio_win_int.c')
-rw-r--r--audio/audio_win_int.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/audio/audio_win_int.c b/audio/audio_win_int.c
index 6900008d0c..b938fd667b 100644
--- a/audio/audio_win_int.c
+++ b/audio/audio_win_int.c
@@ -24,20 +24,20 @@ int waveformat_from_audio_settings (WAVEFORMATEX *wfx,
wfx->cbSize = 0;
switch (as->fmt) {
- case AUD_FMT_S8:
- case AUD_FMT_U8:
+ case AUDIO_FORMAT_S8:
+ case AUDIO_FORMAT_U8:
wfx->wBitsPerSample = 8;
break;
- case AUD_FMT_S16:
- case AUD_FMT_U16:
+ case AUDIO_FORMAT_S16:
+ case AUDIO_FORMAT_U16:
wfx->wBitsPerSample = 16;
wfx->nAvgBytesPerSec <<= 1;
wfx->nBlockAlign <<= 1;
break;
- case AUD_FMT_S32:
- case AUD_FMT_U32:
+ case AUDIO_FORMAT_S32:
+ case AUDIO_FORMAT_U32:
wfx->wBitsPerSample = 32;
wfx->nAvgBytesPerSec <<= 2;
wfx->nBlockAlign <<= 2;
@@ -85,15 +85,15 @@ int waveformat_to_audio_settings (WAVEFORMATEX *wfx,
switch (wfx->wBitsPerSample) {
case 8:
- as->fmt = AUD_FMT_U8;
+ as->fmt = AUDIO_FORMAT_U8;
break;
case 16:
- as->fmt = AUD_FMT_S16;
+ as->fmt = AUDIO_FORMAT_S16;
break;
case 32:
- as->fmt = AUD_FMT_S32;
+ as->fmt = AUDIO_FORMAT_S32;
break;
default: