-
Notifications
You must be signed in to change notification settings - Fork 9
/
emumedia.h
31 lines (24 loc) · 844 Bytes
/
emumedia.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef EMUMEDIA_H
#define EMUMEDIA_H
#include <nativehelper/jni.h>
#include "emuengine.h"
class EmuMedia {
public:
virtual ~EmuMedia() {}
virtual bool init(JNIEnv *env) = 0;
virtual void destroy(JNIEnv *env) = 0;
virtual void setSurface(JNIEnv *env, jobject holder) = 0;
virtual void setSurfaceRegion(JNIEnv *env,
int x, int y, int w, int h) = 0;
virtual bool lockSurface(JNIEnv *env,
EmuEngine::Surface *info, bool flip) = 0;
virtual void unlockSurface(JNIEnv *env) = 0;
virtual bool audioCreate(JNIEnv *env,
unsigned int rate, int bits, int channels) = 0;
virtual void audioSetVolume(JNIEnv *env, int volume) = 0;
virtual void audioStart(JNIEnv *env) = 0;
virtual void audioStop(JNIEnv *env) = 0;
virtual void audioPause(JNIEnv *env) = 0;
virtual void audioPlay(JNIEnv *env, void *data, int size) = 0;
};
#endif