aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/audio.c5
-rw-r--r--audio/audio_int.h1
-rw-r--r--audio/noaudio.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 661771e82e..0c0c8dd86f 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -367,14 +367,15 @@ static int dist (void *hw)
{
if (hw) {
return (((uint8_t *) hw - (uint8_t *) hw_voices)
- / audio_state.voice_size) + 1;
+ / audio_state.drv->voice_size) + 1;
}
else {
return 0;
}
}
-#define ADVANCE(hw) hw ? advance (hw, audio_state.voice_size) : hw_voices
+#define ADVANCE(hw) \
+ ((hw) ? advance (hw, audio_state.drv->voice_size) : hw_voices)
HWVoice *pcm_hw_find_any (HWVoice *hw)
{
diff --git a/audio/audio_int.h b/audio/audio_int.h
index db7fd1a7d3..0be2a61662 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -86,7 +86,6 @@ typedef struct AudioState {
int fixed_channels;
int fixed_fmt;
int nb_hw_voices;
- int voice_size;
int64_t ticks_threshold;
int freq_threshold;
void *opaque;
diff --git a/audio/noaudio.c b/audio/noaudio.c
index 819de1e538..a192885a72 100644
--- a/audio/noaudio.c
+++ b/audio/noaudio.c
@@ -41,7 +41,6 @@ static void no_hw_run (HWVoice *hw)
{
NoVoice *no = (NoVoice *) hw;
int rpos, live, decr, samples;
- uint8_t *dst;
st_sample_t *src;
int64_t now = qemu_get_clock (vm_clock);
int64_t ticks = now - no->old_ticks;
@@ -82,7 +81,6 @@ static int no_hw_write (SWVoice *sw, void *buf, int len)
static int no_hw_init (HWVoice *hw, int freq, int nchannels, audfmt_e fmt)
{
- NoVoice *no = (NoVoice *) hw;
hw->freq = freq;
hw->nchannels = nchannels;
hw->fmt = fmt;