diff options
author | Kővágó, Zoltán <dirty.ice.hu@gmail.com> | 2019-08-19 01:06:54 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-08-21 09:13:37 +0200 |
commit | 589359150365616de479866f8bc594c876480bd8 (patch) | |
tree | 3b0413edced2698cd97e18b6cc106df811c0cc2c /audio/noaudio.c | |
parent | 8692bf7d978aee2329d9449e31043451a8fdb357 (diff) |
audio: remove audio_MIN, audio_MAX
There's already a MIN and MAX macro in include/qemu/osdep.h, use them
instead.
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 303222477df6f7373217e0df768635fab5855745.1566168923.git.DirtY.iCE.hu@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/noaudio.c')
-rw-r--r-- | audio/noaudio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/noaudio.c b/audio/noaudio.c index 9b195dc52c..14a0e4ab29 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -52,11 +52,11 @@ static int no_run_out (HWVoiceOut *hw, int live) now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); ticks = now - no->old_ticks; bytes = muldiv64(ticks, hw->info.bytes_per_second, NANOSECONDS_PER_SECOND); - bytes = audio_MIN(bytes, INT_MAX); + bytes = MIN(bytes, INT_MAX); samples = bytes >> hw->info.shift; no->old_ticks = now; - decr = audio_MIN (live, samples); + decr = MIN (live, samples); hw->rpos = (hw->rpos + decr) % hw->samples; return decr; } @@ -111,9 +111,9 @@ static int no_run_in (HWVoiceIn *hw) muldiv64(ticks, hw->info.bytes_per_second, NANOSECONDS_PER_SECOND); no->old_ticks = now; - bytes = audio_MIN (bytes, INT_MAX); + bytes = MIN (bytes, INT_MAX); samples = bytes >> hw->info.shift; - samples = audio_MIN (samples, dead); + samples = MIN (samples, dead); } return samples; } @@ -124,7 +124,7 @@ static int no_read (SWVoiceIn *sw, void *buf, int size) * useless resampling/mixing */ int samples = size >> sw->info.shift; int total = sw->hw->total_samples_captured - sw->total_hw_samples_acquired; - int to_clear = audio_MIN (samples, total); + int to_clear = MIN (samples, total); sw->total_hw_samples_acquired += total; audio_pcm_info_clear_buf (&sw->info, buf, to_clear); return to_clear << sw->info.shift; |