X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuffer.cpp;h=8e53964f930b783d52daaed06df09b91dcdc2eaf;hb=ef9906f379e066cb9c754853a3cc771e8e881356;hp=8f5b4aa6daf98dbe2a5cfd3ea61ca0f3f74293ef;hpb=97dae493948466867b9f661f45e451711dd6b41b;p=libs%2Fal.git diff --git a/source/buffer.cpp b/source/buffer.cpp index 8f5b4aa..8e53964 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -1,12 +1,6 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #include "buffer.h" -#include "sound.h" +#include "waveform.h" using namespace std; @@ -28,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); } @@ -50,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