Ensure the Player's listener is zero'd out as part of Player::Destroy().

Also cleaned up a couple small warnings.
This commit is contained in:
casey langen 2016-12-23 21:38:16 -08:00
parent 483dfa65cd
commit 5b5399322f
3 changed files with 3 additions and 2 deletions

View File

@ -165,7 +165,7 @@ void Crossfader::ProcessMessage(IMessage &message) {
percent = (1.0f - percent);
}
float outputVolume = globalVolume * percent;
double outputVolume = globalVolume * percent;
#if 0
std::string dir = (fade->direction == FadeIn) ? "in" : "out";

View File

@ -150,6 +150,7 @@ void Player::Destroy() {
return; /* already terminated (or terminating) */
}
this->listener = nullptr;
this->state = Player::Quit;
this->writeToOutputCondition.notify_all();
this->thread->detach();

View File

@ -387,7 +387,7 @@ void TransportWindow::Update(TimeMode timeMode) {
OFF(c, disabled);
}
else {
secondsTotal = transport.GetDuration();
secondsTotal = (int) transport.GetDuration();
std::string title, album, artist;