mirror of
https://github.com/raysan5/raylib.git
synced 2026-06-28 21:01:23 +08:00
Merge pull request #4914 from Servall4/master
Some checks failed
Android / build (arm64) (push) Has been cancelled
Android / build (x86_64) (push) Has been cancelled
CMakeBuilds / Windows Build (push) Has been cancelled
CMakeBuilds / Linux Build (push) Has been cancelled
Linux / build (i386, i386, /user/bin, 32) (push) Has been cancelled
Linux / build (x86_64, amd64, /user/bin, 64) (push) Has been cancelled
Linux Examples / build (push) Has been cancelled
macOS / build (push) Has been cancelled
WebAssembly / build (push) Has been cancelled
Windows / build (ARM64, ARM64, msvc16, winarm64) (push) Has been cancelled
Windows / build (i686, pe-i386, mingw-w64, win32) (push) Has been cancelled
Windows / build (x64, x64, msvc16, win64) (push) Has been cancelled
Windows / build (x86, Win32, msvc16, win32) (push) Has been cancelled
Windows / build (x86_64, pe-x86-64, mingw-w64, win64) (push) Has been cancelled
Windows Examples / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
Some checks failed
Android / build (arm64) (push) Has been cancelled
Android / build (x86_64) (push) Has been cancelled
CMakeBuilds / Windows Build (push) Has been cancelled
CMakeBuilds / Linux Build (push) Has been cancelled
Linux / build (i386, i386, /user/bin, 32) (push) Has been cancelled
Linux / build (x86_64, amd64, /user/bin, 64) (push) Has been cancelled
Linux Examples / build (push) Has been cancelled
macOS / build (push) Has been cancelled
WebAssembly / build (push) Has been cancelled
Windows / build (ARM64, ARM64, msvc16, winarm64) (push) Has been cancelled
Windows / build (i686, pe-i386, mingw-w64, win32) (push) Has been cancelled
Windows / build (x64, x64, msvc16, win64) (push) Has been cancelled
Windows / build (x86, Win32, msvc16, win32) (push) Has been cancelled
Windows / build (x86_64, pe-x86-64, mingw-w64, win64) (push) Has been cancelled
Windows Examples / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
[raudio] fix: GetMusicTimePlayed returns incorrect time after restarting a paused track
This commit is contained in:
commit
1ec281e86f
@ -604,6 +604,7 @@ AudioBuffer *LoadAudioBuffer(ma_format format, ma_uint32 channels, ma_uint32 sam
|
||||
|
||||
audioBuffer->usage = usage;
|
||||
audioBuffer->frameCursorPos = 0;
|
||||
audioBuffer->framesProcessed = 0;
|
||||
audioBuffer->sizeInFrames = sizeInFrames;
|
||||
|
||||
// Buffers should be marked as processed by default so that a call to
|
||||
@ -650,6 +651,9 @@ void PlayAudioBuffer(AudioBuffer *buffer)
|
||||
buffer->playing = true;
|
||||
buffer->paused = false;
|
||||
buffer->frameCursorPos = 0;
|
||||
buffer->framesProcessed = 0;
|
||||
buffer->isSubBufferProcessed[0] = true;
|
||||
buffer->isSubBufferProcessed[1] = true;
|
||||
ma_mutex_unlock(&AUDIO.System.lock);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user