a few more temporarty debugging statements

This commit is contained in:
ehofman 2009-10-22 08:58:40 +00:00 committed by Tim Moore
parent 7964270929
commit 5d731ad8c3
2 changed files with 4 additions and 2 deletions

View File

@ -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() ) {

View File

@ -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!");
}