diff options
author | David 'Digit' Turner <digit@android.com> | 2010-05-10 23:50:54 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-05-11 18:01:32 -0700 |
commit | a7fb77d6eca56e61e94f62e7deb4120b60b1e919 (patch) | |
tree | 94f818fc4c89a5b5a361e3c78b9c308ccfb94064 /audio/wavaudio.c | |
parent | fd3b1a0e32964436a5259e073857e0c4e2110122 (diff) | |
download | external_qemu-a7fb77d6eca56e61e94f62e7deb4120b60b1e919.zip external_qemu-a7fb77d6eca56e61e94f62e7deb4120b60b1e919.tar.gz external_qemu-a7fb77d6eca56e61e94f62e7deb4120b60b1e919.tar.bz2 |
Upstream: integrate timer/clock management changes.
Change-Id: I24acbdebe58d207352548f54dda1abf5be01e7d4
Diffstat (limited to 'audio/wavaudio.c')
-rw-r--r-- | audio/wavaudio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/wavaudio.c b/audio/wavaudio.c index 6f2cc54..a82997e 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -63,7 +63,8 @@ static int wav_out_run (HWVoiceOut *hw) struct st_sample *src; int64_t now = qemu_get_clock (vm_clock); int64_t ticks = now - wav->old_ticks; - int64_t bytes = (ticks * hw->info.bytes_per_second) / ticks_per_sec; + int64_t bytes = + muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ()); if (bytes > INT_MAX) { samples = INT_MAX >> hw->info.shift; @@ -355,7 +356,7 @@ static int wav_in_run (HWVoiceIn *hw) int64_t now = qemu_get_clock (vm_clock); int64_t ticks = now - wav->old_ticks; - int64_t bytes = (ticks * hw->info.bytes_per_second) / ticks_per_sec; + int64_t bytes = muldiv64(ticks, hw->info.bytes_per_second, get_ticks_per_sec()); if (bytes > INT_MAX) { samples = INT_MAX >> hw->info.shift; |