//
// Written by Curtis Olson, started March 2001.
//
-// Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// constructor
-FGBeacon::FGBeacon() {
+FGBeacon::FGBeacon() :
+ inner(NULL),
+ middle(NULL),
+ outer(NULL)
+{
}
// destructor
FGBeacon::~FGBeacon() {
+ delete inner;
+ delete middle;
+ delete outer;
}
int len;
unsigned char *ptr;
+ unsigned char inner_buf[ INNER_SIZE ] ;
+ unsigned char middle_buf[ MIDDLE_SIZE ] ;
+ unsigned char outer_buf[ OUTER_SIZE ] ;
+
// Make inner marker beacon sound
len= (int)(INNER_DIT_LEN / 2.0 );
unsigned char inner_dit[INNER_DIT_LEN];
ptr += OUTER_DAH_LEN;
memcpy( ptr, outer_dah, OUTER_DAH_LEN );
- outer = new SGSoundSample( outer_buf, OUTER_SIZE, BYTES_PER_SECOND );
+ outer = new SGSoundSample( outer_buf, OUTER_SIZE, BYTES_PER_SECOND);
outer->set_reference_dist( 10.0 );
outer->set_max_dist( 20.0 );