sfMusic Class Reference

#include <Music.hpp>

Inheritance diagram for sfMusic:

sfSoundStream List of all members.

Public Member Functions

 sfMusic (std::size_t BufferSize=44100)
bool Open (const std::string &Filename)
void SetLoop (bool Loop)
bool GetLoop () const
float GetDuration () const

Detailed Description

sfMusic defines a big sound played using streaming, so usually what we call a music :)

Definition at line 41 of file Music.hpp.


Constructor & Destructor Documentation

sfMusic::sfMusic ( std::size_t  BufferSize = 44100  ) 

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 37 of file Music.cpp.


Member Function Documentation

bool sfMusic::Open ( 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 49 of file Music.cpp.

References sfSoundStream::Initialize().

void sfMusic::SetLoop ( bool  Loop  ) 

Set the music loop state

Parameters:
Loop : True to play in loop, false to play once

Definition at line 80 of file Music.cpp.

bool sfMusic::GetLoop (  )  const

Tell whether or not the music is looping

Returns:
True if the music is looping, false otherwise

Definition at line 89 of file Music.cpp.

float sfMusic::GetDuration (  )  const

Get the music duration

Returns:
Music duration, in seconds

Definition at line 145 of file Music.cpp.


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2