dolphin/Source/Core/AudioCommon/OpenSLESStream.h

40 lines
622 B
C
Raw Normal View History

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
2012-12-17 22:01:52 +01:00
#pragma once
2012-12-26 19:12:26 +01:00
#include <thread>
#include "AudioCommon/SoundStream.h"
#include "Common/Event.h"
2012-12-17 22:01:52 +01:00
class OpenSLESStream final : public SoundStream
2012-12-17 22:01:52 +01:00
{
2013-02-26 20:49:00 +01:00
#ifdef ANDROID
public:
OpenSLESStream(CMixer *mixer)
2013-02-26 20:49:00 +01:00
: SoundStream(mixer)
{
}
2013-02-26 20:49:00 +01:00
virtual ~OpenSLESStream()
{
}
2013-02-26 20:49:00 +01:00
virtual bool Start();
virtual void Stop();
static bool isValid() { return true; }
2012-12-17 22:01:52 +01:00
private:
2013-02-26 20:49:00 +01:00
std::thread thread;
Common::Event soundSyncEvent;
#else
2012-12-17 22:01:52 +01:00
public:
OpenSLESStream(CMixer *mixer)
: SoundStream(mixer)
{
}
2013-02-26 20:49:00 +01:00
#endif // HAVE_OPENSL
2012-12-17 22:01:52 +01:00
};