From 92f2794ea80a552f50a36ac66e43f9cea5a71e1d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 18 Apr 2014 14:26:56 -0700 Subject: [PATCH] add a property to Sound to tell if empty --- libraries/audio/src/Sound.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/audio/src/Sound.h b/libraries/audio/src/Sound.h index 50b2bbadaa..ae2fd391a1 100644 --- a/libraries/audio/src/Sound.h +++ b/libraries/audio/src/Sound.h @@ -17,10 +17,14 @@ class Sound : public QObject { Q_OBJECT + + Q_PROPERTY(bool empty READ isEmpty) public: Sound(const QUrl& sampleURL, QObject* parent = NULL); Sound(float volume, float frequency, float duration, float decay, QObject* parent = NULL); + bool isEmpty() const { return _byteArray.isEmpty(); } + const QByteArray& getByteArray() { return _byteArray; } private: