X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuffer.cpp;h=8e53964f930b783d52daaed06df09b91dcdc2eaf;hb=ef9906f379e066cb9c754853a3cc771e8e881356;hp=1d7510e0a527f8dc165b4dcb2e85ac48e52a190a;hpb=14008b157c64752ba7c1cef831124992c35c4646;p=libs%2Fal.git diff --git a/source/buffer.cpp b/source/buffer.cpp index 1d7510e..8e53964 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -1,5 +1,6 @@ +#include #include "buffer.h" -#include "sound.h" +#include "waveform.h" using namespace std; @@ -21,17 +22,17 @@ void Buffer::data(Format fmt, const void *dt, sizei size, sizei freq) alBufferData(id, fmt, dt, size, freq); } -void Buffer::data(const Sound &snd) +void Buffer::data(const Waveform &wave) { - data(snd.get_format(), snd.get_data(), snd.get_size(), snd.get_frequency()); + data(wave.get_format(), wave.get_data(), wave.get_size(), wave.get_frequency()); } void Buffer::load_data(const string &fn) { - Sound sound; - sound.load_file(fn); + Waveform wave; + wave.load_file(fn); - data(sound); + data(wave); } @@ -43,10 +44,11 @@ Buffer::Loader::Loader(Buffer &b): void Buffer::Loader::sound_data(const string &data) { - Sound sound; - sound.load_memory(data.data(), data.size()); + Waveform wave; + IO::Memory mem(data.data(), data.size()); + wave.load_io(mem); - buf.data(sound); + buf.data(wave); } } // namespace AL