Sync with SimGear.
This commit is contained in:
parent
8d681fd6de
commit
9a7bbf3db5
4 changed files with 6 additions and 8 deletions
src
|
@ -188,7 +188,7 @@ void FGAIPlane::Render(const string& refname, bool repeating) {
|
||||||
int len;
|
int len;
|
||||||
unsigned char* buf = vPtr->WriteMessage((char*)pending_transmission.c_str(), len, voice);
|
unsigned char* buf = vPtr->WriteMessage((char*)pending_transmission.c_str(), len, voice);
|
||||||
if(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
|
// TODO - at the moment the volume is always set off comm1
|
||||||
// and can't be changed after the transmission has started.
|
// and can't be changed after the transmission has started.
|
||||||
simple->set_volume(5.0 * fgGetDouble("/instrumentation/comm[0]/volume"));
|
simple->set_volume(5.0 * fgGetDouble("/instrumentation/comm[0]/volume"));
|
||||||
|
|
|
@ -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);
|
unsigned char* buf = _vPtr->WriteMessage((char*)msg.c_str(), len, _voice);
|
||||||
if(_voice) {
|
if(_voice) {
|
||||||
SGSoundSample *simple
|
SGSoundSample *simple
|
||||||
= new SGSoundSample(buf, len, 8000, false);
|
= new SGSoundSample(buf, len, 8000);
|
||||||
// TODO - at the moment the volume is always set off comm1
|
// TODO - at the moment the volume is always set off comm1
|
||||||
// and can't be changed after the transmission has started.
|
// and can't be changed after the transmission has started.
|
||||||
simple->set_volume(5.0 * fgGetDouble("/instrumentation/comm[0]/volume"));
|
simple->set_volume(5.0 * fgGetDouble("/instrumentation/comm[0]/volume"));
|
||||||
|
|
|
@ -62,7 +62,7 @@ bool FGBeacon::init() {
|
||||||
ptr += INNER_DIT_LEN;
|
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_reference_dist( 10.0 );
|
||||||
inner->set_max_dist( 20.0 );
|
inner->set_max_dist( 20.0 );
|
||||||
|
|
||||||
|
@ -82,8 +82,7 @@ bool FGBeacon::init() {
|
||||||
ptr += MIDDLE_DIT_LEN;
|
ptr += MIDDLE_DIT_LEN;
|
||||||
memcpy( ptr, middle_dah, MIDDLE_DAH_LEN );
|
memcpy( ptr, middle_dah, MIDDLE_DAH_LEN );
|
||||||
|
|
||||||
middle = new SGSoundSample( middle_buf, MIDDLE_SIZE, BYTES_PER_SECOND,
|
middle = new SGSoundSample( middle_buf, MIDDLE_SIZE, BYTES_PER_SECOND );
|
||||||
false );
|
|
||||||
middle->set_reference_dist( 10.0 );
|
middle->set_reference_dist( 10.0 );
|
||||||
middle->set_max_dist( 20.0 );
|
middle->set_max_dist( 20.0 );
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ bool FGBeacon::init() {
|
||||||
ptr += OUTER_DAH_LEN;
|
ptr += OUTER_DAH_LEN;
|
||||||
memcpy( ptr, outer_dah, 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_reference_dist( 10.0 );
|
||||||
outer->set_max_dist( 20.0 );
|
outer->set_max_dist( 20.0 );
|
||||||
|
|
||||||
|
|
|
@ -261,8 +261,7 @@ SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
|
||||||
|
|
||||||
// 4. create the simple sound and return
|
// 4. create the simple sound and return
|
||||||
SGSoundSample *sample = new SGSoundSample( buffer, length,
|
SGSoundSample *sample = new SGSoundSample( buffer, length,
|
||||||
BYTES_PER_SECOND,
|
BYTES_PER_SECOND );
|
||||||
false );
|
|
||||||
|
|
||||||
// clean up the buffer
|
// clean up the buffer
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
|
|
Loading…
Add table
Reference in a new issue