Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/recorder/jamrecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ CJamSession::~CJamSession()
*/
void CJamSession::DisconnectClient ( int iChID )
{
if ( vecptrJamClients[iChID] == nullptr )
{
chIdDisconnected = iChID;
return;
}

vecptrJamClients[iChID]->Disconnect();

jamClientConnections.append ( new CJamClientConnection ( vecptrJamClients[iChID]->NumAudioChannels(),
Expand Down Expand Up @@ -486,6 +492,7 @@ void CJamRecorder::OnAboutToQuit()
QThread::currentThread()->exit();
}

// ChIdMutex held
Comment thread
pljones marked this conversation as resolved.
void CJamRecorder::ReaperProjectFromCurrentSession()
{
QString reaperProjectFileName = currentSession->SessionDir().filePath ( currentSession->Name().append ( ".rpp" ) );
Expand All @@ -511,6 +518,7 @@ void CJamRecorder::ReaperProjectFromCurrentSession()
}
}

// ChIdMutex held
void CJamRecorder::AudacityLofFromCurrentSession()
{
QString audacityLofFileName = currentSession->SessionDir().filePath ( currentSession->Name().append ( ".lof" ) );
Expand Down Expand Up @@ -589,7 +597,6 @@ void CJamRecorder::SessionDirToReaper ( QString& strSessionDirName, int serverFr
*/
void CJamRecorder::OnDisconnected ( int iChID )
{
QMutexLocker mutexLocker ( &ChIdMutex );
if ( !isRecording )
{
qWarning() << "CJamRecorder::OnDisconnected: channel" << iChID << "disconnected but not recording";
Expand All @@ -600,6 +607,7 @@ void CJamRecorder::OnDisconnected ( int iChID )
return;
}

QMutexLocker mutexLocker ( &ChIdMutex );
currentSession->DisconnectClient ( iChID );
}

Expand Down
Loading