diff --git a/src/cube/TransportController.cpp b/src/cube/TransportController.cpp index 6821eb19e..b23a2e45f 100644 --- a/src/cube/TransportController.cpp +++ b/src/cube/TransportController.cpp @@ -2,7 +2,7 @@ // // License Agreement: // -// The following are Copyright © 2007, Casey Langen +// The following are Copyright © 2007, musikCube team // // Sources and Binaries of: mC2, win32cpp // @@ -57,8 +57,23 @@ using namespace musik::cube; void TransportController::OnViewCreated() { + this->transportView.playButton->Pressed.connect( + this, &TransportController::OnPlayPressed); + + this->transportView.stopButton->Pressed.connect( + this, &TransportController::OnStopPressed); } void TransportController::OnViewResized(Size size) { -} \ No newline at end of file +} + +void TransportController::OnPlayPressed() +{ + transport.Start(_T("d:\\musik\\test.mp3")); +} + +void TransportController::OnStopPressed() +{ + transport.Stop(0); +} diff --git a/src/cube/TransportController.hpp b/src/cube/TransportController.hpp index 0a2b31b9c..c722d4eb2 100644 --- a/src/cube/TransportController.hpp +++ b/src/cube/TransportController.hpp @@ -40,6 +40,7 @@ ////////////////////////////////////////////////////////////////////////////// +#include #include ////////////////////////////////////////////////////////////////////////////// @@ -57,7 +58,11 @@ public: /*ctor*/ TransportController(TransportView& transportView); protected: void OnViewCreated(); protected: void OnViewResized(Size size); -protected: TransportView& transportView; +protected: TransportView& transportView; +protected: musik::core::audio::Transport transport; + +protected: void OnPlayPressed(); +protected: void OnStopPressed(); }; ////////////////////////////////////////////////////////////////////////////// diff --git a/src/cube/TransportView.hpp b/src/cube/TransportView.hpp index a52c1925d..7e8587713 100644 --- a/src/cube/TransportView.hpp +++ b/src/cube/TransportView.hpp @@ -53,6 +53,7 @@ namespace musik { namespace cube { class TransportView: public Frame { private: typedef Frame base; +public: friend class TransportController; public: /*ctor*/ TransportView();