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/Audio/InputSoundFile.hpp> 34 #include <SFML/System/Mutex.hpp> 35 #include <SFML/System/Time.hpp> 120 bool openFromFile(
const std::string& filename);
143 bool openFromMemory(
const void* data, std::size_t sizeInBytes);
172 Time getDuration()
const;
211 void setLoopPoints(
TimeSpan timePoints);
226 virtual bool onGetData(
Chunk& data);
234 virtual void onSeek(
Time timeOffset);
246 virtual Int64 onLoop();
264 Uint64 timeToSamples(
Time position)
const;
274 Time samplesToTime(Uint64 samples)
const;
280 std::vector<Int16> m_samples;
288 #endif // SFML_MUSIC_HPP Structure defining a chunk of audio data to stream.
Blocks concurrent access to shared resources from multiple threads.
Streamed music played from an audio file.
Abstract base class for streamed audio sources.
Span()
Default constructor.
T length
The length of the time range.
Structure defining a time range using the template type.
T offset
The beginning offset of the time range.
Span(T off, T len)
Initialization constructor.