Commit fe2cece6 authored by bellard's avatar bellard

audio fixes (malc)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1165 c046a42c-6fe2-441c-8c8c-71466251a162
parent 978a66ff
...@@ -367,14 +367,15 @@ static int dist (void *hw) ...@@ -367,14 +367,15 @@ static int dist (void *hw)
{ {
if (hw) { if (hw) {
return (((uint8_t *) hw - (uint8_t *) hw_voices) return (((uint8_t *) hw - (uint8_t *) hw_voices)
/ audio_state.voice_size) + 1; / audio_state.drv->voice_size) + 1;
} }
else { else {
return 0; 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) HWVoice *pcm_hw_find_any (HWVoice *hw)
{ {
......
...@@ -86,7 +86,6 @@ typedef struct AudioState { ...@@ -86,7 +86,6 @@ typedef struct AudioState {
int fixed_channels; int fixed_channels;
int fixed_fmt; int fixed_fmt;
int nb_hw_voices; int nb_hw_voices;
int voice_size;
int64_t ticks_threshold; int64_t ticks_threshold;
int freq_threshold; int freq_threshold;
void *opaque; void *opaque;
......
...@@ -41,7 +41,6 @@ static void no_hw_run (HWVoice *hw) ...@@ -41,7 +41,6 @@ static void no_hw_run (HWVoice *hw)
{ {
NoVoice *no = (NoVoice *) hw; NoVoice *no = (NoVoice *) hw;
int rpos, live, decr, samples; int rpos, live, decr, samples;
uint8_t *dst;
st_sample_t *src; st_sample_t *src;
int64_t now = qemu_get_clock (vm_clock); int64_t now = qemu_get_clock (vm_clock);
int64_t ticks = now - no->old_ticks; 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)
static int no_hw_init (HWVoice *hw, int freq, int nchannels, audfmt_e fmt) static int no_hw_init (HWVoice *hw, int freq, int nchannels, audfmt_e fmt)
{ {
NoVoice *no = (NoVoice *) hw;
hw->freq = freq; hw->freq = freq;
hw->nchannels = nchannels; hw->nchannels = nchannels;
hw->fmt = fmt; hw->fmt = fmt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment