2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2012-12-17 21:01:52 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2012-12-26 18:12:26 +00:00
|
|
|
|
2014-08-14 05:14:35 +00:00
|
|
|
#include <thread>
|
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "AudioCommon/SoundStream.h"
|
2014-04-13 23:15:23 +00:00
|
|
|
#include "Common/Event.h"
|
2012-12-17 21:01:52 +00:00
|
|
|
|
2014-03-18 14:37:45 +00:00
|
|
|
class OpenSLESStream final : public SoundStream
|
2012-12-17 21:01:52 +00:00
|
|
|
{
|
2022-08-07 23:17:41 +00:00
|
|
|
#ifdef HAVE_OPENSL_ES
|
2013-02-26 19:49:00 +00:00
|
|
|
public:
|
2017-10-21 23:23:40 +00:00
|
|
|
~OpenSLESStream() override;
|
|
|
|
bool Init() override;
|
2021-08-07 20:27:49 +00:00
|
|
|
bool SetRunning(bool running) override { return true; }
|
2019-11-24 20:34:50 +00:00
|
|
|
void SetVolume(int volume) override;
|
2021-08-07 23:23:58 +00:00
|
|
|
static bool IsValid() { return true; }
|
2018-04-12 12:18:04 +00:00
|
|
|
|
2012-12-17 21:01:52 +00:00
|
|
|
private:
|
2013-02-26 19:49:00 +00:00
|
|
|
std::thread thread;
|
|
|
|
Common::Event soundSyncEvent;
|
2022-08-07 23:17:41 +00:00
|
|
|
#endif // HAVE_OPENSL_ES
|
2012-12-17 21:01:52 +00:00
|
|
|
};
|