mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-23 14:23:51 +00:00
31 lines
583 B
C++
31 lines
583 B
C++
#ifndef MANGLE_SOUND_OGREUPDATER_H
|
|
#define MANGLE_SOUND_OGREUPDATER_H
|
|
|
|
/*
|
|
This Ogre FrameListener calls update on a SoundFactory
|
|
*/
|
|
|
|
#include <OgreFrameListener.h>
|
|
#include "../output.hpp"
|
|
#include <assert.h>
|
|
|
|
namespace Mangle {
|
|
namespace Sound {
|
|
|
|
struct OgreOutputUpdater : Ogre::FrameListener
|
|
{
|
|
Mangle::Sound::SoundFactoryPtr driver;
|
|
|
|
OgreOutputUpdater(Mangle::Sound::SoundFactoryPtr drv)
|
|
: driver(drv)
|
|
{ assert(drv->needsUpdate); }
|
|
|
|
bool frameStarted(const Ogre::FrameEvent &evt)
|
|
{
|
|
driver->update();
|
|
return true;
|
|
}
|
|
};
|
|
}}
|
|
|
|
#endif
|