sfml_impl 0.1.0
Vendor SFML 3.0.2 : IGraphic2Module / IAudioModule
Loading...
Searching...
No Matches
SfmlMusic Class Reference

sfml music stream. More...

#include <SfmlMusic.hpp>

Inheritance diagram for SfmlMusic:
Collaboration diagram for SfmlMusic:

Public Member Functions

 SfmlMusic (std::string path)
 
 ~SfmlMusic () override=default
 
bool isReady () const override
 
void play () override
 
void pause () override
 
void stop () override
 
void update () override
 
void setVolume (float volume) override
 
float getVolume () const override
 
void setLoop (bool loop) override
 
bool getLoop () const override
 
void setTime (float position) override
 
float getTime () const override
 
float getLength () const override
 
void setPosition (Vector3f position) override
 
Vector3f getPosition () const override
 
void setVelocity (Vector3f velocity) override
 
Vector3f getVelocity () const override
 

Detailed Description

sfml music stream.

sf::Music already carries the three states (stopped/playing/paused), so play()/pause()/stop() just guard on getStatus() - raylib, by contrast, had to track an enum by hand. setTime() clamps the position, sfml falling back to zero past the end.

Constructor & Destructor Documentation

◆ SfmlMusic()

SfmlMusic::SfmlMusic ( std::string  path)
inline

◆ ~SfmlMusic()

SfmlMusic::~SfmlMusic ( )
overridedefault

Member Function Documentation

◆ getLength()

float SfmlMusic::getLength ( ) const
inlineoverride

◆ getLoop()

bool SfmlMusic::getLoop ( ) const
inlineoverride

◆ getPosition()

Vector3f SfmlMusic::getPosition ( ) const
inlineoverride

◆ getTime()

float SfmlMusic::getTime ( ) const
inlineoverride

◆ getVelocity()

Vector3f SfmlMusic::getVelocity ( ) const
inlineoverride

◆ getVolume()

float SfmlMusic::getVolume ( ) const
inlineoverride

◆ isReady()

bool SfmlMusic::isReady ( ) const
inlineoverride

◆ pause()

void SfmlMusic::pause ( )
inlineoverride

◆ play()

void SfmlMusic::play ( )
inlineoverride

◆ setLoop()

void SfmlMusic::setLoop ( bool  loop)
inlineoverride

◆ setPosition()

void SfmlMusic::setPosition ( Vector3f  position)
inlineoverride

◆ setTime()

void SfmlMusic::setTime ( float  position)
inlineoverride

◆ setVelocity()

void SfmlMusic::setVelocity ( Vector3f  velocity)
inlineoverride

◆ setVolume()

void SfmlMusic::setVolume ( float  volume)
inlineoverride

◆ stop()

void SfmlMusic::stop ( )
inlineoverride

◆ update()

void SfmlMusic::update ( )
inlineoverride

The documentation for this class was generated from the following file: