sound cleanup (#20491)
* fix high CPU usage when playing repeated sounds * fix build * fix cpu usage * same behavior for now Co-authored-by: Comma Device <device@comma.ai>pull/20475/head
parent
4942e94f6c
commit
c030493eb6
6 changed files with 17 additions and 33 deletions
@ -1,16 +0,0 @@ |
||||
#pragma once |
||||
|
||||
#include <QSoundEffect> |
||||
#include "sound.hpp" |
||||
|
||||
class QtSound : public Sound { |
||||
public: |
||||
QtSound(); |
||||
bool play(AudibleAlert alert); |
||||
void stop(); |
||||
void setVolume(int volume); |
||||
float volume = 0; |
||||
|
||||
private: |
||||
std::map<AudibleAlert, QSoundEffect> sounds; |
||||
}; |
Loading…
Reference in new issue