Fixed GaplessTransport to send missing events while stopping playback

while buffering.
This commit is contained in:
Casey Langen 2020-10-17 12:44:42 -07:00
parent 3e22c82a53
commit 5367cb2bf0
2 changed files with 3 additions and 1 deletions

View File

@ -49,6 +49,7 @@ static std::string TAG = "GaplessTransport";
if (instance->nextPlayer) { \
instance->nextPlayer->Detach(instance); \
instance->nextPlayer->Destroy(); \
this->RaiseStreamEvent(StreamCompleted, instance->nextPlayer); \
instance->nextPlayer = nullptr; \
}
@ -56,8 +57,8 @@ static std::string TAG = "GaplessTransport";
if (instance->activePlayer) { \
instance->activePlayer->Detach(instance); \
instance->activePlayer->Destroy(); \
this->RaiseStreamEvent(StreamCompleted, instance->activePlayer); \
instance->activePlayer = nullptr; \
instance->activePlayerState = StreamError; \
}
GaplessTransport::GaplessTransport()

View File

@ -54,6 +54,7 @@ namespace musik {
StreamAlmostDone = 4,
StreamFinished = 5,
StreamStopped = 6,
StreamCompleted = 7,
StreamError = -1
};