Play into subsequent track(s) if playback length exceeds the the current track
Issue reported by Dagar and Pr3tty F1y, and confirmed as a bug by ripsaw8080. Thank you! This fixes the GoG release of Betrayal at Krondor which (either due to CD mastering issues or a faulty rip), requests playback of a given track at the tail end of the prior track. In debugging and performing this fix, many debug messages were improved as well as making some small small code adjustments, such as using iterators to point to individual tracks (track->attribute) instead of using the tracks array (tracks[track -1].attribute).
This commit is contained in:
parent
90e5e0e82a
commit
eaeb001b17
9 changed files with 590 additions and 429 deletions
|
@ -34,8 +34,6 @@
|
|||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
// prevent the Windows header from clobbering std::min and max
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
@ -156,11 +154,6 @@ void MixerChannel::UpdateVolume(void) {
|
|||
volmul[1]=(Bits)((1 << MIXER_VOLSHIFT)*scale[1]*volmain[1]*mixer.mastervol[1]);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T clamp(const T& n, const T& lower, const T& upper) {
|
||||
return std::max(lower, std::min(n, upper));
|
||||
}
|
||||
|
||||
void MixerChannel::SetVolume(float _left,float _right) {
|
||||
// Allow unconstrained user-defined values
|
||||
volmain[0] = _left;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue