VirtualBox

Changeset 73409 in vbox for trunk/src


Ignore:
Timestamp:
Jul 31, 2018 11:38:21 AM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Use RT_MS_1SEC in the *Milli* helpers.

File:
1 edited

Legend:

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

    r73408 r73409  
    11271127        return 0;
    11281128
    1129     const float dbBytesPerMs = ((pProps->cBits / 8) * pProps->cChannels * pProps->uHz) / 1000;
     1129    const float dbBytesPerMs = ((pProps->cBits / 8) * pProps->cChannels * pProps->uHz) / RT_MS_1SEC;
    11301130    Assert(dbBytesPerMs >= 0.0f);
    11311131    if (!dbBytesPerMs) /* Prevent division by zero. */
     
    11911191        return 0;
    11921192
    1193     return cFrames / (pProps->uHz / 1000 /* ms */);
     1193    return cFrames / (pProps->uHz / RT_MS_1SEC);
    11941194}
    11951195
     
    12281228        return 0;
    12291229
    1230     return float(((pProps->cBits / 8) * pProps->cChannels * pProps->uHz) / 1000) * uMs;
     1230    return float(((pProps->cBits / 8) * pProps->cChannels * pProps->uHz) / RT_MS_1SEC) * uMs;
    12311231}
    12321232
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