aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java
blob: da0bb0a3bee98781f5d3adef7d70ece9eefb4893 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package invalid.lena.scrcpy;

// Sink for parsed audio frames. AudioSink is the only production
// implementation; tests use a recording stub. Kept android-free.
//
// start(fourcc) tells the sink which wire codec it should expect.
// For raw payloads are interleaved s16le PCM. For opus the first
// frame has isConfig=true and payload is the OpusHead (the server
// pre-strips the AOPUSHDR/AOPUSDLY/AOPUSPRL container); subsequent
// frames are opus packets.
public interface AudioFrames {

    void start(int fourcc);

    void feed(byte[] data, int off, int len, boolean isConfig);

    void release();
}