-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathG721InputStream.java
44 lines (37 loc) · 1.14 KB
/
G721InputStream.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright (c) 2003 by Naohide Sano, All rights reserved.
*
* Programmed by Naohide Sano
*/
package vavi.sound.adpcm.ccitt;
import java.io.InputStream;
import java.nio.ByteOrder;
import vavi.sound.adpcm.AdpcmInputStream;
import vavi.sound.adpcm.Codec;
/**
* G721 InputStream.
*
* @author <a href="mailto:[email protected]">Naohide Sano</a> (nsano)
* @version 0.00 030714 nsano initial version <br>
* 0.01 030714 nsano fine tune <br>
* 0.02 030714 nsano fix available() <br>
* 0.03 030715 nsano support read() endian <br>
* 0.10 060427 nsano refactoring <br>
*/
public class G721InputStream extends AdpcmInputStream {
@Override
protected Codec getCodec() {
return new G721();
}
/**
* {@link vavi.io.BitInputStream} is 4bit little endian fixed
* <li>TODO endian for BitInputStream
* <li>TODO PCM encoding
* @param in G721 ADPCM
* @param byteOrder byte order for #read()
*/
public G721InputStream(InputStream in, ByteOrder byteOrder) {
super(in, byteOrder, 4, ByteOrder.LITTLE_ENDIAN);
((G721) decoder).setEncoding(encoding);
}
}