aboutsummaryrefslogtreecommitdiffstats
path: root/audio/alsaaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/alsaaudio.c')
-rw-r--r--audio/alsaaudio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 1cc4d6e..1ae42b6 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include <alsa/asoundlib.h>
+#include "qemu-common.h"
#include "audio.h"
#define AUDIO_CAP "alsa"
@@ -92,10 +93,10 @@
/* these are inlined functions in the original headers */
#define FF_snd_pcm_hw_params_alloca(ptr) \
- do { assert(ptr); *ptr = (snd_pcm_hw_params_t *) alloca(FF(snd_pcm_hw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_hw_params_sizeof)()); } while (0)
+ do { *ptr = (snd_pcm_hw_params_t *) alloca(FF(snd_pcm_hw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_hw_params_sizeof)()); } while (0)
#define FF_snd_pcm_sw_params_alloca(ptr) \
- do { assert(ptr); *ptr = (snd_pcm_sw_params_t *) alloca(FF(snd_pcm_sw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_sw_params_sizeof)()); } while (0)
+ do { *ptr = (snd_pcm_sw_params_t *) alloca(FF(snd_pcm_sw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_sw_params_sizeof)()); } while (0)
static void* alsa_lib;
@@ -600,7 +601,7 @@ static int alsa_run_out (HWVoiceOut *hw)
int rpos, live, decr;
int samples;
uint8_t *dst;
- st_sample_t *src;
+ struct st_sample *src;
snd_pcm_sframes_t avail;
live = audio_pcm_hw_get_live_out (hw);
@@ -685,13 +686,13 @@ static void alsa_fini_out (HWVoiceOut *hw)
}
}
-static int alsa_init_out (HWVoiceOut *hw, audsettings_t *as)
+static int alsa_init_out (HWVoiceOut *hw, struct audsettings *as)
{
ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
struct alsa_params_req req;
struct alsa_params_obt obt;
snd_pcm_t *handle;
- audsettings_t obt_as;
+ struct audsettings obt_as;
int result = -1;
/* shut alsa debug spew */
@@ -776,13 +777,13 @@ static int alsa_ctl_out (HWVoiceOut *hw, int cmd, ...)
return -1;
}
-static int alsa_init_in (HWVoiceIn *hw, audsettings_t *as)
+static int alsa_init_in (HWVoiceIn *hw, struct audsettings *as)
{
ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
struct alsa_params_req req;
struct alsa_params_obt obt;
snd_pcm_t *handle;
- audsettings_t obt_as;
+ struct audsettings obt_as;
int result = -1;
/* shut alsa debug spew */
@@ -887,7 +888,7 @@ static int alsa_run_in (HWVoiceIn *hw)
for (i = 0; i < 2; ++i) {
void *src;
- st_sample_t *dst;
+ struct st_sample *dst;
snd_pcm_sframes_t nread;
snd_pcm_uframes_t len;