mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Remove unnecessary PlayPauseChanged signal
and use existing PlaybackStateChanged signal.
This commit is contained in:
parent
36a55767c1
commit
411980fe2a
@ -787,7 +787,6 @@ void PlaybackService::PauseOrResume() {
|
|||||||
else if (state == PlaybackState::Playing) {
|
else if (state == PlaybackState::Playing) {
|
||||||
transport->Pause();
|
transport->Pause();
|
||||||
}
|
}
|
||||||
this->PlayPauseChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlaybackService::IsMuted() {
|
bool PlaybackService::IsMuted() {
|
||||||
@ -938,7 +937,7 @@ void PlaybackService::OnStreamEvent(StreamState eventType, std::string uri) {
|
|||||||
void PlaybackService::OnPlaybackEvent(PlaybackState eventType) {
|
void PlaybackService::OnPlaybackEvent(PlaybackState eventType) {
|
||||||
POST(this, MESSAGE_PLAYBACK_EVENT, (int64_t) eventType, 0);
|
POST(this, MESSAGE_PLAYBACK_EVENT, (int64_t) eventType, 0);
|
||||||
if (eventType == PlaybackState::Paused || eventType == PlaybackState::Playing) {
|
if (eventType == PlaybackState::Paused || eventType == PlaybackState::Playing) {
|
||||||
this->PlayPauseChanged();
|
this->PlaybackStateChanged(static_cast<PlaybackState>(eventType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,6 @@ namespace musik { namespace core { namespace audio {
|
|||||||
/* our unique events */
|
/* our unique events */
|
||||||
sigslot::signal2<size_t, musik::core::TrackPtr> TrackChanged;
|
sigslot::signal2<size_t, musik::core::TrackPtr> TrackChanged;
|
||||||
sigslot::signal0<> ModeChanged;
|
sigslot::signal0<> ModeChanged;
|
||||||
sigslot::signal0<> PlayPauseChanged;
|
|
||||||
sigslot::signal1<bool> Shuffled;
|
sigslot::signal1<bool> Shuffled;
|
||||||
sigslot::signal0<> QueueEdited;
|
sigslot::signal0<> QueueEdited;
|
||||||
|
|
||||||
|
@ -391,8 +391,8 @@ TransportWindow::TransportWindow(
|
|||||||
this->SetFrameVisible(false);
|
this->SetFrameVisible(false);
|
||||||
this->playback.TrackChanged.connect(this, &TransportWindow::OnPlaybackServiceTrackChanged);
|
this->playback.TrackChanged.connect(this, &TransportWindow::OnPlaybackServiceTrackChanged);
|
||||||
this->playback.ModeChanged.connect(this, &TransportWindow::OnPlaybackModeChanged);
|
this->playback.ModeChanged.connect(this, &TransportWindow::OnPlaybackModeChanged);
|
||||||
|
this->playback.PlaybackStateChanged.connect(this, &TransportWindow::OnPlaybackStateChanged);
|
||||||
this->playback.Shuffled.connect(this, &TransportWindow::OnPlaybackShuffled);
|
this->playback.Shuffled.connect(this, &TransportWindow::OnPlaybackShuffled);
|
||||||
this->playback.PlayPauseChanged.connect(this, &TransportWindow::OnPlayPauseChanged);
|
|
||||||
this->playback.VolumeChanged.connect(this, &TransportWindow::OnTransportVolumeChanged);
|
this->playback.VolumeChanged.connect(this, &TransportWindow::OnTransportVolumeChanged);
|
||||||
this->playback.TimeChanged.connect(this, &TransportWindow::OnTransportTimeChanged);
|
this->playback.TimeChanged.connect(this, &TransportWindow::OnTransportTimeChanged);
|
||||||
this->playback.StreamStateChanged.connect(this, &TransportWindow::OnPlaybackStreamStateChanged);
|
this->playback.StreamStateChanged.connect(this, &TransportWindow::OnPlaybackStreamStateChanged);
|
||||||
@ -595,7 +595,7 @@ void TransportWindow::OnTransportVolumeChanged() {
|
|||||||
DEBOUNCE_REFRESH(TimeMode::Sync, 0);
|
DEBOUNCE_REFRESH(TimeMode::Sync, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransportWindow::OnPlayPauseChanged() {
|
void TransportWindow::OnPlaybackStateChanged(PlaybackState state) {
|
||||||
DEBOUNCE_REFRESH(TimeMode::Sync, 0);
|
DEBOUNCE_REFRESH(TimeMode::Sync, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ namespace musik {
|
|||||||
|
|
||||||
void OnPlaybackServiceTrackChanged(size_t index, musik::core::TrackPtr track);
|
void OnPlaybackServiceTrackChanged(size_t index, musik::core::TrackPtr track);
|
||||||
void OnPlaybackModeChanged();
|
void OnPlaybackModeChanged();
|
||||||
void OnPlayPauseChanged();
|
void OnPlaybackStateChanged(musik::core::sdk::PlaybackState);
|
||||||
void OnPlaybackStreamStateChanged(musik::core::sdk::StreamState);
|
void OnPlaybackStreamStateChanged(musik::core::sdk::StreamState);
|
||||||
void OnTransportVolumeChanged();
|
void OnTransportVolumeChanged();
|
||||||
void OnTransportTimeChanged(double time);
|
void OnTransportTimeChanged(double time);
|
||||||
|
Loading…
Reference in New Issue
Block a user