Starting restructure of recording behaviour to allow for a lazy setting of out...

Starting restructure of recording behaviour to allow for a lazy setting of out file path, e.g. to modify during runtime
parent a04d1327
...@@ -66,14 +66,6 @@ ProjectName = MyVirtualAcousticsProject ...@@ -66,14 +66,6 @@ ProjectName = MyVirtualAcousticsProject
[Debug] [Debug]
# Record device input and store to hard drive (will record every input channel)
InputRecordEnabled = false
InputRecordFileName = $(ProjectName)_in.wav
# Record device output and store to hard drive (will record every output channel)
OutputRecordEnabled = false
OutputRecordFilePath = $(ProjectName)_out.wav
# Set log level: 0 = quiet; 1 = errors; 2 = warnings (default); 3 = info; 4 = verbose; 5 = trace; # Set log level: 0 = quiet; 1 = errors; 2 = warnings (default); 3 = info; 4 = verbose; 5 = trace;
LogLevel = @ITA_VACORE_DEFAULT_DEBUG_LEVEL@ LogLevel = @ITA_VACORE_DEFAULT_DEBUG_LEVEL@
...@@ -109,6 +101,16 @@ BufferSize = AUTO ...@@ -109,6 +101,16 @@ BufferSize = AUTO
# Define number of output channels manually (e.g. for virtual device) # Define number of output channels manually (e.g. for virtual device)
OutputChannels = AUTO OutputChannels = AUTO
# Record device input and store to hard drive (will record every input channel)
RecordInputEnabled = false
RecordInputFileName = device_in.wav
RecordInputBaseFolder = recordings/$(ProjectName)/device
# Record device output and store to hard drive (will record every output channel)
RecordOutputEnabled = false
RecordOutputFileName = device_out.wav
RecordOutputBaseFolder = recordings/$(ProjectName)/device
[Calibration] [Calibration]
...@@ -233,7 +235,8 @@ NumChannels = 2 ...@@ -233,7 +235,8 @@ NumChannels = 2
IRFilterLengthSamples = 88200 IRFilterLengthSamples = 88200
OutputMonitoring = true OutputMonitoring = true
RecordOutputEnabled = false RecordOutputEnabled = false
RecordOutputFilePath = $(ProjectName)_Renderer_MyGenericRenderer_Output.wav RecordOutputFileName = renderer_out.wav
RecordOutputBaseFolder = recordings/$(ProjectName)/renderer/MyGenericRenderer
[Renderer:MyAirTrafficNoiseRenderer] [Renderer:MyAirTrafficNoiseRenderer]
Class = BinauralAirTrafficNoise Class = BinauralAirTrafficNoise
......
...@@ -221,7 +221,7 @@ protected: ...@@ -221,7 +221,7 @@ protected:
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
ITASampleFrame* psfOutput; //!< Accumulated listener output signals ITASampleFrame* psfOutput; //!< Accumulated listener output signals
ITAAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals ITABufferedAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals
void PreRequest() void PreRequest()
{ {
...@@ -261,7 +261,8 @@ protected: ...@@ -261,7 +261,8 @@ protected:
props.eQuantization = ITAQuantization::ITA_FLOAT; props.eQuantization = ITAQuantization::ITA_FLOAT;
props.iChannels = 2; props.iChannels = 2;
props.iLength = 0; props.iLength = 0;
pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( sOutput, props ); pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( props );
pListenerOutputAudioFileWriter->SetFilePath( sOutput );
} }
void FinalizeDump() void FinalizeDump()
......
...@@ -220,7 +220,7 @@ protected: ...@@ -220,7 +220,7 @@ protected:
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
ITASampleFrame* psfOutput; //!< Accumulated listener output signals ITASampleFrame* psfOutput; //!< Accumulated listener output signals
ITAAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals ITABufferedAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals
inline void PreRequest() inline void PreRequest()
{ {
...@@ -261,7 +261,8 @@ protected: ...@@ -261,7 +261,8 @@ protected:
props.eQuantization = ITAQuantization::ITA_FLOAT; props.eQuantization = ITAQuantization::ITA_FLOAT;
props.iChannels = 2; props.iChannels = 2;
props.iLength = 0; props.iLength = 0;
pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( sOutput, props ); pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( props );
pListenerOutputAudioFileWriter->SetFilePath( sOutput );
}; };
inline void FinalizeDump() inline void FinalizeDump()
......
...@@ -920,7 +920,8 @@ CVAPrototypeFreeFieldAudioRenderer::CVAPFFReceiver* CVAPrototypeFreeFieldAudioRe ...@@ -920,7 +920,8 @@ CVAPrototypeFreeFieldAudioRenderer::CVAPFFReceiver* CVAPrototypeFreeFieldAudioRe
props.eQuantization = ITAQuantization::ITA_FLOAT; props.eQuantization = ITAQuantization::ITA_FLOAT;
props.iChannels = m_iRecordSoundReceiversNumChannels; props.iChannels = m_iRecordSoundReceiversNumChannels;
props.iLength = 0; props.iLength = 0;
pListener->pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( sFileBaseName, props ); pListener->pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( props );
pListener->pListenerOutputAudioFileWriter->SetFilePath( sFileBaseName );
VA_INFO( "PrototypeFreeFieldAudioRenderer", "Will record listener output signal and export to file '" << sFileBaseName << "' using " << m_iRecordSoundReceiversNumChannels << " channels after deletion" ); VA_INFO( "PrototypeFreeFieldAudioRenderer", "Will record listener output signal and export to file '" << sFileBaseName << "' using " << m_iRecordSoundReceiversNumChannels << " channels after deletion" );
} }
......
...@@ -212,7 +212,7 @@ protected: ...@@ -212,7 +212,7 @@ protected:
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
ITASampleFrame* psfOutput; //!< Accumulated listener output signals ITASampleFrame* psfOutput; //!< Accumulated listener output signals
ITAAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals ITABufferedAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals
void PreRequest() void PreRequest()
{ {
......
...@@ -58,7 +58,7 @@ class CVAPTHASoundPathFactory; ...@@ -58,7 +58,7 @@ class CVAPTHASoundPathFactory;
* The prototype hearing aid audio renderer implements sound propagation for * The prototype hearing aid audio renderer implements sound propagation for
* virtual hearing aids, based on the concept of binaural synthesis. * virtual hearing aids, based on the concept of binaural synthesis.
* *
* It accounts for * It accounts for
* - multichannel receiver directivity (HARTF), n-channel filters possible * - multichannel receiver directivity (HARTF), n-channel filters possible
* - source directivity * - source directivity
* - medium propagation delay * - medium propagation delay
...@@ -68,7 +68,7 @@ class CVAPTHASoundPathFactory; ...@@ -68,7 +68,7 @@ class CVAPTHASoundPathFactory;
* - Doppler shifts (source and listener movement in medium of finite speed of sound) * - Doppler shifts (source and listener movement in medium of finite speed of sound)
* *
*/ */
class CVAPTHearingAidRenderer : public IVAAudioRenderer, public ITADatasourceRealization, public CVAObject class CVAPTHearingAidRenderer : public IVAAudioRenderer, public ITADatasourceRealization, public CVAObject
{ {
public: public:
CVAPTHearingAidRenderer( const CVAAudioRendererInitParams& oParams ); CVAPTHearingAidRenderer( const CVAAudioRendererInitParams& oParams );
...@@ -81,13 +81,13 @@ public: ...@@ -81,13 +81,13 @@ public:
* scene. This call should be blocking until reset is done. * scene. This call should be blocking until reset is done.
*/ */
void Reset(); void Reset();
//! Load a user requested scene //! Load a user requested scene
/** /**
* This method loads a scene, usually a file path to geometry data. * This method loads a scene, usually a file path to geometry data.
*/ */
inline void LoadScene( const std::string& ) {}; inline void LoadScene( const std::string& ) {};
//! Handle a scene state change //! Handle a scene state change
/** /**
* This method updates the internal representation of the VA Scene * This method updates the internal representation of the VA Scene
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
* of the sound path entities * of the sound path entities
*/ */
void UpdateGlobalAuralizationMode( int iGlobalAuralizationMode ); void UpdateGlobalAuralizationMode( int iGlobalAuralizationMode );
//! Render output sample blocks //! Render output sample blocks
/** /**
* This method renders the sound propagation based on the binaural approach * This method renders the sound propagation based on the binaural approach
...@@ -121,13 +121,13 @@ public: ...@@ -121,13 +121,13 @@ public:
CVAStruct CallObject( const CVAStruct& oArgs ); CVAStruct CallObject( const CVAStruct& oArgs );
void onStartDumpListeners(const std::string& sFilenameFormat); void onStartDumpListeners( const std::string& sFilenameFormat );
void onStopDumpListeners(); void onStopDumpListeners();
protected: protected:
//! Internal source representation //! Internal source representation
class Source : public CVAPoolObject class Source : public CVAPoolObject
{ {
public: public:
class Config class Config
...@@ -176,8 +176,8 @@ protected: ...@@ -176,8 +176,8 @@ protected:
}; };
double GetCreationTimestamp() const double GetCreationTimestamp() const
{ {
return m_dCreationTimeStamp; return m_dCreationTimeStamp;
}; };
private: private:
...@@ -186,7 +186,7 @@ protected: ...@@ -186,7 +186,7 @@ protected:
//! Internal listener representation //! Internal listener representation
class Listener : public CVAPoolObject class Listener : public CVAPoolObject
{ {
public: public:
class Config class Config
...@@ -202,7 +202,7 @@ protected: ...@@ -202,7 +202,7 @@ protected:
}; };
Listener( CVACoreImpl* pCore, const Config& oConf ) Listener( CVACoreImpl* pCore, const Config& oConf )
: m_pCore( pCore ), m_oConf( oConf ) : m_pCore( pCore ), m_oConf( oConf )
{}; {};
CVACoreImpl* m_pCore; CVACoreImpl* m_pCore;
...@@ -216,10 +216,10 @@ protected: ...@@ -216,10 +216,10 @@ protected:
VAVec3 vPredUp; //!< Estimated Orientation (Up-Vektor) VAVec3 vPredUp; //!< Estimated Orientation (Up-Vektor)
ITASampleFrame* psfOutput; //!< Accumulated listener output signals ITASampleFrame* psfOutput; //!< Accumulated listener output signals
ITAAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals ITABufferedAudiofileWriter* pListenerOutputAudioFileWriter; //!< File writer used for dumping the listener signals
void PreRequest() void PreRequest()
{ {
pData = nullptr; pData = nullptr;
CVABasicMotionModel::Config oListenerMotionConfig; CVABasicMotionModel::Config oListenerMotionConfig;
...@@ -234,7 +234,7 @@ protected: ...@@ -234,7 +234,7 @@ protected:
psfOutput = nullptr; psfOutput = nullptr;
}; };
void PreRelease() void PreRelease()
{ {
delete pMotionModel; delete pMotionModel;
pMotionModel = nullptr; pMotionModel = nullptr;
...@@ -243,18 +243,19 @@ protected: ...@@ -243,18 +243,19 @@ protected:
FinalizeDump(); FinalizeDump();
}; };
void InitDump(const std::string& sFilename) { void InitDump( const std::string& sFilename ) {
std::string sOutput(sFilename); std::string sOutput( sFilename );
sOutput = SubstituteMacro(sOutput, "ListenerName", pData->sName); sOutput = SubstituteMacro( sOutput, "ListenerName", pData->sName );
sOutput = SubstituteMacro(sOutput, "ListenerID", IntToString(pData->iID)); sOutput = SubstituteMacro( sOutput, "ListenerID", IntToString( pData->iID ) );
ITAAudiofileProperties props; ITAAudiofileProperties props;
props.dSampleRate = m_pCore->GetCoreConfig()->oAudioDriverConfig.dSampleRate; props.dSampleRate = m_pCore->GetCoreConfig()->oAudioDriverConfig.dSampleRate;
props.eDomain = ITADomain::ITA_TIME_DOMAIN; props.eDomain = ITADomain::ITA_TIME_DOMAIN;
props.eQuantization = ITAQuantization::ITA_FLOAT; props.eQuantization = ITAQuantization::ITA_FLOAT;
props.iChannels = 2; props.iChannels = 2;
props.iLength = 0; props.iLength = 0;
pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create(sOutput, props); pListenerOutputAudioFileWriter = ITABufferedAudiofileWriter::create( props );
pListenerOutputAudioFileWriter->SetFilePath( sOutput );
} }
void FinalizeDump() { void FinalizeDump() {
...@@ -273,7 +274,7 @@ private: ...@@ -273,7 +274,7 @@ private:
CVASceneState* m_pNewSceneState; CVASceneState* m_pNewSceneState;
int m_iCurGlobalAuralizationMode; int m_iCurGlobalAuralizationMode;
IVAObjectPool* m_pSoundPathPool; IVAObjectPool* m_pSoundPathPool;
CVAPTHASoundPathFactory* m_pSoundPathFactory; CVAPTHASoundPathFactory* m_pSoundPathFactory;
std::list< CVAPTHASoundPath* > m_lSoundPaths; //!< List of sound paths in user context (VACore calls) std::list< CVAPTHASoundPath* > m_lSoundPaths; //!< List of sound paths in user context (VACore calls)
...@@ -298,7 +299,7 @@ private: ...@@ -298,7 +299,7 @@ private:
//std::string m_sDumpListenersFilenameFormat; //std::string m_sDumpListenersFilenameFormat;
double m_dDumpListenersGain; double m_dDumpListenersGain;
ITAAtomicInt m_iDumpListenersFlag; ITAAtomicInt m_iDumpListenersFlag;
int m_iHRIRFilterLength; //!< Length of the HRIR filter DSP module int m_iHRIRFilterLength; //!< Length of the HRIR filter DSP module
int m_iDefaultVDLSwitchingAlgorithm; int m_iDefaultVDLSwitchingAlgorithm;
...@@ -351,8 +352,8 @@ private: ...@@ -351,8 +352,8 @@ private:
void Init( const CVAStruct& oArgs ); void Init( const CVAStruct& oArgs );
void ManageSoundPaths( const CVASceneState* pCurScene, void ManageSoundPaths( const CVASceneState* pCurScene,
const CVASceneState* pNewScene, const CVASceneState* pNewScene,
const CVASceneStateDiff* pDiff ); const CVASceneStateDiff* pDiff );
void UpdateSources(); void UpdateSources();
CVAPTHearingAidRenderer::Listener* CreateListener( int iID, const CVAReceiverState* pListenerState ); CVAPTHearingAidRenderer::Listener* CreateListener( int iID, const CVAReceiverState* pListenerState );
void DeleteListener( int iID ); void DeleteListener( int iID );
...@@ -360,7 +361,7 @@ private: ...@@ -360,7 +361,7 @@ private:
void DeleteSource( int iID ); void DeleteSource( int iID );
CVAPTHASoundPath* CreateSoundPath( Source* pSource, Listener* pListener ); CVAPTHASoundPath* CreateSoundPath( Source* pSource, Listener* pListener );
void DeleteSoundPath( CVAPTHASoundPath* pPath ); void DeleteSoundPath( CVAPTHASoundPath* pPath );
void UpdateTrajectories(); void UpdateTrajectories();
void UpdateSoundPaths(); void UpdateSoundPaths();
......
...@@ -116,13 +116,17 @@ void CVACoreConfig::Init( const CVAStruct& oData ) ...@@ -116,13 +116,17 @@ void CVACoreConfig::Init( const CVAStruct& oData )
oHardwareSetup.Init( oData ); oHardwareSetup.Init( oData );
conf.OptBool( "Debug/InputRecordEnabled", bRecordDeviceInputEnabled, false ); conf.OptBool( "Audio device/RecordInputEnabled", bRecordDeviceInputEnabled, false );
conf.OptString( "Debug/InputRecordFilePath", sRecordDeviceInputFilePath ); conf.OptString( "Audio device/RecordInputFileName", sRecordDeviceInputFileName, "device_in.wav" );
sRecordDeviceInputFilePath = mMacros.SubstituteMacros( sRecordDeviceInputFilePath ); sRecordDeviceInputFileName = mMacros.SubstituteMacros( sRecordDeviceInputFileName );
conf.OptString( "Audio device/RecordInputBaseFolder", sRecordDeviceInputBaseFolder, "recordings/device" );
conf.OptBool( "Debug/OutputRecordEnabled", bRecordDeviceOutputEnabled, false ); sRecordDeviceInputBaseFolder = mMacros.SubstituteMacros( sRecordDeviceInputBaseFolder );
conf.OptString( "Debug/OutputRecordFilePath", sRecordFinalOutputFilePath );
sRecordFinalOutputFilePath = mMacros.SubstituteMacros( sRecordFinalOutputFilePath ); conf.OptBool( "Audio device/RecordOutputEnabled", bRecordDeviceOutputEnabled, false );
conf.OptString( "Audio device/RecordOutputFileName", sRecordDeviceOutputFileName, "device_out.wav" );
sRecordDeviceOutputFileName = mMacros.SubstituteMacros( sRecordDeviceOutputFileName );
conf.OptString( "Audio device/RecordOutputBaseFolder", sRecordDeviceOutputBaseFolder, "recordings/device" );
sRecordDeviceOutputBaseFolder = mMacros.SubstituteMacros( sRecordDeviceOutputBaseFolder );
conf.OptNumber( "HomogeneousMedium/DefaultRelativeHumidity", oInitialHomogeneousMedium.dRelativeHumidityPercent, g_dDefaultRelativeHumidity ); conf.OptNumber( "HomogeneousMedium/DefaultRelativeHumidity", oInitialHomogeneousMedium.dRelativeHumidityPercent, g_dDefaultRelativeHumidity );
conf.OptNumber( "HomogeneousMedium/DefaultSoundSpeed", oInitialHomogeneousMedium.dSoundSpeed, g_dDefaultSpeedOfSound ); conf.OptNumber( "HomogeneousMedium/DefaultSoundSpeed", oInitialHomogeneousMedium.dSoundSpeed, g_dDefaultSpeedOfSound );
...@@ -135,7 +139,7 @@ void CVACoreConfig::Init( const CVAStruct& oData ) ...@@ -135,7 +139,7 @@ void CVACoreConfig::Init( const CVAStruct& oData )
if( sDefaultAmplitudeCalibrationMode == "124dB" ) if( sDefaultAmplitudeCalibrationMode == "124dB" )
dDefaultAmplitudeCalibration = g_dSoundPower_128dB_SPL_1m; dDefaultAmplitudeCalibration = g_dSoundPower_128dB_SPL_1m;
conf.OptNumber( "Calibration/DefaultMinimumDistance", dDefaultMinimumDistance, 0.25f ); // translates +12 dB SPL conf.OptNumber( "Calibration/DefaultMinimumDistance", dDefaultMinimumDistance, 0.25f ); // translates to max +12 dB SPL
conf.OptNumber( "Calibration/DefaultDistance", dDefaultDistance, 2.0f ); // translates to -6 dB SPL conf.OptNumber( "Calibration/DefaultDistance", dDefaultDistance, 2.0f ); // translates to -6 dB SPL
......
...@@ -39,10 +39,12 @@ public: ...@@ -39,10 +39,12 @@ public:
std::vector< std::string > vsSearchPaths; //!< Search paths (existing directories only) std::vector< std::string > vsSearchPaths; //!< Search paths (existing directories only)
bool bRecordDeviceInputEnabled; //!< Switch to store entire device input stream record to hard drive bool bRecordDeviceInputEnabled; //!< Switch to store entire device input stream record to hard drive
std::string sRecordDeviceInputFilePath; //!< File path where to store the input stream record to hard drive std::string sRecordDeviceInputFileName; //!< File path where to store the input stream record to hard drive
std::string sRecordDeviceInputBaseFolder; //!< File base path of stream record
bool bRecordDeviceOutputEnabled; //!< Switch to store entire device output stream record to hard drive bool bRecordDeviceOutputEnabled; //!< Switch to store entire device output stream record to hard drive
std::string sRecordFinalOutputFilePath; //!< File path where to store the output stream record to hard drive std::string sRecordDeviceOutputFileName; //!< File path where to store the output stream record to hard drive
std::string sRecordDeviceOutputBaseFolder; //!< File base path of stream record
int iTriggerUpdateMilliseconds; int iTriggerUpdateMilliseconds;
......
...@@ -492,7 +492,26 @@ void CVACoreImpl::Initialize() { ...@@ -492,7 +492,26 @@ void CVACoreImpl::Initialize() {
if( m_oCoreConfig.bRecordDeviceInputEnabled ) if( m_oCoreConfig.bRecordDeviceInputEnabled )
{ {
m_pStreamProbeDeviceInput = new ITAStreamProbe( pInputTail, m_oCoreConfig.sRecordDeviceInputFilePath ); VistaFileSystemFile oRecordFile( m_oCoreConfig.sRecordDeviceInputFileName );
VistaFileSystemDirectory oRecordBaseFolder( m_oCoreConfig.sRecordDeviceInputBaseFolder );
if( !oRecordBaseFolder.Exists() )
{
if( oRecordBaseFolder.CreateWithParentDirectories() )
{
VA_INFO( "Core", "Created device input record base folder " << oRecordBaseFolder.GetName() << " with parent directories" );
}
else
{
VA_EXCEPT2( INVALID_PARAMETER, "Could not create non-existent device input record base folder '" + oRecordBaseFolder.GetName() + "'" );
}
}
std::string sFilePath = oRecordBaseFolder.GetName() + "/" + oRecordFile.GetLocalName();
if( VistaFileSystemFile( sFilePath ).Exists() )
VA_INFO( "Core", "Device input record file '" << sFilePath << "' exists, will overwrite" );
m_pStreamProbeDeviceInput = new ITAStreamProbe( pInputTail, sFilePath );
pInputTail = m_pStreamProbeDeviceInput; pInputTail = m_pStreamProbeDeviceInput;
} }
} }
...@@ -560,7 +579,26 @@ void CVACoreImpl::Initialize() { ...@@ -560,7 +579,26 @@ void CVACoreImpl::Initialize() {
ITADatasource* pOutputTail = m_pOutputStreamDetector; ITADatasource* pOutputTail = m_pOutputStreamDetector;
if( m_oCoreConfig.bRecordDeviceOutputEnabled ) if( m_oCoreConfig.bRecordDeviceOutputEnabled )
{ {
m_pStreamProbeFinal = new ITAStreamProbe( pOutputTail, m_oCoreConfig.sRecordFinalOutputFilePath ); VistaFileSystemFile oRecordFile( m_oCoreConfig.sRecordDeviceOutputFileName );
VistaFileSystemDirectory oRecordBaseFolder( m_oCoreConfig.sRecordDeviceOutputBaseFolder );
if( !oRecordBaseFolder.Exists() )
{
if( oRecordBaseFolder.CreateWithParentDirectories() )
{
VA_INFO( "Core", "Created device output record base folder " << oRecordBaseFolder.GetName() << " with parent directories" );
}
else
{
VA_EXCEPT2( INVALID_PARAMETER, "Could not create non-existent device output record base folder '" + oRecordBaseFolder.GetName() + "'" );
}
}
std::string sFilePath = oRecordBaseFolder.GetName() + "/" + oRecordFile.GetLocalName();
if( VistaFileSystemFile( sFilePath ).Exists() )
VA_INFO( "Core", "Device output record file '" << sFilePath << "' exists, will overwrite" );
m_pStreamProbeFinal = new ITAStreamProbe( pOutputTail, sFilePath );
pOutputTail = m_pStreamProbeFinal; pOutputTail = m_pStreamProbeFinal;
} }
...@@ -902,7 +940,7 @@ void CVACoreImpl::GetModules( std::vector< CVAModuleInfo >& viModuleInfos ) cons ...@@ -902,7 +940,7 @@ void CVACoreImpl::GetModules( std::vector< CVAModuleInfo >& viModuleInfos ) cons
VA_PRINT( "'" << v[ i ].sName << "'\t\t\t" << v[ i ].sDesc ); VA_PRINT( "'" << v[ i ].sName << "'\t\t\t" << v[ i ].sDesc );
viModuleInfos[ i ].sName = v[ i ].sName; viModuleInfos[ i ].sName = v[ i ].sName;
viModuleInfos[ i ].sDesc = v[ i ].sDesc; viModuleInfos[ i ].sDesc = v[ i ].sDesc;
} }
} }
VA_RETHROW; VA_RETHROW;
...@@ -4504,7 +4542,6 @@ void CVACoreImpl::InitializeAudioRenderers() ...@@ -4504,7 +4542,6 @@ void CVACoreImpl::InitializeAudioRenderers()
conf.ReqString( "RecordOutputBaseFolder", sBaseFolderRAW ); conf.ReqString( "RecordOutputBaseFolder", sBaseFolderRAW );
std::string sBaseFolder = m_oCoreConfig.mMacros.SubstituteMacros( sBaseFolderRAW ); std::string sBaseFolder = m_oCoreConfig.mMacros.SubstituteMacros( sBaseFolderRAW );
oRecordOutputBaseFolder.SetName( sBaseFolder ); oRecordOutputBaseFolder.SetName( sBaseFolder );
} }
if( !oRecordOutputBaseFolder.Exists() ) if( !oRecordOutputBaseFolder.Exists() )
...@@ -4517,16 +4554,10 @@ void CVACoreImpl::InitializeAudioRenderers() ...@@ -4517,16 +4554,10 @@ void CVACoreImpl::InitializeAudioRenderers()
{ {
VA_EXCEPT2( INVALID_PARAMETER, "Could not create non-existent renderer record base folder '" + oRecordOutputBaseFolder.GetName() + "'" ); VA_EXCEPT2( INVALID_PARAMETER, "Could not create non-existent renderer record base folder '" + oRecordOutputBaseFolder.GetName() + "'" );
} }
}
if( oRecordOutputFile.Exists() )
{
VA_INFO( "Core", "Rendering record file '" << oRecordOutputFile.GetName() << "' exists, will overwrite" );
} }
oParams.sRecordOutputFileName = oRecordOutputFile.GetLocalName(); oParams.sRecordOutputFileName = oRecordOutputFile.GetLocalName();
oParams.sRecordOutputBaseFolder = oRecordOutputFile.GetParentDirectory(); oParams.sRecordOutputBaseFolder = oRecordOutputBaseFolder.GetName();
} }
...@@ -4547,6 +4578,10 @@ void CVACoreImpl::InitializeAudioRenderers() ...@@ -4547,6 +4578,10 @@ void CVACoreImpl::InitializeAudioRenderers()
if( oParams.bRecordOutputEnabled ) if( oParams.bRecordOutputEnabled )
{ {
std::string sFilePath = oParams.sRecordOutputBaseFolder + "/" + oParams.sRecordOutputFileName; std::string sFilePath = oParams.sRecordOutputBaseFolder + "/" + oParams.sRecordOutputFileName;
if( VistaFileSystemFile( sFilePath ).Exists() )
VA_INFO( "Core", "Rendering record file '" << sFilePath << "' exists, will overwrite" );
VistaFileSystemFile oFile( sFilePath ); VistaFileSystemFile oFile( sFilePath );
oRendererDesc.pOutputRecorder = new ITAStreamProbe( pRendererOutputTail, oFile.GetName() ); oRendererDesc.pOutputRecorder = new ITAStreamProbe( pRendererOutputTail, oFile.GetName() );
pRendererOutputTail = oRendererDesc.pOutputRecorder; pRendererOutputTail = oRendererDesc.pOutputRecorder;
...@@ -4675,7 +4710,6 @@ void CVACoreImpl::InitializeReproductionModules() ...@@ -4675,7 +4710,6 @@ void CVACoreImpl::InitializeReproductionModules()
conf.ReqString( "RecordInputBaseFolder", sBaseFolderRAW ); conf.ReqString( "RecordInputBaseFolder", sBaseFolderRAW );
std::string sBaseFolder = m_oCoreConfig.mMacros.SubstituteMacros( sBaseFolderRAW ); std::string sBaseFolder = m_oCoreConfig.mMacros.SubstituteMacros( sBaseFolderRAW );
oRecordInputFolder.SetName( sBaseFolder ); oRecordInputFolder.SetName( sBaseFolder );
} }
if( !oRecordInputFolder.Exists() ) if( !oRecordInputFolder.Exists() )
...@@ -4688,16 +4722,10 @@ void CVACoreImpl::InitializeReproductionModules() ...@@ -4688,16 +4722,10 @@ void CVACoreImpl::InitializeReproductionModules()