More fixes for dsound playing code and a bit for spectrum rendering

Originally committed to SVN as r732.
This commit is contained in:
Niels Martin Hansen 2007-01-07 04:52:33 +00:00
parent 9babda0720
commit a88feab986
2 changed files with 11 additions and 13 deletions

View file

@ -534,11 +534,7 @@ void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) {
spectrumDisplay = new wxBitmap(imgobj); spectrumDisplay = new wxBitmap(imgobj);
} }
if (hasSel && selStartCap < selEndCap && if (hasSel && selStartCap < selEndCap && !spectrumDisplaySelected) {
((selStartCap > Position && selStartCap < Position+w) ||
(selEndCap > Position && selEndCap < Position+w) ||
(selStartCap < Position && selEndCap > Position+w)) &&
!spectrumDisplaySelected) {
// There is a visible selection and we don't have a rendered one // There is a visible selection and we don't have a rendered one
// This should be done regardless whether we're "weak" or not // This should be done regardless whether we're "weak" or not
// Assume a few things were already set up when things were first rendered though // Assume a few things were already set up when things were first rendered though

View file

@ -295,8 +295,10 @@ void DirectSoundPlayer::Stop(bool timerToo) {
offset = 0; offset = 0;
// Close event handle // Close event handle
if (notificationEvent) if (notificationEvent) {
CloseHandle(notificationEvent); CloseHandle(notificationEvent);
notificationEvent = 0;
}
// Stop timer // Stop timer
if (timerToo && displayTimer) { if (timerToo && displayTimer) {