]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/morse.cxx
- export font properties to the property tree again
[flightgear.git] / src / Sound / morse.cxx
index ea86999d84238988b280f08707eb3a6638439c8b..674fa991a0804769957b474121588c72f9b8bfcd 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -87,7 +87,7 @@ void make_tone( unsigned char *buf, int freq,
     int i, j;
 
     for ( i = 0; i < trans_len; ++i ) {
-       float level = ( sin( (double) i * 2.0 * SGD_PI / (BYTES_PER_SECOND / freq) ) )
+       float level = ( sin( (double) i * SGD_2PI / (BYTES_PER_SECOND / freq) ) )
            * ((double)i / trans_len) / 2.0 + 0.5;
 
        /* Convert to unsigned byte */
@@ -95,7 +95,7 @@ void make_tone( unsigned char *buf, int freq,
     }
 
     for ( i = trans_len; i < len - trans_len; ++i ) {
-       float level = ( sin( (double) i * 2.0 * SGD_PI / (BYTES_PER_SECOND / freq) ) )
+       float level = ( sin( (double) i * SGD_2PI / (BYTES_PER_SECOND / freq) ) )
            / 2.0 + 0.5;
 
        /* Convert to unsigned byte */
@@ -103,7 +103,7 @@ void make_tone( unsigned char *buf, int freq,
     }
     j = trans_len;
     for ( i = len - trans_len; i < len; ++i ) {
-       float level = ( sin( (double) i * 2.0 * SGD_PI / (BYTES_PER_SECOND / freq) ) )
+       float level = ( sin( (double) i * SGD_2PI / (BYTES_PER_SECOND / freq) ) )
            * ((double)j / trans_len) / 2.0 + 0.5;
        --j;
 
@@ -261,8 +261,7 @@ SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
 
     // 4. create the simple sound and return
     SGSoundSample *sample = new SGSoundSample( buffer, length,
-                                               BYTES_PER_SECOND,
-                                               false );
+                                               BYTES_PER_SECOND );
 
     // clean up the buffer
     delete [] buffer;