31#include <SFML/System/Resource.hpp>
32#include <SFML/System/Vector3.hpp>
33#include <SFML/Audio/AudioResource.hpp>
75 explicit Sound(
const SoundBuffer& Buffer,
bool Loop =
false,
float Pitch = 1.f,
float Volume = 100.f,
const Vector3f& Position = Vector3f(0, 0, 0));
124 void SetLoop(
bool Loop);
133 void SetPitch(
float Pitch);
142 void SetVolume(
float Volume);
151 void SetPosition(
float X,
float Y,
float Z);
160 void SetPosition(
const Vector3f& Position);
170 void SetRelativeToListener(
bool Relative);
180 void SetMinDistance(
float MinDistance);
190 void SetAttenuation(
float Attenuation);
198 void SetPlayingOffset(
float TimeOffset);
214 bool GetLoop()
const;
222 float GetPitch()
const;
230 float GetVolume()
const;
238 Vector3f GetPosition()
const;
247 bool IsRelativeToListener()
const;
255 float GetMinDistance()
const;
263 float GetAttenuation()
const;
271 Status GetStatus()
const;
279 float GetPlayingOffset()
const;
307 unsigned int mySource;
AudioResource()
Default constructor.
Safe pointer to a T resource (inheriting from sf::Resource<T>), its pointer is automatically reseted ...
SoundBuffer is the low-level for loading and manipulating sound buffers.
SoundStream is a streamed sound, ie samples are acquired while the sound is playing.
Sound defines the properties of a sound such as position, volume, pitch, etc.
Status
Enumeration of the sound states.
@ Playing
Sound is playing.
@ Stopped
Sound is not playing.
Sound()
Default constructor.