25 #ifndef SFML_SOUNDBUFFER_HPP
26 #define SFML_SOUNDBUFFER_HPP
31 #include <SFML/Audio/Export.hpp>
32 #include <SFML/System/Time.hpp>
90 bool loadFromFile(
const std::string& filename);
107 bool loadFromMemory(
const void* data, std::size_t sizeInBytes);
141 bool loadFromSamples(
const Int16* samples, std::size_t sampleCount,
unsigned int channelCount,
unsigned int sampleRate);
157 bool saveToFile(
const std::string& filename)
const;
171 const Int16* getSamples()
const;
184 std::size_t getSampleCount()
const;
198 unsigned int getSampleRate()
const;
211 unsigned int getChannelCount()
const;
221 Time getDuration()
const;
245 bool initialize(priv::SoundFile& file);
256 bool update(
unsigned int channelCount,
unsigned int sampleRate);
264 void attachSound(
Sound* sound)
const;
272 void detachSound(
Sound* sound)
const;
277 typedef std::set<Sound*> SoundList;
282 unsigned int m_buffer;
283 std::vector<Int16> m_samples;
285 mutable SoundList m_sounds;
291 #endif // SFML_SOUNDBUFFER_HPP