mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-05 07:26:07 +00:00
Replace Javax Sound with direct alsa access
This commit is contained in:
26
src/com/limelight/binding/audio/AlsaAudioRenderer.java
Normal file
26
src/com/limelight/binding/audio/AlsaAudioRenderer.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.limelight.binding.audio;
|
||||
|
||||
import com.limelight.nvstream.av.audio.AudioRenderer;
|
||||
|
||||
/**
|
||||
* Audio renderer implementation
|
||||
* @author Iwan Timmer
|
||||
*/
|
||||
public class AlsaAudioRenderer implements AudioRenderer {
|
||||
|
||||
@Override
|
||||
public void streamInitialized(int channelCount, int sampleRate) {
|
||||
AlsaAudio.init(channelCount, sampleRate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playDecodedAudio(byte[] bytes, int offset, int length) {
|
||||
AlsaAudio.play(bytes, offset, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void streamClosing() {
|
||||
AlsaAudio.close();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user