#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
-#include "Engine.hh"
-#include "Exception.hh"
+#include "Core.hh"
+#include "Error.hh"
#include "Library.hh"
#include "Log.hh"
#include "Sound.hh"
{
public:
- Buffer(const std::string& name) :
+ explicit Buffer(const std::string& name) :
Library<Buffer>(name),
mBuffer(-1)
{
{
logWarning << "error while loading sound "
<< getName() << std::endl;
- throw Exception(ErrorCode::UNKNOWN_AUDIO_FORMAT, getName());
+ throw Error(Error::UNKNOWN_AUDIO_FORMAT, getName());
}
vorbis_info* vorbisInfo = ov_info(&mOggStream, -1);
void init()
{
- // make sure the engine is initialized
- Engine::getInstance();
-
mIsLoaded = false;
mIsPlaying = false;
mIsLooping = false;
std::deque<BufferP> mQueue;
Timer mStreamTimer;
+
+ Backend mBackend;
};