From 23ea0a91738dcf02c49c158528b5f92047ed1165 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 1 Oct 2006 22:27:11 +0000 Subject: [PATCH] make libao a bit more efficient on big endian git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1288 423420c4-83ab-492f-b58f-81f9feb106b5 --- rdpsnd_libao.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rdpsnd_libao.c b/rdpsnd_libao.c index 31de3fa..3d0ef58 100644 --- a/rdpsnd_libao.c +++ b/rdpsnd_libao.c @@ -29,7 +29,7 @@ #include #include -#define WAVEOUTBUF 16 +#define WAVEOUTBUF 512 static ao_device *o_device = NULL; static int default_driver; @@ -55,7 +55,8 @@ libao_open(void) format.bits = 16; format.channels = 2; format.rate = 44100; - format.byte_format = AO_FMT_LITTLE; + format.byte_format = AO_FMT_NATIVE; + o_device = ao_open_live(default_driver, &format, NULL); if (o_device == NULL) @@ -96,7 +97,7 @@ libao_set_format(WAVEFORMATEX * pwfx) format.bits = pwfx->wBitsPerSample; format.channels = pwfx->nChannels; format.rate = 44100; - format.byte_format = AO_FMT_LITTLE; + format.byte_format = AO_FMT_NATIVE; if (o_device != NULL) ao_close(o_device); @@ -194,7 +195,7 @@ libao_register(char *options) libao_driver.wave_out_play = libao_play; libao_driver.name = xstrdup("libao"); libao_driver.description = description; - libao_driver.need_byteswap_on_be = 0; + libao_driver.need_byteswap_on_be = 1; libao_driver.need_resampling = 1; libao_driver.next = NULL;