mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
The native audio stuff makes noise now (although just the sawtooth).
This commit is contained in:
1 parent
3e05162dc0
commit
063e32e1da
6 files changed
+54
-22
No files matched your search
@@ -1,18 +1,21 @@
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "android/native_audio.h"
|
||||
#include "android/native-audio-so.h"
|
||||
|
||||
static void *so;
|
||||
|
||||
static OpenSLWrap_Init_T init_func;
|
||||
static OpenSLWrap_Shutdown_T shutdown_func;
|
||||
|
||||
bool AndroidAudio_Init(AndroidAudioCallback cb) {
|
||||
bool AndroidAudio_Init(AndroidAudioCallback cb, std::string libraryDir) {
|
||||
ILOG("Loading native audio library...");
|
||||
so = dlopen("libnative_audio.so", RTLD_NOW);
|
||||
std::string so_filename = libraryDir + "/libnative_audio.so";
|
||||
so = dlopen(so_filename.c_str(), RTLD_LAZY);
|
||||
if (!so) {
|
||||
ELOG("Failed to find native audio library");
|
||||
ELOG("Failed to find native audio library: %i: %s ", errno, dlerror());
|
||||
return false;
|
||||
}
|
||||
init_func = (OpenSLWrap_Init_T)dlsym(so, "OpenSLWrap_Init");
|
||||
@@ -24,7 +27,6 @@ bool AndroidAudio_Init(AndroidAudioCallback cb) {
|
||||
return init_retval;
|
||||
}
|
||||
|
||||
|
||||
void AndroidAudio_Shutdown() {
|
||||
ILOG("Calling OpenSLWrap_Shutdown_T...");
|
||||
shutdown_func();
|
||||
|
||||
Reference in new issue
Block a user