mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Fixed GaplessTransport to send missing events while stopping playback
while buffering.
This commit is contained in:
parent
3e22c82a53
commit
5367cb2bf0
@ -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()
|
||||
|
@ -54,6 +54,7 @@ namespace musik {
|
||||
StreamAlmostDone = 4,
|
||||
StreamFinished = 5,
|
||||
StreamStopped = 6,
|
||||
StreamCompleted = 7,
|
||||
StreamError = -1
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user