Fix love.audio.play{sources...} so it can resume paused sources

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2016-12-02 13:57:20 +01:00
parent 0126f7986a
commit 67d3146229
+7 -2
View File
@@ -901,12 +901,17 @@ bool Source::playAtomic(const std::vector<love::audio::Source*> &sources, const
toPlay.reserve(sources.size());
for (size_t i = 0; i < sources.size(); i++)
{
Source *source = (Source*) sources[i];
// Paused sources have wasPlaying set to true, so do this first
if (!source->isPlaying())
toPlay.push_back(ids[i]);
// If it wasn't playing (nor paused), we have just allocated a new
// source
if (wasPlaying[i])
continue;
Source *source = (Source*) sources[i];
source->source = ids[i];
source->prepareAtomic();
toPlay.push_back(ids[i]);
}
alGetError();