Fixed playing multiple instances of the same Music.

This commit is contained in:
rude
2009-12-27 17:38:51 +01:00
parent 3c79a33931
commit 8e74574544
6 changed files with 35 additions and 8 deletions
+7 -2
View File
@@ -92,9 +92,14 @@ namespace openal
return new Music(pool, decoder);
}
love::audio::Source * Audio::newSource(Audible * audible)
love::audio::Source * Audio::newSource(love::audio::Sound * sound)
{
return new Source(pool, audible);
return new Source(pool, sound);
}
love::audio::Source * Audio::newSource(love::audio::Music * music)
{
return new Source(pool, music->clone());
}
int Audio::getNumSources() const
+2 -1
View File
@@ -88,7 +88,8 @@ namespace openal
// Implements Audio.
love::audio::Sound * newSound(love::sound::SoundData * data);
love::audio::Music * newMusic(love::sound::Decoder * decoder);
love::audio::Source * newSource(Audible * audible);
love::audio::Source * newSource(love::audio::Sound * sound);
love::audio::Source * newSource(love::audio::Music * music);
int getNumSources() const;
int getMaxSources() const;
void play(love::audio::Source * source);