Commit fe2cece60e02262e64cfadcbcd0408720628ef2a
1 parent
978a66ff
audio fixes (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1165 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
3 additions
and
5 deletions
audio/audio.c
@@ -367,14 +367,15 @@ static int dist (void *hw) | @@ -367,14 +367,15 @@ static int dist (void *hw) | ||
367 | { | 367 | { |
368 | if (hw) { | 368 | if (hw) { |
369 | return (((uint8_t *) hw - (uint8_t *) hw_voices) | 369 | return (((uint8_t *) hw - (uint8_t *) hw_voices) |
370 | - / audio_state.voice_size) + 1; | 370 | + / audio_state.drv->voice_size) + 1; |
371 | } | 371 | } |
372 | else { | 372 | else { |
373 | return 0; | 373 | return 0; |
374 | } | 374 | } |
375 | } | 375 | } |
376 | 376 | ||
377 | -#define ADVANCE(hw) hw ? advance (hw, audio_state.voice_size) : hw_voices | 377 | +#define ADVANCE(hw) \ |
378 | + ((hw) ? advance (hw, audio_state.drv->voice_size) : hw_voices) | ||
378 | 379 | ||
379 | HWVoice *pcm_hw_find_any (HWVoice *hw) | 380 | HWVoice *pcm_hw_find_any (HWVoice *hw) |
380 | { | 381 | { |
audio/audio_int.h
@@ -86,7 +86,6 @@ typedef struct AudioState { | @@ -86,7 +86,6 @@ typedef struct AudioState { | ||
86 | int fixed_channels; | 86 | int fixed_channels; |
87 | int fixed_fmt; | 87 | int fixed_fmt; |
88 | int nb_hw_voices; | 88 | int nb_hw_voices; |
89 | - int voice_size; | ||
90 | int64_t ticks_threshold; | 89 | int64_t ticks_threshold; |
91 | int freq_threshold; | 90 | int freq_threshold; |
92 | void *opaque; | 91 | void *opaque; |
audio/noaudio.c
@@ -41,7 +41,6 @@ static void no_hw_run (HWVoice *hw) | @@ -41,7 +41,6 @@ static void no_hw_run (HWVoice *hw) | ||
41 | { | 41 | { |
42 | NoVoice *no = (NoVoice *) hw; | 42 | NoVoice *no = (NoVoice *) hw; |
43 | int rpos, live, decr, samples; | 43 | int rpos, live, decr, samples; |
44 | - uint8_t *dst; | ||
45 | st_sample_t *src; | 44 | st_sample_t *src; |
46 | int64_t now = qemu_get_clock (vm_clock); | 45 | int64_t now = qemu_get_clock (vm_clock); |
47 | int64_t ticks = now - no->old_ticks; | 46 | int64_t ticks = now - no->old_ticks; |
@@ -82,7 +81,6 @@ static int no_hw_write (SWVoice *sw, void *buf, int len) | @@ -82,7 +81,6 @@ static int no_hw_write (SWVoice *sw, void *buf, int len) | ||
82 | 81 | ||
83 | static int no_hw_init (HWVoice *hw, int freq, int nchannels, audfmt_e fmt) | 82 | static int no_hw_init (HWVoice *hw, int freq, int nchannels, audfmt_e fmt) |
84 | { | 83 | { |
85 | - NoVoice *no = (NoVoice *) hw; | ||
86 | hw->freq = freq; | 84 | hw->freq = freq; |
87 | hw->nchannels = nchannels; | 85 | hw->nchannels = nchannels; |
88 | hw->fmt = fmt; | 86 | hw->fmt = fmt; |