2013-04-21 09:17:03 +03:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2012-12-17 23:01:52 +02:00
|
|
|
|
2014-02-10 20:54:46 +02:00
|
|
|
#pragma once
|
2012-12-26 20:12:26 +02:00
|
|
|
|
2014-02-17 12:18:15 +02:00
|
|
|
#include "AudioCommon/SoundStream.h"
|
2014-04-14 02:15:23 +03:00
|
|
|
#include "Common/Event.h"
|
|
|
|
#include "Common/StdThread.h"
|
2012-12-17 23:01:52 +02:00
|
|
|
|
2014-03-18 16:37:45 +02:00
|
|
|
class OpenSLESStream final : public SoundStream
|
2012-12-17 23:01:52 +02:00
|
|
|
{
|
2013-02-26 21:49:00 +02:00
|
|
|
#ifdef ANDROID
|
|
|
|
public:
|
2014-03-09 22:14:26 +02:00
|
|
|
OpenSLESStream(CMixer *mixer, void *hWnd = nullptr)
|
2013-02-26 21:49:00 +02:00
|
|
|
: SoundStream(mixer)
|
|
|
|
{};
|
|
|
|
|
|
|
|
virtual ~OpenSLESStream() {};
|
|
|
|
|
|
|
|
virtual bool Start();
|
|
|
|
virtual void Stop();
|
|
|
|
static bool isValid() { return true; }
|
|
|
|
|
2012-12-17 23:01:52 +02:00
|
|
|
private:
|
2013-02-26 21:49:00 +02:00
|
|
|
std::thread thread;
|
|
|
|
Common::Event soundSyncEvent;
|
|
|
|
#else
|
2012-12-17 23:01:52 +02:00
|
|
|
public:
|
2014-03-09 22:14:26 +02:00
|
|
|
OpenSLESStream(CMixer *mixer, void *hWnd = nullptr): SoundStream(mixer) {}
|
2013-02-26 21:49:00 +02:00
|
|
|
#endif // HAVE_OPENSL
|
2012-12-17 23:01:52 +02:00
|
|
|
};
|