VirtualBox

Changeset 68388 in vbox


Ignore:
Timestamp:
Aug 11, 2017 11:48:34 AM (7 years ago)
Author:
vboxsync
Message:

Audio/DevHDA: Use ASMMultU64ByU32DivByU32() in hdaStreamPeriodFramesToWalClk().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp

    r67702 r68388  
    2929#define LOG_GROUP LOG_GROUP_DEV_HDA
    3030#include <VBox/log.h>
     31
     32#include <iprt/asm-math.h> /* For ASMMultU64ByU32DivByU32(). */
    3133
    3234#include <VBox/vmm/pdmdev.h>
     
    252254    const uint32_t uHz = (pPeriod->u32Hz ? pPeriod->u32Hz : 1);
    253255
    254     /* 24 MHz WallClock (WALCLK): 42ns resolution. */
    255     return ((uFrames * 24000 /* 24 MHz */) / uHz) * 1000;
     256    /* 24 MHz wall clock (WALCLK): 42ns resolution. */
     257    return ASMMultU64ByU32DivByU32(uFrames, 24000000, uHz);
    256258}
    257259
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette