updated to latest mobile-common branch of Löve

This commit is contained in:
fysx
2014-01-30 08:51:28 +01:00
parent 4c481f9933
commit 33d979caf6
49 changed files with 824 additions and 199 deletions
+13 -3
View File
@@ -165,15 +165,16 @@ love::audio::Source *Source::clone()
return new Source(*this);
}
void Source::play()
bool Source::play()
{
if (valid && paused)
{
pool->resume(this);
return;
return true;
}
valid = pool->play(this, source);
return valid;
}
void Source::stop()
@@ -512,7 +513,7 @@ bool Source::isLooping() const
return looping;
}
void Source::playAtomic()
bool Source::playAtomic()
{
if (type == TYPE_STATIC)
{
@@ -539,10 +540,19 @@ void Source::playAtomic()
// of the new one.
reset();
// Clear errors.
alGetError();
alSourcePlay(source);
// alSourcePlay may fail if the system has reached its limit of simultaneous
// playing sources.
bool success = alGetError() == AL_NO_ERROR;
valid = true; //if it fails it will be set to false again
//but this prevents a horrible, horrible bug
return success;
}
void Source::stopAtomic()