1
0
Fork 0

Sync with SimGear.

This commit is contained in:
ehofman 2005-11-12 12:31:11 +00:00
parent 8d681fd6de
commit 9a7bbf3db5
4 changed files with 6 additions and 8 deletions

View file

@ -188,7 +188,7 @@ void FGAIPlane::Render(const string& refname, bool repeating) {
int len;
unsigned char* buf = vPtr->WriteMessage((char*)pending_transmission.c_str(), len, voice);
if(voice) {
SGSoundSample* simple = new SGSoundSample(buf, len, 8000, false);
SGSoundSample* simple = new SGSoundSample(buf, len, 8000);
// 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("/instrumentation/comm[0]/volume"));

View file

@ -227,7 +227,7 @@ void FGATC::Render(string& msg, const string& refname, bool repeating) {
unsigned char* buf = _vPtr->WriteMessage((char*)msg.c_str(), len, _voice);
if(_voice) {
SGSoundSample *simple
= new SGSoundSample(buf, len, 8000, false);
= new SGSoundSample(buf, len, 8000);
// 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("/instrumentation/comm[0]/volume"));

View file

@ -62,7 +62,7 @@ bool FGBeacon::init() {
ptr += INNER_DIT_LEN;
}
inner = new SGSoundSample( inner_buf, INNER_SIZE, BYTES_PER_SECOND, false );
inner = new SGSoundSample( inner_buf, INNER_SIZE, BYTES_PER_SECOND );
inner->set_reference_dist( 10.0 );
inner->set_max_dist( 20.0 );
@ -82,8 +82,7 @@ bool FGBeacon::init() {
ptr += MIDDLE_DIT_LEN;
memcpy( ptr, middle_dah, MIDDLE_DAH_LEN );
middle = new SGSoundSample( middle_buf, MIDDLE_SIZE, BYTES_PER_SECOND,
false );
middle = new SGSoundSample( middle_buf, MIDDLE_SIZE, BYTES_PER_SECOND );
middle->set_reference_dist( 10.0 );
middle->set_max_dist( 20.0 );
@ -98,7 +97,7 @@ bool FGBeacon::init() {
ptr += OUTER_DAH_LEN;
memcpy( ptr, outer_dah, OUTER_DAH_LEN );
outer = new SGSoundSample( outer_buf, OUTER_SIZE, BYTES_PER_SECOND, false );
outer = new SGSoundSample( outer_buf, OUTER_SIZE, BYTES_PER_SECOND);
outer->set_reference_dist( 10.0 );
outer->set_max_dist( 20.0 );

View file

@ -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;