diff options
Diffstat (limited to 'sigscript/SoundWrapper.cpp')
| -rw-r--r-- | sigscript/SoundWrapper.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sigscript/SoundWrapper.cpp b/sigscript/SoundWrapper.cpp index 83f0c9cc..9e867bf1 100644 --- a/sigscript/SoundWrapper.cpp +++ b/sigscript/SoundWrapper.cpp @@ -28,7 +28,10 @@ #include <Phonon/MediaObject> #include <Phonon/MediaSource> -Sigscript::SoundWrapper* Sigscript::SoundWrapper::create(const Sigmod::Sound* sound, GameWrapper* parent) +using namespace Sigmod; +using namespace Sigscript; + +SoundWrapper* SoundWrapper::create(const Sound* sound, GameWrapper* parent) { Signature sig = Signature(parent, Subsignature(sound->className(), sound->id())); if (!m_instances.contains(sig)) @@ -36,32 +39,32 @@ Sigscript::SoundWrapper* Sigscript::SoundWrapper::create(const Sigmod::Sound* so return qobject_cast<SoundWrapper*>(m_instances[sig]); } -Sigscript::SoundWrapper::SoundWrapper(const Sigmod::Sound* sound, GameWrapper* parent) : +SoundWrapper::SoundWrapper(const Sound* sound, GameWrapper* parent) : ObjectWrapper(sound, parent), m_sound(sound) { } -Sigmod::Sound::Type Sigscript::SoundWrapper::type(const QString& name) const +Sound::Type SoundWrapper::type(const QString& name) const { if (name == "Sound Effect") - return Sigmod::Sound::SoundEffect; + return Sound::SoundEffect; else if (name == "Music") - return Sigmod::Sound::Music; - return QVariant(-1).value<Sigmod::Sound::Type>(); + return Sound::Music; + return QVariant(-1).value<Sound::Type>(); } -QString Sigscript::SoundWrapper::name() const +QString SoundWrapper::name() const { return m_sound->name(); } -Sigmod::Sound::Type Sigscript::SoundWrapper::type() const +Sound::Type SoundWrapper::type() const { return m_sound->type(); } -Phonon::MediaObject* Sigscript::SoundWrapper::audio() +Phonon::MediaObject* SoundWrapper::audio() { Phonon::MediaObject* media = new Phonon::MediaObject(this); QBuffer* buffer = new QBuffer(media); |
