25 #ifndef CPP3DS_MUSIC_HPP
26 #define CPP3DS_MUSIC_HPP
31 #include <cpp3ds/Audio/SoundStream.hpp>
32 #include <cpp3ds/Audio/InputSoundFile.hpp>
33 #include <cpp3ds/System/Mutex.hpp>
34 #include <cpp3ds/System/Time.hpp>
167 std::vector<Int16> m_samples;
174 #endif // CPP3DS_MUSIC_HPP
Streamed music played from an audio file.
Abstract base class for streamed audio sources.
Music()
Default constructor.
bool openFromStream(InputStream &stream)
Open a music from an audio file in a custom stream.
virtual void onSeek(Time timeOffset)
Change the current playing position in the stream source.
Blocks concurrent access to shared resources from multiple threads.
bool openFromFile(const std::string &filename)
Open a music from an audio file.
Structure defining a chunk of audio data to stream.
virtual bool onGetData(Chunk &data)
Request a new chunk of audio samples from the stream source.
bool openFromMemory(const void *data, std::size_t sizeInBytes)
Open a music from an audio file in memory.
Time getDuration() const
Get the total duration of the music.