mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:54:25 +02:00
Sound and AudioInjector tweaks
This commit is contained in:
parent
47685b0e88
commit
2eb1321cc2
3 changed files with 15 additions and 2 deletions
|
@ -37,8 +37,8 @@ public:
|
|||
float getVolume() const { return _volume; }
|
||||
void setVolume(float volume) { _volume = volume; }
|
||||
|
||||
float getLoop() const { return _loop; }
|
||||
void setLoop(float loop) { _loop = loop; }
|
||||
bool getLoop() const { return _loop; }
|
||||
void setLoop(bool loop) { _loop = loop; }
|
||||
|
||||
const glm::quat& getOrientation() const { return _orientation; }
|
||||
void setOrientation(const glm::quat& orientation) { _orientation = orientation; }
|
||||
|
|
|
@ -82,6 +82,17 @@ Sound::Sound(const QUrl& sampleURL, QObject* parent) :
|
|||
connect(soundDownload, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(replyError(QNetworkReply::NetworkError)));
|
||||
}
|
||||
|
||||
Sound::Sound(const QByteArray byteArray, QObject* parent) :
|
||||
QObject(parent),
|
||||
_byteArray(byteArray),
|
||||
_hasDownloaded(true)
|
||||
{
|
||||
}
|
||||
|
||||
void Sound::append(const QByteArray byteArray) {
|
||||
_byteArray.append(byteArray);
|
||||
}
|
||||
|
||||
void Sound::replyFinished() {
|
||||
|
||||
QNetworkReply* reply = reinterpret_cast<QNetworkReply*>(sender());
|
||||
|
|
|
@ -22,6 +22,8 @@ class Sound : public QObject {
|
|||
public:
|
||||
Sound(const QUrl& sampleURL, QObject* parent = NULL);
|
||||
Sound(float volume, float frequency, float duration, float decay, QObject* parent = NULL);
|
||||
Sound(const QByteArray byteArray, QObject* parent = NULL);
|
||||
void append(const QByteArray byteArray);
|
||||
|
||||
bool hasDownloaded() const { return _hasDownloaded; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue