Skip to content

Commit 37774e7

Browse files
committed
Merged revision(s) 25212 from trunk/OpenMPT:
[Fix] sounddev: GetStreamPosition() was off by a factor of 1000 for devices that don't support reporting stream position but have time information (e.g. ASIO with hardware timing). ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.32@25213 56274372-70c3-4bfc-bfc3-4c3a0b034d27
1 parent b321964 commit 37774e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openmpt/sounddevice/SoundDeviceBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ SoundDevice::StreamPosition Base::GetStreamPosition() const
429429
const uint64 now = CallbackGetReferenceClockNowNanoseconds();
430430
const SoundDevice::TimeInfo timeInfo = GetTimeInfo();
431431
frames = mpt::saturate_round<int64>(
432-
timeInfo.SyncPointStreamFrames + (static_cast<double>(static_cast<int64>(now - timeInfo.SyncPointSystemTimestamp)) * timeInfo.Speed * m_Settings.Samplerate * (1.0 / (1000.0 * 1000.0))));
432+
timeInfo.SyncPointStreamFrames + (static_cast<double>(static_cast<int64>(now - timeInfo.SyncPointSystemTimestamp)) * timeInfo.Speed * m_Settings.Samplerate * (1.0 / (1'000'000'000.0))));
433433
} else
434434
{
435435
frames = m_StreamPositionOutputFrames;

0 commit comments

Comments
 (0)