diff options
Diffstat (limited to 'audio/audio.c')
-rw-r--r-- | audio/audio.c | 5 |
1 files changed, 3 insertions, 2 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) { |