37 static std::vector<speaker*> _instances;
39 std::shared_ptr<wze::sound> _sound;
58 void set_angle(
float _)
final;
65 [[nodiscard]]
float angle_offset()
const final;
72 [[nodiscard]]
bool attach_angle()
const final;
75#ifdef __WIZARD_ENGINE_INTERNAL__
82 [[nodiscard]]
static std::vector<speaker*>
const& instances();
91 [[nodiscard]] std::shared_ptr<wze::sound>
const& sound()
const;
99 void set_sound(std::shared_ptr<wze::sound>
const& sound);
107 [[nodiscard]] int8_t volume()
const;
115 void set_volume(int8_t volume);
123 [[nodiscard]]
float range()
const;
131 void set_range(
float range);
139 [[nodiscard]]
bool auto_panning()
const;
147 void set_auto_panning(
bool auto_panning);
155 [[nodiscard]]
float x()
const;
163 void set_x(
float x)
final;
171 [[nodiscard]]
float y()
const;
179 void set_y(
float y)
final;
187 [[nodiscard]]
float z()
const;
203 [[nodiscard]]
bool spatial()
const;
211 void set_spatial(
bool spatial);
219 [[nodiscard]]
float x_offset()
const final;
227 void set_x_offset(
float x_offset);
235 [[nodiscard]]
float y_offset()
const final;
243 void set_y_offset(
float y_offset);
251 [[nodiscard]]
bool attach_x()
const final;
259 void set_attach_x(
bool attach_x);
267 [[nodiscard]]
bool attach_y()
const final;
275 void set_attach_y(
bool attach_y);
283 [[nodiscard]]
bool x_angle_lock()
const final;
291 void set_x_angle_lock(
bool x_angle_lock);
299 [[nodiscard]]
bool y_angle_lock()
const final;
307 void set_y_angle_lock(
bool y_angle_lock);
315 [[nodiscard]]
bool playing()
const;
323 [[nodiscard]]
bool paused()
const;
344 explicit speaker(std::shared_ptr<wze::sound>
const& sound = {},
345 int8_t volume = std::numeric_limits<int8_t>::max(),
346 float range = std::numeric_limits<int16_t>::max(),
347 bool auto_panning =
false,
float x = 0,
float y = 0,
348 float z = 0,
bool spatial =
false,
float x_offset = 0,
349 float y_offset = 0,
bool attach_x =
true,
350 bool attach_y =
true,
bool x_angle_lock =
true,
351 bool y_angle_lock =
true);
402 void play(uint16_t fade_in = 0, uint16_t loops = 0);
424 void stop(uint16_t fade_out = 0);
432 void align_panning();