Added the sf::Time class

This commit is contained in:
Laurent Gomila 2012-01-19 23:51:06 +01:00
parent e775bd0169
commit 4116ad033c
58 changed files with 880 additions and 227 deletions

View file

@ -30,6 +30,7 @@
////////////////////////////////////////////////////////////
#include <SFML/Audio/SoundSource.hpp>
#include <SFML/System/Thread.hpp>
#include <SFML/System/Time.hpp>
#include <cstdlib>
@ -131,22 +132,22 @@ public :
/// The playing position can be changed when the stream is
/// either paused or playing.
///
/// \param timeOffset New playing position, in milliseconds
/// \param timeOffset New playing position, from the beginning of the stream
///
/// \see GetPlayingOffset
///
////////////////////////////////////////////////////////////
void SetPlayingOffset(Uint32 timeOffset);
void SetPlayingOffset(Time timeOffset);
////////////////////////////////////////////////////////////
/// \brief Get the current playing position of the stream
///
/// \return Current playing position, in milliseconds
/// \return Current playing position, from the beginning of the stream
///
/// \see SetPlayingOffset
///
////////////////////////////////////////////////////////////
Uint32 GetPlayingOffset() const;
Time GetPlayingOffset() const;
////////////////////////////////////////////////////////////
/// \brief Set whether or not the stream should loop after reaching the end
@ -232,10 +233,10 @@ private :
/// This function must be overriden by derived classes to
/// allow random seeking into the stream source.
///
/// \param timeOffset New playing position, in milliseconds
/// \param timeOffset New playing position, relative to the beginning of the stream
///
////////////////////////////////////////////////////////////
virtual void OnSeek(Uint32 timeOffset) = 0;
virtual void OnSeek(Time timeOffset) = 0;
////////////////////////////////////////////////////////////
/// \brief Fill a new buffer with audio samples, and append