mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-29 18:14:16 +00:00
Connected audio::Transport to Start and Stop buttons. Using hardcoded path for now
This commit is contained in:
parent
e70eb04472
commit
40e021d3d8
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -53,6 +53,7 @@ namespace musik { namespace cube {
|
||||
class TransportView: public Frame
|
||||
{
|
||||
private: typedef Frame base;
|
||||
public: friend class TransportController;
|
||||
|
||||
public: /*ctor*/ TransportView();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user