Audio: Clean up threading and add AudioStream fadein (RGSS3)

This commit is contained in:
Jonas Kulla 2014-09-30 09:13:12 +02:00
parent 46497eae01
commit 51a0f3903c
10 changed files with 228 additions and 146 deletions

View file

@ -24,47 +24,20 @@
#include "config.h"
#include "etc-internal.h"
#include "sdl-util.h"
#include <SDL_scancode.h>
#include <SDL_joystick.h>
#include <SDL_mouse.h>
#include <SDL_mutex.h>
#include <SDL_atomic.h>
#include <string>
#include <stdint.h>
struct RGSSThreadData;
struct SDL_Thread;
struct SDL_Window;
struct AtomicFlag
{
AtomicFlag()
{
clear();
}
void set()
{
SDL_AtomicSet(&atom, 1);
}
void clear()
{
SDL_AtomicSet(&atom, 0);
}
operator bool() const
{
return SDL_AtomicGet(&atom);
}
private:
mutable SDL_atomic_t atom;
};
class EventThread
{
public: