diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-12-06 23:14:48 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-12-06 23:14:48 +0000 |
commit | fe2cece60e02262e64cfadcbcd0408720628ef2a (patch) | |
tree | 65d927cabf8e605b8ec9528f9cae9bb28fe44aa1 | |
parent | 978a66ff73add1f462903af92ccf9a34f6a513c2 (diff) |
audio fixes (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1165 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | audio/audio.c | 5 | ||||
-rw-r--r-- | audio/audio_int.h | 1 | ||||
-rw-r--r-- | audio/noaudio.c | 2 |
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; |