wxWidgets - wxMediaCtrl, how to loop media.
Can someone please explain how looping a media works with wxMediaCtrl. I am fairly new wxWidgets and C++ in general, but not a complete beginner at this point, I'm making a application for browsing and managing audio samples, so far with wxMediaCtrl I'm able to load, play and stop media at will, by simply calling MediaCtrl->Load() or MediaCtrl->Play(), but I can't understand how to loop a media after it finishes playing, reading the documentation and the provided sample from wxWidgets, which is far too long, I do understand that I need to catch wxEVT_MEDIA_FINISHED, and make a function that does when this event is fired. But I can't get it to work. I have a function to play media when a button is pressed like,
Code:
void Browser::OnClickPlay(wxCommandEvent& event) Code:
Bind(wxEVT_BUTTON, &Browser::OnClickPlay, this, BCID_Play); Code:
void Browser::OnClickLoop(wxCommandEvent& event) Code:
void Browser::OnMediaFinished(wxMediaEvent& event) |
Quote:
|
Thanks for updating us with your fix!
If your issue is solved please use the Thread Tools at top of thread to mark it as solved, and good luck! |
All times are GMT -5. The time now is 11:52 PM. |