Music defines a big sound played using streaming, so usually what we call a music :)
More...
#include <Music.hpp>
|
void | Initialize (unsigned int ChannelsCount, unsigned int SampleRate) |
| Set the audio stream parameters, you must call it before Play() More...
|
|
Music defines a big sound played using streaming, so usually what we call a music :)
Definition at line 47 of file Music.hpp.
Enumeration of the sound states.
Definition at line 52 of file Sound.hpp.
sf::Music::Music |
( |
std::size_t |
BufferSize = 44100 | ) |
|
|
explicit |
Construct the music with a buffer size.
- Parameters
-
BufferSize | : Size of the internal buffer, expressed in number of samples (ie. size taken by the music in memory) (44100 by default) |
Definition at line 40 of file Music.cpp.
unsigned int sf::SoundStream::GetChannelsCount |
( |
| ) |
const |
|
inherited |
Return the number of channels (1 = mono, 2 = stereo)
Return the number of channels (1 = mono, 2 = stereo, ...)
- Returns
- Number of channels
Definition at line 126 of file SoundStream.cpp.
float sf::Music::GetDuration |
( |
| ) |
const |
Get the music duration.
Get the sound duration.
- Returns
- Music duration, in seconds
Definition at line 148 of file Music.cpp.
bool sf::SoundStream::GetLoop |
( |
| ) |
const |
|
inherited |
Tell whether or not the stream is looping.
Tell whether or not the music is looping.
- Returns
- True if the music is looping, false otherwise
Definition at line 180 of file SoundStream.cpp.
float sf::SoundStream::GetPlayingOffset |
( |
| ) |
const |
|
inherited |
Get the current playing position of the stream.
- Returns
- Current playing position, expressed in seconds
Definition at line 162 of file SoundStream.cpp.
unsigned int sf::SoundStream::GetSampleRate |
( |
| ) |
const |
|
inherited |
Get the stream sample rate.
Get the sound frequency (sample rate)
- Returns
- Stream frequency (number of samples per second)
Definition at line 135 of file SoundStream.cpp.
Get the status of the stream (stopped, paused, playing)
Get the status of the sound (stopped, paused, playing)
- Returns
- Current status of the sound
Definition at line 144 of file SoundStream.cpp.
void sf::SoundStream::Initialize |
( |
unsigned int |
ChannelsCount, |
|
|
unsigned int |
SampleRate |
|
) |
| |
|
protectedinherited |
Set the audio stream parameters, you must call it before Play()
- Parameters
-
ChannelsCount | : Number of channels |
SampleRate | : Sample rate |
Definition at line 64 of file SoundStream.cpp.
bool sf::Music::OpenFromFile |
( |
const std::string & |
Filename | ) |
|
Open a music file (doesn't play it – call Play() for that)
- Parameters
-
Filename | : Path of the music file to open |
- Returns
- True if loading has been successful
Definition at line 64 of file Music.cpp.
bool sf::Music::OpenFromMemory |
( |
const char * |
Data, |
|
|
std::size_t |
SizeInBytes |
|
) |
| |
Open a music file from memory (doesn't play it – call Play() for that)
- Parameters
-
Data | : Pointer to the file data in memory |
SizeInBytes | : Size of the data to load, in bytes |
- Returns
- True if loading has been successful
Definition at line 91 of file Music.cpp.
void sf::SoundStream::Play |
( |
| ) |
|
|
inherited |
void sf::SoundStream::SetLoop |
( |
bool |
Loop | ) |
|
|
inherited |
Set the stream loop state.
Set the music loop state.
This parameter is disabled by default
- Parameters
-
Loop | : True to play in loop, false to play once |
Definition at line 171 of file SoundStream.cpp.
void sf::SoundStream::Stop |
( |
| ) |
|
|
inherited |
The documentation for this class was generated from the following files: