25 #ifndef SFML_SOUNDBUFFER_HPP
26 #define SFML_SOUNDBUFFER_HPP
31 #include <SFML/System/Resource.hpp>
32 #include <SFML/Audio/AudioResource.hpp>
78 bool LoadFromFile(
const std::string& Filename);
89 bool LoadFromMemory(
const char* Data, std::size_t SizeInBytes);
103 bool LoadFromSamples(
const Int16* Samples, std::size_t SamplesCount,
unsigned int ChannelsCount,
unsigned int SampleRate);
113 bool SaveToFile(
const std::string& Filename)
const;
121 const Int16* GetSamples()
const;
129 std::size_t GetSamplesCount()
const;
137 unsigned int GetSampleRate()
const;
145 unsigned int GetChannelsCount()
const;
153 float GetDuration()
const;
178 bool Update(
unsigned int ChannelsCount,
unsigned int SampleRate);
186 void AttachSound(
Sound* Instance)
const;
194 void DetachSound(
Sound* Instance)
const;
199 typedef std::set<Sound*> SoundList;
204 unsigned int myBuffer;
205 std::vector<Int16> mySamples;
207 mutable SoundList mySounds;
213 #endif // SFML_SOUNDBUFFER_HPP