diff options
author | Henri Herscher <henri@oreka.org> | 2005-11-04 17:05:47 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2005-11-04 17:05:47 +0000 |
commit | ee1096e5be83ab9600d7627228cfe0fdefd7c8a7 (patch) | |
tree | 3b1465db201fdd5ef307cef5ff6908578abe2baa | |
parent | 5699411ccf13cff161073db7d5dd987009f00e88 (diff) |
Added AudioOutputPath config parameter
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@40 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r-- | orkaudio/AudioTape.cpp | 2 | ||||
-rw-r--r-- | orkaudio/BatchProcessing.cpp | 2 | ||||
-rw-r--r-- | orkaudio/Config.cpp | 2 | ||||
-rw-r--r-- | orkaudio/Config.h | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/orkaudio/AudioTape.cpp b/orkaudio/AudioTape.cpp index 312524a..05f2867 100644 --- a/orkaudio/AudioTape.cpp +++ b/orkaudio/AudioTape.cpp @@ -137,7 +137,7 @@ void AudioTape::Write() if (m_state == StateActive) { // A file format was successfully added to the tape, open it - CStdString file = m_filePath + m_fileIdentifier; + CStdString file = CONFIG.m_audioOutputPath + "/" + m_filePath + m_fileIdentifier; m_audioFileRef->Open(file, AudioFile::WRITE); // determine what final extension the file will have after optional compression diff --git a/orkaudio/BatchProcessing.cpp b/orkaudio/BatchProcessing.cpp index 6aa1600..e154cb7 100644 --- a/orkaudio/BatchProcessing.cpp +++ b/orkaudio/BatchProcessing.cpp @@ -77,7 +77,7 @@ void BatchProcessing::ThreadHandler(void *args) default: outFileRef.reset(new LibSndFileFile(SF_FORMAT_GSM610 | SF_FORMAT_WAV)); } - CStdString file = audioTapeRef->GetPath() + audioTapeRef->GetIdentifier(); + CStdString file = CONFIG.m_audioOutputPath + "/" + audioTapeRef->GetPath() + audioTapeRef->GetIdentifier(); outFileRef->Open(file, AudioFile::WRITE); while(fileRef->ReadChunkMono(chunkRef)) diff --git a/orkaudio/Config.cpp b/orkaudio/Config.cpp index 0f6d0cc..35c7b6f 100644 --- a/orkaudio/Config.cpp +++ b/orkaudio/Config.cpp @@ -37,6 +37,7 @@ Config::Config() m_trackerHostname = TRACKER_HOSTNAME_DEFAULT; m_trackerTcpPort = TRACKER_TCP_PORT_DEFAULT; m_trackerServicename = TRACKER_SERVICENAME_DEFAULT; + m_audioOutputPath = AUDIO_OUTPUT_PATH_DEFAULT; char hostname[40]; ACE_OS::hostname(hostname, 40); @@ -70,6 +71,7 @@ void Config::Define(Serializer* s) s->StringValue(SERVICE_NAME_PARAM, m_serviceName); s->IntValue(REPORTING_RETRY_DELAY_PARAM, m_reportingRetryDelay); s->IntValue(CLIENT_TIMEOUT_PARAM, m_clientTimeout); + s->StringValue(AUDIO_OUTPUT_PATH_PARAM, m_audioOutputPath); } void Config::Validate() diff --git a/orkaudio/Config.h b/orkaudio/Config.h index 6b0567a..4d9f150 100644 --- a/orkaudio/Config.h +++ b/orkaudio/Config.h @@ -57,6 +57,8 @@ #define SERVICE_NAME_PARAM "ServiceName" #define REPORTING_RETRY_DELAY_PARAM "ReportingRetryDelay" #define CLIENT_TIMEOUT_PARAM "ClientTimeout" +#define AUDIO_OUTPUT_PATH_PARAM "AudioOutputPath" +#define AUDIO_OUTPUT_PATH_DEFAULT "." class Config : public Object @@ -91,6 +93,7 @@ public: CStdString m_serviceName; int m_reportingRetryDelay; int m_clientTimeout; + CStdString m_audioOutputPath; }; |