3 This file is part of libmspal
4 Copyright © 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
23 alDeleteBuffers(1, &id);
26 void Buffer::data(Format fmt, const void *dt, sizei size, sizei freq)
28 alBufferData(id, fmt, dt, size, freq);
31 void Buffer::data(const Sound &snd)
33 data(snd.get_format(), snd.get_data(), snd.get_size(), snd.get_frequency());
36 void Buffer::load_data(const string &fn)
45 Buffer::Loader::Loader(Buffer &b):
48 add("sound_data", &Loader::sound_data);
51 void Buffer::Loader::sound_data(const string &data)
54 sound.load_memory(data.data(), data.size());