Improved OpenAL includes. Hacked std_stream to make seek() able to recover from eof().

This commit is contained in:
Nicolay Korslund 2010-09-13 10:52:26 +02:00
parent 7a22068da6
commit 7345f2307f
2 changed files with 11 additions and 2 deletions

View file

@ -4,8 +4,16 @@
#include "../../stream/filters/buffer_stream.hpp"
#include "al.h"
#include "alc.h"
#ifdef _WIN32
#include <al.h>
#include <alc.h>
#elif defined(__APPLE__)
#include <OpenAL/alc.h>
#include <OpenAL/al.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#endif
using namespace Mangle::Sound;

View file

@ -36,6 +36,7 @@ class StdStream : public Stream
void seek(size_t pos)
{
inf->clear();
inf->seekg(pos);
if(inf->fail())
fail("seek error");