Prevent NaNs for orientation too

This commit is contained in:
Erik Hofman 2022-09-23 11:24:50 +02:00
parent c66a2bffe5
commit 3ffbec41ee
2 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,7 @@ int main( int argc, char *argv[] ) {
// prevent NaNs
smgr->set_position( SGVec3d(0, 0, 0), SGGeod::fromDegFt(0, 0, 0) );
smgr->set_orientation( SGQuatd::fromYawPitchRollDeg(0, 0, 0) );
SGPath srcDir(SRC_DIR);
@ -52,6 +53,7 @@ int main( int argc, char *argv[] ) {
printf("playing sample2\n");
sleep(1);
printf("Note: OpenAL-Soft does not have native support for IMA4 encoded audio.\n");
SGSoundSample *sample3 = new SGSoundSample("jet_ima4.wav", srcDir);
sample3->set_volume(0.5);
sample3->set_pitch(0.8);

View File

@ -32,6 +32,7 @@ int main( int argc, char *argv[] ) {
// prevent NaNs
smgr->set_position( SGVec3d(0, 0, 0), SGGeod::fromDegFt(0, 0, 0) );
smgr->set_orientation( SGQuatd::fromYawPitchRollDeg(0, 0, 0) );
printf("default position and orientation\n");
SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);