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