ALboolean looping = sample->is_looping() ? AL_TRUE : AL_FALSE;
alSourcei( source, AL_LOOPING, looping );
alSourcef( source, AL_ROLLOFF_FACTOR, 0.3 );
- alSourcei( source, AL_SOURCE_RELATIVE, AL_FALSE );
+ alSourcei( source, AL_SOURCE_RELATIVE, AL_TRUE );
alSourcePlay( source );
testForALError("sample play");
} else {
void
SGSampleGroup::suspend ()
{
- if (_pause == false) {
+ if (_active && _pause == false) {
_pause = true;
sample_map_iterator sample_current = _samples.begin();
sample_map_iterator sample_end = _samples.end();
void
SGSampleGroup::resume ()
{
- if (_pause == true) {
+ if (_active && _pause == true) {
sample_map_iterator sample_current = _samples.begin();
sample_map_iterator sample_end = _samples.end();
for ( ; sample_current != sample_end; ++sample_current ) {