25 #ifndef SFML_MUSIC_HPP
26 #define SFML_MUSIC_HPP
31 #include <SFML/Audio/Export.hpp>
32 #include <SFML/Audio/SoundStream.hpp>
33 #include <SFML/System/Mutex.hpp>
34 #include <SFML/System/Time.hpp>
84 bool openFromFile(
const std::string& filename);
107 bool openFromMemory(
const void* data, std::size_t sizeInBytes);
137 Time getDuration()
const;
152 virtual bool onGetData(
Chunk& data);
160 virtual void onSeek(
Time timeOffset);
173 priv::SoundFile* m_file;
175 std::vector<Int16> m_samples;
182 #endif // SFML_MUSIC_HPP
Streamed music played from an audio file.
Abstract base class for streamed audio sources.
Structure defining a chunk of audio data to stream.
Blocks concurrent access to shared resources from multiple threads.