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>
old-commit-hash: c030493eb6
commatwo_master
parent
e131452d56
commit
72c497d105
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