qt sound cleanup
This commit is contained in:
parent
b00cb389ef
commit
1690fd62c2
|
@ -1,5 +1,5 @@
|
|||
#include <QUrl>
|
||||
#include "qt/qt_sound.hpp"
|
||||
#include "qt_sound.hpp"
|
||||
|
||||
QtSound::QtSound() {
|
||||
for (auto &kv : sound_map) {
|
||||
|
@ -9,7 +9,8 @@ QtSound::QtSound() {
|
|||
}
|
||||
|
||||
bool QtSound::play(AudibleAlert alert) {
|
||||
sounds[alert].setLoopCount(sound_map[alert].second>-1 ? sound_map[alert].second : QSoundEffect::Infinite);
|
||||
int loops = sound_map[alert].second> - 1 ? sound_map[alert].second : QSoundEffect::Infinite;
|
||||
sounds[alert].setLoopCount(loops);
|
||||
sounds[alert].setVolume(0.7);
|
||||
sounds[alert].play();
|
||||
return true;
|
||||
|
@ -24,7 +25,3 @@ void QtSound::stop() {
|
|||
void QtSound::setVolume(int volume) {
|
||||
// TODO: implement this
|
||||
}
|
||||
|
||||
QtSound::~QtSound() {
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
class QtSound : public Sound {
|
||||
public:
|
||||
QtSound();
|
||||
~QtSound();
|
||||
bool play(AudibleAlert alert);
|
||||
void stop();
|
||||
void setVolume(int volume);
|
||||
|
|
Loading…
Reference in a new issue