aboutsummaryrefslogtreecommitdiff
path: root/src/lua/audio/Source.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/audio/Source.h')
-rw-r--r--src/lua/audio/Source.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/lua/audio/Source.h b/src/lua/audio/Source.h
deleted file mode 100644
index 094ad12..0000000
--- a/src/lua/audio/Source.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef __JIN_LUA_AUDIO_SOURCE_H
-#define __JIN_LUA_AUDIO_SOURCE_H
-#include "libjin/jin.h"
-#include "../luaopen_types.h"
-
-namespace jin
-{
-namespace lua
-{
-namespace audio
-{
-
- class Source : public Object
- {
- public:
- void play()
- {
- source->play();
- }
-
- void stop()
- {
- source->stop();
- }
-
- void pause()
- {
- source->pause();
- }
-
- void resume()
- {
- source->resume();
- }
-
- void rewind()
- {
- source->rewind();
- }
-
- bool isStopped() const
- {
- return source->isStopped();
- }
-
- bool isPaused() const
- {
- return source->isPaused();
- }
-
- void setPitch(float pitch)
- {
- source->setPitch(pitch);
- }
-
- void setVolume(float volume)
- {
- source->setVolume(volume);
- }
-
- bool setLoop(bool loop)
- {
- return source->setLoop(loop);
- }
-
- void setRate(float rate)
- {
- source->setRate(rate);
- }
-
- inline static Source * createSource(void* mem, size_t size)
- {
- Source* src = new Source;
- src->source = jin::audio::SDLSource::createSource(mem, size);
- return src;
- }
-
- private:
- ~Source()
- {
- source->stop();
- delete source;
- }
-
- jin::audio::SDLSource* source;
-
- };
-
-} // audio
-} // lua
-} // jin
-
-#endif \ No newline at end of file