| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "../ActorBase.h" |
| 4 |
|
| 5 |
namespace Jazz2::Actors::Environment |
| 6 |
{ |
| 7 |
/** @brief Ambient sound */ |
| 8 |
class AmbientSound : public ActorBase |
| 9 |
{ |
| 10 |
DEATH_RUNTIME_OBJECT(ActorBase); |
| 11 |
|
| 12 |
public: |
| 13 |
AmbientSound(); |
| 14 |
~AmbientSound(); |
| 15 |
|
| 16 |
static void Preload(const ActorActivationDetails& details); |
| 17 |
|
| 18 |
protected: |
| 19 |
Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override; |
| 20 |
|
| 21 |
private: |
| 22 |
std::shared_ptr<AudioBufferPlayer> _sound; |
| 23 |
std::uint8_t _sfx; |
| 24 |
float _gain; |
| 25 |
}; |
| 26 |
} |