#include <Sound.hpp>
Inheritance diagram for sf::Sound:

Public Types | |
| enum | Status { Stopped, Paused, Playing } |
| Enumeration of the sound states. More... | |
Public Member Functions | |
| Sound () | |
| Default constructor. | |
| Sound (const SoundBuffer &Buffer, bool Loop=false, float Pitch=1.f, float Volume=100.f, float X=0.f, float Y=0.f, float Z=0.f) | |
| Construct the sound from its parameters. | |
| Sound (const Sound &Copy) | |
| Copy constructor. | |
| ~Sound () | |
| Destructor. | |
| void | Play () |
| Play the sound. | |
| void | Pause () |
| Pause the sound. | |
| void | Stop () |
| Stop the sound. | |
| void | SetBuffer (const SoundBuffer &Buffer) |
| Set the source buffer. | |
| void | SetLoop (bool Loop) |
| Set the sound loop state. | |
| void | SetPitch (float Pitch) |
| Set the sound pitch. | |
| void | SetVolume (float Volume) |
| Set the sound volume. | |
| void | SetPosition (float X, float Y, float Z) |
| Set the sound position. | |
| const SoundBuffer * | GetBuffer () const |
| Get the source buffer. | |
| bool | GetLoop () const |
| Tell whether or not the sound is looping. | |
| float | GetPitch () const |
| Get the pitch. | |
| float | GetVolume () const |
| Get the volume. | |
| void | GetPosition (float &X, float &Y, float &Z) const |
| Get the sound position. | |
| Status | GetStatus () const |
| Get the status of the sound (stopped, paused, playing). | |
| float | GetPlayingOffset () const |
| Get the current playing position of the sound. | |
| Sound & | operator= (const Sound &Other) |
| Assignment operator. | |
Friends | |
| class | SoundStream |
Definition at line 43 of file Sound.hpp.
| enum sf::Sound::Status |
| sf::Sound::Sound | ( | ) |
Default constructor.
| sf::Sound::Sound | ( | const SoundBuffer & | Buffer, | |
| bool | Loop = false, |
|||
| float | Pitch = 1.f, |
|||
| float | Volume = 100.f, |
|||
| float | X = 0.f, |
|||
| float | Y = 0.f, |
|||
| float | Z = 0.f | |||
| ) |
Construct the sound from its parameters.
| Buffer | : Sound buffer to play (NULL by default) | |
| Loop | : Loop flag (false by default) | |
| Pitch | : Value of the pitch (1 by default) | |
| Volume | : Volume (100 by default) | |
| X | : X position (0 by default) | |
| Y | : Y position (0 by default) | |
| Z | : Z position (0 by default) |
| sf::Sound::Sound | ( | const Sound & | Copy | ) |
Copy constructor.
| Copy | : Instance to copy |
| sf::Sound::~Sound | ( | ) |
Destructor.
| void sf::Sound::Play | ( | ) |
| void sf::Sound::Pause | ( | ) |
Pause the sound.
| void sf::Sound::Stop | ( | ) |
| void sf::Sound::SetBuffer | ( | const SoundBuffer & | Buffer | ) |
Set the source buffer.
| Buffer | : New sound buffer to bind to the sound |
| void sf::Sound::SetLoop | ( | bool | Loop | ) |
Set the sound loop state.
This parameter is disabled by default
| Loop | : True to play in loop, false to play once |
Reimplemented in sf::Music.
| void sf::Sound::SetPitch | ( | float | Pitch | ) |
Set the sound pitch.
The default pitch is 1
| Pitch | : New pitch |
| void sf::Sound::SetVolume | ( | float | Volume | ) |
Set the sound volume.
The default volume is 100
| Volume | : Volume (in range [0, 100]) |
| void sf::Sound::SetPosition | ( | float | X, | |
| float | Y, | |||
| float | Z | |||
| ) |
Set the sound position.
The default position is (0, 0, 0)
| X | : X position of the sound in the world | |
| Y | : Y position of the sound in the world | |
| Z | : Z position of the sound in the world |
| const SoundBuffer* sf::Sound::GetBuffer | ( | ) | const |
| bool sf::Sound::GetLoop | ( | ) | const |
Tell whether or not the sound is looping.
Reimplemented in sf::Music.
| float sf::Sound::GetPitch | ( | ) | const |
Get the pitch.
| float sf::Sound::GetVolume | ( | ) | const |
Get the volume.
| void sf::Sound::GetPosition | ( | float & | X, | |
| float & | Y, | |||
| float & | Z | |||
| ) | const |
Get the sound position.
| X | : X position of the sound in the world | |
| Y | : Y position of the sound in the world | |
| Z | : Z position of the sound in the world |
| Status sf::Sound::GetStatus | ( | ) | const |
Get the status of the sound (stopped, paused, playing).
Reimplemented in sf::SoundStream.
| float sf::Sound::GetPlayingOffset | ( | ) | const |
Get the current playing position of the sound.
Assignment operator.
| Other | : Instance to assign |