]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATC.cxx
Alex Romosan:
[flightgear.git] / src / ATC / ATC.cxx
index 955cb8195f982a695bbd021ece95de9e4c1562a8..55a9dc814c50e9ea1cc8169b6b0aefac3ac8e080 100644 (file)
@@ -138,7 +138,7 @@ void FGATC::ReceiveUserCallback(int code) {
        SG_LOG(SG_ATC, SG_WARN, "WARNING - whichever ATC class was intended to receive callback code " << code << " didn't get it!!!");
 }
 
-void FGATC::SetResponseReqd(string rid) {
+void FGATC::SetResponseReqd(const string& rid) {
        receiving = false;
        responseReqd = true;
        respond = false;        // TODO - this ignores the fact that more than one plane could call this before response
@@ -149,7 +149,7 @@ void FGATC::SetResponseReqd(string rid) {
        responseTime = 1.8;             // TODO - randomize this slightly.
 }
 
-void FGATC::NotifyTransmissionFinished(string rid) {
+void FGATC::NotifyTransmissionFinished(const string& rid) {
        //cout << "Transmission finished, callsign = " << rid << '\n';
        receiving = false;
        responseID = rid;
@@ -195,7 +195,7 @@ void FGATC::ImmediateTransmit(int callback_code) {
 void FGATC::ProcessCallback(int code) {
 }
 
-void FGATC::AddPlane(string pid) {
+void FGATC::AddPlane(const string& pid) {
 }
 
 int FGATC::RemovePlane() {
@@ -219,7 +219,7 @@ void FGATC::SetData(ATCData* d) {
 // Outputs the transmission either on screen or as audio depending on user preference
 // The refname is a string to identify this sample to the sound manager
 // The repeating flag indicates whether the message should be repeated continuously or played once.
-void FGATC::Render(string msg, string refname, bool repeating) {
+void FGATC::Render(string& msg, const string& refname, bool repeating) {
        #ifdef ENABLE_AUDIO_SUPPORT
        _voice = (_voiceOK && fgGetBool("/sim/sound/voice"));
        if(_voice) {
@@ -230,7 +230,7 @@ void FGATC::Render(string msg, string refname, bool repeating) {
                             = new SGSoundSample(buf, len, 8000, false);
                        // TODO - at the moment the volume is always set off comm1 
                        // and can't be changed after the transmission has started.
-                       simple->set_volume(5.0 * fgGetDouble("/radios/comm[0]/volume"));
+                       simple->set_volume(5.0 * fgGetDouble("/instrumentation/comm[0]/volume"));
                        globals->get_soundmgr()->add(simple, refname);
                        if(repeating) {
                                globals->get_soundmgr()->play_looped(refname);
@@ -259,7 +259,7 @@ void FGATC::Render(string msg, string refname, bool repeating) {
 
 
 // Cease rendering a transmission.
-void FGATC::NoRender(string refname) {
+void FGATC::NoRender(const string& refname) {
        if(_playing) {
                if(_voice) {
                        #ifdef ENABLE_AUDIO_SUPPORT