mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-18 23:01:05 +00:00
Possible to specify audio device and default to hw:0 to stop using PusleAudio
This commit is contained in:
@@ -6,9 +6,19 @@
|
||||
// This function must be called before
|
||||
// any other decoding functions
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_limelight_binding_audio_AlsaAudio_init(JNIEnv *env, jobject this, jint channelCount, jint sampleRate)
|
||||
Java_com_limelight_binding_audio_AlsaAudio_init(JNIEnv *env, jobject this, jint channelCount, jint sampleRate, jbyteArray device)
|
||||
{
|
||||
return nv_alsa_init(channelCount, sampleRate);
|
||||
jint ret;
|
||||
jbyte* jni_device;
|
||||
|
||||
jni_device = (*env)->GetByteArrayElements(env, device, 0);
|
||||
|
||||
ret = nv_alsa_init(channelCount, sampleRate, jni_device);
|
||||
|
||||
// The input data isn't changed so it can be safely aborted
|
||||
(*env)->ReleaseByteArrayElements(env, device, jni_device, JNI_ABORT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
|
||||
Reference in New Issue
Block a user