diff options
Diffstat (limited to 'pokescripting/SoundWrapper.h')
| -rw-r--r-- | pokescripting/SoundWrapper.h | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/pokescripting/SoundWrapper.h b/pokescripting/SoundWrapper.h index 9f7f7eec..7ad98e49 100644 --- a/pokescripting/SoundWrapper.h +++ b/pokescripting/SoundWrapper.h @@ -24,12 +24,11 @@ // Pokemod includes #include "../pokemod/Sound.h" -// Qt includes -#include <QtCore/QBuffer> - -// Phonon includes -#include <Phonon/MediaObject> -#include <Phonon/MediaSource> +// Forward declarations +namespace Phonon +{ +class MediaObject; +} namespace Pokescripting { @@ -53,27 +52,6 @@ class POKESCRIPTING_EXPORT SoundWrapper : public ObjectWrapper const Pokemod::Sound* m_sound; }; - -inline SoundWrapper::SoundWrapper(const Pokemod::Sound* sound, QObject* parent) : - ObjectWrapper(sound, parent), - m_sound(sound) -{ -} - -inline QString SoundWrapper::name() const -{ - return m_sound->name(); -} - -inline Phonon::MediaObject* SoundWrapper::data() -{ - Phonon::MediaObject* media = new Phonon::MediaObject(this); - QBuffer* buffer = new QBuffer(media); - buffer->setData(m_sound->data()); - media->setCurrentSource(buffer); - return media; -} - } #endif |
