Revert "attempt to add level control to transmitted CW samples"
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 14 Jan 2023 13:36:42 +0000 (19:06 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 14 Jan 2023 13:36:42 +0000 (19:06 +0530)
This reverts commit 8837ae3c9eb59431cee1d8ef1fc808f631122796.

transmitter.c

index 7c7b7ba3e68f1ced39fc7bc6150f2411d0e412ce..7520e7596b643fead64666b07be538eca793c397 100644 (file)
@@ -1056,7 +1056,7 @@ static void full_tx_buffer(TRANSMITTER *tx) {
        //
        for (j=0; j< 480; j++) {
              new_protocol_iq_samples(0,0);
-       }
+       }       
     }
     txflag=1;
 //
@@ -1155,11 +1155,7 @@ void add_mic_sample(TRANSMITTER *tx,float mic_sample) {
   double mic_sample_double, ramp;
   int i,s;
   int updown;
-  double gain = 1.0;
 
-#ifdef SW_LEVEL_CTRL
-  gain=gain*(double)transmitter->drive_level*0.00392;
-#endif
 //
 // silence TX audio if tuning, or when doing CW.
 // (in order not to fire VOX)
@@ -1208,10 +1204,8 @@ void add_mic_sample(TRANSMITTER *tx,float mic_sample) {
        // side tone
        ramp=cwramp48[cw_shape];
        cwsample=0.00197 * getNextSideToneSample() * cw_keyer_sidetone_volume * ramp;
-       if(active_receiver->local_audio)
-            cw_audio_write(active_receiver,cwsample);
-
-        cw_shape_buffer48[tx->samples]=ramp*gain;
+       if(active_receiver->local_audio) cw_audio_write(active_receiver,cwsample);
+        cw_shape_buffer48[tx->samples]=ramp;
        //
        // In the new protocol, we MUST maintain a constant flow of audio samples to the radio
        // (at least for ANAN-200D and ANAN-7000 internal side tone generation)