Connected audio::Transport to Start and Stop buttons. Using hardcoded path for now

This commit is contained in:
bjorn.olievier 2008-04-07 19:25:47 +00:00
parent e70eb04472
commit 40e021d3d8
3 changed files with 24 additions and 3 deletions

View File

@ -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)
{
}
}
void TransportController::OnPlayPressed()
{
transport.Start(_T("d:\\musik\\test.mp3"));
}
void TransportController::OnStopPressed()
{
transport.Stop(0);
}

View File

@ -40,6 +40,7 @@
//////////////////////////////////////////////////////////////////////////////
#include <core/audio/Transport.h>
#include <cube/TransportView.hpp>
//////////////////////////////////////////////////////////////////////////////
@ -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();
};
//////////////////////////////////////////////////////////////////////////////

View File

@ -53,6 +53,7 @@ namespace musik { namespace cube {
class TransportView: public Frame
{
private: typedef Frame base;
public: friend class TransportController;
public: /*ctor*/ TransportView();