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