From: ehofman Date: Thu, 22 Oct 2009 08:58:40 +0000 (+0000) Subject: a few more temporarty debugging statements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5d731ad8c39abf3e41f6b84901669cbab6dc8ed8;p=simgear.git a few more temporarty debugging statements --- diff --git a/simgear/sound/sample_group.cxx b/simgear/sound/sample_group.cxx index cab19896..ed4d466b 100644 --- a/simgear/sound/sample_group.cxx +++ b/simgear/sound/sample_group.cxx @@ -146,7 +146,6 @@ void SGSampleGroup::update( double dt ) { continue; // start playing the sample - ALboolean looping = sample->get_looping() ? AL_TRUE : AL_FALSE; ALuint buffer = sample->get_buffer(); ALuint source = _smgr->request_source(); if (alIsSource(source) == AL_TRUE && alIsBuffer(buffer) == AL_TRUE) @@ -159,9 +158,10 @@ void SGSampleGroup::update( double dt ) { sample->set_source( source ); update_sample_config( sample ); - alSourcei( source, AL_SOURCE_RELATIVE, AL_FALSE ); + ALboolean looping = sample->get_looping() ? AL_TRUE : AL_FALSE; alSourcei( source, AL_LOOPING, looping ); alSourcef( source, AL_ROLLOFF_FACTOR, 1.0 ); + alSourcei( source, AL_SOURCE_RELATIVE, AL_FALSE ); alSourcePlay( source ); testForALError("sample play"); } else { @@ -169,6 +169,7 @@ void SGSampleGroup::update( double dt ) { SG_LOG( SG_GENERAL, SG_ALERT, "No such buffer!\n"); // sample->no_valid_source(); // sadly, no free source available at this time +printf("No free source found."); } } else if ( sample->is_valid_source() && sample->has_changed() ) { diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index 9a49d547..b22a1835 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -154,6 +154,7 @@ printf("Initializing OpenAL sound manager\n"); else break; } +printf("%i free sources found\n", _free_sources.size() ); if (_free_sources.size() == 0) { SG_LOG(SG_GENERAL, SG_ALERT, "Unable to grab any OpenAL sources!"); }