mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Formatting
The documentation specifies that the "Duration" property is given in 100 nanosecond units, which is a good thing, otherwise the calculation wouldn't be correct.
This commit is contained in:
parent
5b98066a48
commit
0d6b3f0d7d
1 changed files with 4 additions and 4 deletions
|
|
@ -278,12 +278,12 @@ private:
|
|||
{
|
||||
if (auto wmHeaderInfo = wmSyncReader.getInterface<IWMHeaderInfo>())
|
||||
{
|
||||
QWORD lengthInNanoseconds = 0;
|
||||
WORD lengthOfLength = sizeof (lengthInNanoseconds);
|
||||
QWORD lengthInHundredNanoseconds = 0;
|
||||
WORD lengthOfLength = sizeof (lengthInHundredNanoseconds);
|
||||
WORD streamNum = 0;
|
||||
WMT_ATTR_DATATYPE wmAttrDataType;
|
||||
wmHeaderInfo->GetAttributeByName (&streamNum, L"Duration", &wmAttrDataType,
|
||||
(BYTE*) &lengthInNanoseconds, &lengthOfLength);
|
||||
(BYTE*) &lengthInHundredNanoseconds, &lengthOfLength);
|
||||
|
||||
if (auto wmProfile = wmSyncReader.getInterface<IWMProfile>())
|
||||
{
|
||||
|
|
@ -308,7 +308,7 @@ private:
|
|||
sampleRate = inputFormat->nSamplesPerSec;
|
||||
numChannels = inputFormat->nChannels;
|
||||
bitsPerSample = inputFormat->wBitsPerSample != 0 ? inputFormat->wBitsPerSample : 16;
|
||||
lengthInSamples = (lengthInNanoseconds * (QWORD) sampleRate) / 10000000;
|
||||
lengthInSamples = (lengthInHundredNanoseconds * (QWORD) sampleRate) / 10000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue