Pass frame size to recorder
This commit is contained in:
parent
3831e83535
commit
a80b437858
3 changed files with 8 additions and 3 deletions
|
@ -295,7 +295,8 @@ QMap<QString, QList<STrackItem>> CJamSession::TracksFromSessionDir(const QString
|
||||||
* @brief CJamRecorder::Init Create recording directory, if necessary, and connect signal handlers
|
* @brief CJamRecorder::Init Create recording directory, if necessary, and connect signal handlers
|
||||||
* @param server Server object emiting signals
|
* @param server Server object emiting signals
|
||||||
*/
|
*/
|
||||||
void CJamRecorder::Init(const CServer* server)
|
void CJamRecorder::Init( const CServer* server,
|
||||||
|
const int _iServerFrameSizeSamples )
|
||||||
{
|
{
|
||||||
QFileInfo fi(recordBaseDir.absolutePath());
|
QFileInfo fi(recordBaseDir.absolutePath());
|
||||||
fi.setCaching(false);
|
fi.setCaching(false);
|
||||||
|
@ -325,6 +326,8 @@ void CJamRecorder::Init(const CServer* server)
|
||||||
QObject::connect((const QObject *)server, SIGNAL ( AudioFrame(const int, const QString, const CHostAddress, const int, const CVector<int16_t>) ),
|
QObject::connect((const QObject *)server, SIGNAL ( AudioFrame(const int, const QString, const CHostAddress, const int, const CVector<int16_t>) ),
|
||||||
this, SLOT( OnFrame(const int, const QString, const CHostAddress, const int, const CVector<int16_t>) ),
|
this, SLOT( OnFrame(const int, const QString, const CHostAddress, const int, const CVector<int16_t>) ),
|
||||||
Qt::ConnectionType::QueuedConnection);
|
Qt::ConnectionType::QueuedConnection);
|
||||||
|
|
||||||
|
iServerFrameSizeSamples = _iServerFrameSizeSamples;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -139,7 +139,8 @@ class CJamRecorder : public QThread
|
||||||
public:
|
public:
|
||||||
CJamRecorder(const QString recordingDirName) :
|
CJamRecorder(const QString recordingDirName) :
|
||||||
recordBaseDir (recordingDirName), isRecording (false) {}
|
recordBaseDir (recordingDirName), isRecording (false) {}
|
||||||
void Init(const CServer* server);
|
|
||||||
|
void Init( const CServer* server, const int _iServerFrameSizeSamples );
|
||||||
|
|
||||||
static void SessionDirToReaper(QString& strSessionDirName);
|
static void SessionDirToReaper(QString& strSessionDirName);
|
||||||
|
|
||||||
|
@ -170,6 +171,7 @@ private:
|
||||||
|
|
||||||
bool isRecording;
|
bool isRecording;
|
||||||
CJamSession* currentSession;
|
CJamSession* currentSession;
|
||||||
|
int iServerFrameSizeSamples;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -397,7 +397,7 @@ CServer::CServer ( const int iNewMaxNumChan,
|
||||||
// Enable jam recording (if requested)
|
// Enable jam recording (if requested)
|
||||||
if ( bEnableRecording )
|
if ( bEnableRecording )
|
||||||
{
|
{
|
||||||
JamRecorder.Init ( this );
|
JamRecorder.Init ( this, iServerFrameSizeSamples );
|
||||||
JamRecorder.start();
|
JamRecorder.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue