mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Major developments to love.audio/love.sound. Music and Sound are gone. There are only Sources now, which is much cleaner.
The audio module was not really stable in 0.6.0, it takes very little messing around to cause OpenAL to do horrible things. It should now be much more stable, and you *should* be able to play/stop/pause/resume/rewind/loop like a madman without disasters. Seek and tell, however, are still not tested and verified for all decoders, but that's less important. Also, all objects now have object:type() and object:typeOf(), which returns the type name of the object, and checks whether an object is of a certain type, respectively.
This commit is contained in:
@@ -28,18 +28,20 @@ namespace null
|
||||
{
|
||||
|
||||
Source::Source()
|
||||
: love::audio::Source(Source::TYPE_STATIC)
|
||||
{
|
||||
}
|
||||
|
||||
Source::Source(Audible * audible)
|
||||
{
|
||||
setAudible(audible);
|
||||
}
|
||||
|
||||
Source::~Source()
|
||||
{
|
||||
}
|
||||
|
||||
love::audio::Source * Source::copy()
|
||||
{
|
||||
this->retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
void Source::play()
|
||||
{
|
||||
}
|
||||
@@ -65,6 +67,11 @@ namespace null
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Source::isFinished() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Source::update()
|
||||
{
|
||||
}
|
||||
@@ -113,6 +120,16 @@ namespace null
|
||||
{
|
||||
}
|
||||
|
||||
void Source::setLooping(bool looping)
|
||||
{
|
||||
this->looping = looping;
|
||||
}
|
||||
|
||||
bool Source::isLooping() const
|
||||
{
|
||||
return looping;
|
||||
}
|
||||
|
||||
} // null
|
||||
} // audio
|
||||
} // love
|
||||
|
||||
Reference in New Issue
Block a user