From aae77a7983b744827fd11ce748965b0497292bed Mon Sep 17 00:00:00 2001 From: Harald JOHNSEN Date: Tue, 29 May 2012 19:59:54 +0200 Subject: [PATCH] remove some warnings for MSVC don't start to play sounds that are out of range of the listener --- simgear/scene/tgdb/SGTexturedTriangleBin.hxx | 2 +- simgear/sound/sample_group.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx index 5de1b5cc..9404e437 100644 --- a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx +++ b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx @@ -293,7 +293,7 @@ public: points.push_back(std::make_pair(randomPoint, img->getColor(x,y).r())); } } else { - points.push_back(std::make_pair(randomPoint, mt_rand(&seed))); + points.push_back(std::make_pair(randomPoint, static_cast(mt_rand(&seed)))); } } num -= 1.0; diff --git a/simgear/sound/sample_group.cxx b/simgear/sound/sample_group.cxx index b0ddab8a..6b2d8566 100644 --- a/simgear/sound/sample_group.cxx +++ b/simgear/sound/sample_group.cxx @@ -134,7 +134,7 @@ void SGSampleGroup::update( double dt ) { for ( ; sample_current != sample_end; ++sample_current ) { SGSoundSample *sample = sample_current->second; - if ( !sample->is_valid_source() && sample->is_playing() ) { + if ( !sample->is_valid_source() && sample->is_playing() && !sample->test_out_of_range()) { // // a request to start playing a sound has been filed. // -- 2.39.5