Revision 4f4cc0ef audio/wavaudio.c

b/audio/wavaudio.c
54 54
    struct st_sample *src;
55 55
    int64_t now = qemu_get_clock (vm_clock);
56 56
    int64_t ticks = now - wav->old_ticks;
57
    int64_t bytes = (ticks * hw->info.bytes_per_second) / get_ticks_per_sec();
57
    int64_t bytes =
58
        muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ());
58 59

  
59 60
    if (bytes > INT_MAX) {
60 61
        samples = INT_MAX >> hw->info.shift;

Also available in: Unified diff