mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +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)
|
if (success)
|
||||||
{
|
{
|
||||||
this->PlaybackStartedOk();
|
this->PlaybackStartedOk();
|
||||||
|
|
||||||
// Stop currently playing song if any
|
|
||||||
if (this->openStreams.size() > 1)
|
|
||||||
{
|
|
||||||
this->Stop(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -266,3 +266,9 @@ void ConsoleUI::ShutDown()
|
|||||||
delete instance;
|
delete instance;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConsoleUI::StartNew()
|
||||||
|
{
|
||||||
|
Args a;
|
||||||
|
this->PlayFile(a);
|
||||||
|
}
|
@ -82,6 +82,8 @@ private: boost::mutex mutex;
|
|||||||
|
|
||||||
private: void ShutDown();
|
private: void ShutDown();
|
||||||
public: static DWORD WINAPI ThreadRun(LPVOID param);
|
public: static DWORD WINAPI ThreadRun(LPVOID param);
|
||||||
|
|
||||||
|
public: void StartNew();
|
||||||
};
|
};
|
||||||
|
|
||||||
}} // NS
|
}} // NS
|
||||||
|
@ -51,4 +51,10 @@ DummyAudioEventHandler::~DummyAudioEventHandler()
|
|||||||
void DummyAudioEventHandler::PrintEvent(utfstring s)
|
void DummyAudioEventHandler::PrintEvent(utfstring s)
|
||||||
{
|
{
|
||||||
this->cui->Print(_T("EVENT: " + s + _T("\n")));
|
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 OnVolumeChangedFail() { this->PrintEvent(_T("Volume changed FAIL")); };
|
||||||
public: void OnStreamOpenOk() { this->PrintEvent(_T("Stream open OK")); };
|
public: void OnStreamOpenOk() { this->PrintEvent(_T("Stream open OK")); };
|
||||||
public: void OnStreamOpenFail() { this->PrintEvent(_T("Stream open FAIL")); };
|
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 OnSetPositionOk() { this->PrintEvent(_T("Set position OK")); };
|
||||||
public: void OnSetPositionFail() { this->PrintEvent(_T("Set position FAIL")); };
|
public: void OnSetPositionFail() { this->PrintEvent(_T("Set position FAIL")); };
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user