Ensure the first seek isn't cached
This commit is contained in:
parent
6e2b794bd0
commit
83f625178a
2 changed files with 4 additions and 2 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
@ -193,7 +194,8 @@ private:
|
|||
int getLength();
|
||||
private:
|
||||
Sound_Sample *sample = nullptr;
|
||||
uint32_t track_pos = 0;
|
||||
// ensure the first seek isn't cached by starting with an impossibly-large position
|
||||
uint32_t track_pos = (std::numeric_limits<uint32_t>::max)();
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
@ -936,7 +936,7 @@ void CDROM_Interface_Image::CDAudioCallBack(Bitu desired_track_frames)
|
|||
desired_track_frames,
|
||||
static_cast<void*>(player.cd),
|
||||
static_cast<void*>(player.mutex),
|
||||
static_cast<void*>(track_file.get());
|
||||
static_cast<void*>(track_file.get()));
|
||||
#endif
|
||||
if (player.cd)
|
||||
player.cd->StopAudio();
|
||||
|
|
Loading…
Add table
Reference in a new issue