mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02: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:
@@ -36,33 +36,34 @@ namespace null
|
||||
private:
|
||||
|
||||
float pitch;
|
||||
float volume;
|
||||
float volume;
|
||||
bool looping;
|
||||
|
||||
public:
|
||||
Source();
|
||||
Source(Audible * audible);
|
||||
virtual ~Source();
|
||||
|
||||
void play();
|
||||
void stop();
|
||||
void pause();
|
||||
void resume();
|
||||
void rewind();
|
||||
bool isStopped() const;
|
||||
void update();
|
||||
|
||||
void setPitch(float pitch);
|
||||
float getPitch() const;
|
||||
|
||||
void setVolume(float volume);
|
||||
float getVolume() const;
|
||||
|
||||
void setPosition(float * v);
|
||||
void getPosition(float * v) const;
|
||||
void setVelocity(float * v);
|
||||
void getVelocity(float * v) const;
|
||||
void setDirection(float * v);
|
||||
void getDirection(float * v) const;
|
||||
virtual love::audio::Source * copy();
|
||||
virtual void play();
|
||||
virtual void stop();
|
||||
virtual void pause();
|
||||
virtual void resume();
|
||||
virtual void rewind();
|
||||
virtual bool isStopped() const;
|
||||
virtual bool isFinished() const;
|
||||
virtual void update();
|
||||
virtual void setPitch(float pitch);
|
||||
virtual float getPitch() const;
|
||||
virtual void setVolume(float volume);
|
||||
virtual float getVolume() const;
|
||||
virtual void setPosition(float * v);
|
||||
virtual void getPosition(float * v) const;
|
||||
virtual void setVelocity(float * v);
|
||||
virtual void getVelocity(float * v) const;
|
||||
virtual void setDirection(float * v);
|
||||
virtual void getDirection(float * v) const;
|
||||
void setLooping(bool looping);
|
||||
bool isLooping() const;
|
||||
|
||||
}; // Source
|
||||
|
||||
|
||||
Reference in New Issue
Block a user