From 22f45fbd668796fc46e25a3e369ea0bd62659b41 Mon Sep 17 00:00:00 2001 From: apoorv569 Date: Fri, 18 Mar 2022 17:37:33 +0530 Subject: [PATCH] Temporary fix the short sample not looping from beginning. --- src/GUI/MainFrame.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index 406f4e9..f6a14fe 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -214,13 +214,13 @@ void cMainFrame::OnMediaFinished(wxMediaEvent& event) { if (m_pTransportControls->CanLoop()) { - if (!m_pMediaCtrl->Play()) - { - wxMessageDialog msgDialog(NULL, _("Error! Cannot loop media."), _("Error"), wxOK | wxICON_ERROR); - msgDialog.ShowModal(); - } - else - m_pMediaCtrl->Play(); + // FIXME: Temporary fix for the sample not playing from beginning when looping. Might need to change this. + if (m_pMediaCtrl->Stop()) // TODO: <-- + if (!m_pMediaCtrl->Play()) + { + wxMessageDialog msgDialog(NULL, _("Error! Cannot loop media."), _("Error"), wxOK | wxICON_ERROR); + msgDialog.ShowModal(); + } } else {