mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-29 18:14:16 +00:00
Fixed deadlock after 2 songs (closes #32).
This commit is contained in:
parent
dcefa4afb1
commit
9ac32bd415
@ -88,12 +88,6 @@ void Transport::Start(const utfstring path)
|
||||
if (success)
|
||||
{
|
||||
this->PlaybackStartedOk();
|
||||
|
||||
// Stop currently playing song if any
|
||||
if (this->openStreams.size() > 1)
|
||||
{
|
||||
this->Stop(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -266,3 +266,9 @@ void ConsoleUI::ShutDown()
|
||||
delete instance;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ConsoleUI::StartNew()
|
||||
{
|
||||
Args a;
|
||||
this->PlayFile(a);
|
||||
}
|
@ -82,6 +82,8 @@ private: boost::mutex mutex;
|
||||
|
||||
private: void ShutDown();
|
||||
public: static DWORD WINAPI ThreadRun(LPVOID param);
|
||||
|
||||
public: void StartNew();
|
||||
};
|
||||
|
||||
}} // NS
|
||||
|
@ -51,4 +51,10 @@ DummyAudioEventHandler::~DummyAudioEventHandler()
|
||||
void DummyAudioEventHandler::PrintEvent(utfstring s)
|
||||
{
|
||||
this->cui->Print(_T("EVENT: " + s + _T("\n")));
|
||||
}
|
||||
|
||||
void DummyAudioEventHandler::OnMixpointReached()
|
||||
{
|
||||
this->PrintEvent(_T("Mix point reached"));
|
||||
//this->cui->StartNew(); // Endless test loop
|
||||
}
|
@ -63,7 +63,7 @@ public: void OnVolumeChangedOk() { this->PrintEvent(_T("Volume chan
|
||||
public: void OnVolumeChangedFail() { this->PrintEvent(_T("Volume changed FAIL")); };
|
||||
public: void OnStreamOpenOk() { this->PrintEvent(_T("Stream open OK")); };
|
||||
public: void OnStreamOpenFail() { this->PrintEvent(_T("Stream open FAIL")); };
|
||||
public: void OnMixpointReached() { this->PrintEvent(_T("Mix point reached")); };
|
||||
public: void OnMixpointReached() ;
|
||||
public: void OnSetPositionOk() { this->PrintEvent(_T("Set position OK")); };
|
||||
public: void OnSetPositionFail() { this->PrintEvent(_T("Set position FAIL")); };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user