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