Author: derek Date: Mon May 14 22:21:31 2007 New Revision: 249 Modified: sofaswitch/trunk/am/audio.cxx sofaswitch/trunk/am/audio.h sofaswitch/trunk/am/comms.cxx sofaswitch/trunk/am/comms.h sofaswitch/trunk/am/main.cxx Log: Follow on changes, from using const PString & arguement, (which saves on cpu required to pass a parameter). Modified: sofaswitch/trunk/am/audio.cxx ============================================================================== --- sofaswitch/trunk/am/audio.cxx (original) +++ sofaswitch/trunk/am/audio.cxx Mon May 14 22:21:31 2007 @@ -273,7 +273,7 @@ return TRUE; } -void AudioBase::ProcessFile(PString & _audioFile) +void AudioBase::ProcessFile(const PString & _audioFile) { PTRACE(1, "AudioBase\tNow process file \"" << _audioFile << "\""); PWaitAndSignal m(audioFileLock); Modified: sofaswitch/trunk/am/audio.h ============================================================================== --- sofaswitch/trunk/am/audio.h (original) +++ sofaswitch/trunk/am/audio.h Mon May 14 22:21:31 2007 @@ -68,7 +68,7 @@ audio to/from the specified file. If the thread has already started, lock the mutex protecting access to the file and change the file to the new name */ - void ProcessFile(PString & _audioFile ///< the file we are about to start using + void ProcessFile(const PString & _audioFile ///< the file we are about to start using ); Modified: sofaswitch/trunk/am/comms.cxx ============================================================================== --- sofaswitch/trunk/am/comms.cxx (original) +++ sofaswitch/trunk/am/comms.cxx Mon May 14 22:21:31 2007 @@ -229,7 +229,7 @@ return FALSE; } -void Comms::SetReadFile(PString & newReadFile) +void Comms::SetReadFile(const PString & newReadFile) { PTRACE(3, "Set the read file to be " << newReadFile); audioReadFile = newReadFile; @@ -237,7 +237,7 @@ audioReadThread.ProcessFile(newReadFile); } -void Comms::SetWriteFile(PString & newWriteFile) +void Comms::SetWriteFile(const PString & newWriteFile) { PTRACE(1, "Set the write file to be " << newWriteFile); audioWriteFile = newWriteFile; Modified: sofaswitch/trunk/am/comms.h ============================================================================== --- sofaswitch/trunk/am/comms.h (original) +++ sofaswitch/trunk/am/comms.h Mon May 14 22:21:31 2007 @@ -146,14 +146,14 @@ audio from the specified file (which is the case for the answering machine. The answering machine will read aaudio from the specified file. */ - virtual void SetReadFile(PString & newReadFile); + virtual void SetReadFile(const PString & newReadFile); /**Actually set the file this application will write PCM audio data to. application will override this method, if it is allowed to put audio into this file (which is the case for the answering machine. The answering machine will write audio to the specified file. */ - virtual void SetWriteFile(PString & newWriteFile); + virtual void SetWriteFile(const PString & newWriteFile); /**Some MessageFrame instances do not obey the hangup command. This virtual method says we can hangup, cause we are one Modified: sofaswitch/trunk/am/main.cxx ============================================================================== --- sofaswitch/trunk/am/main.cxx (original) +++ sofaswitch/trunk/am/main.cxx Mon May 14 22:21:31 2007 @@ -119,8 +119,6 @@ PTRACE(3, "Select a default ID of "<< ourId); } - ourId = server + "/" + ourId; - PString ourPassword; if (args.HasOption("password")) { ourPassword = args.GetOptionString("password");