net.sourceforge.dvb.projectx.audio
Class MpaDecoder
java.lang.Object
|
+--net.sourceforge.dvb.projectx.audio.MpaDecoder
- public class MpaDecoder
- extends java.lang.Object
Method Summary |
static int |
check_sync()
|
static int |
decode_layer1()
|
static int |
decode_layer2()
|
static byte[] |
decodeArray(byte[] data)
|
static void |
deleteAiff(java.lang.String file)
|
static void |
deleteRIFF(java.lang.String file)
|
static void |
fillAiff(java.lang.String file,
long playtime,
boolean fade,
int fade_millis)
|
static void |
fillRIFF(java.lang.String file,
boolean fade,
int fade_millis)
|
static void |
flushbits(int N)
|
static void |
flushBuffer(int N)
|
static byte[] |
get2ndArray()
|
static int |
getbits(int N)
|
static void |
init_work(int resample_type)
|
static void |
loadbits(int size)
public static void loadbits(int size) {
BitPos = BufferPos<<3;
BufferPos += size;
}
public static int getbits(int N) {
int Pos, Val;
Pos = BitPos>>>3;
Val = (0xFF&buf[Pos])<<24 |
(0xFF&buf[Pos+1])<<16 |
(0xFF&buf[Pos+2])<<8 |
(0xFF&buf[Pos+3]);
Val <<= BitPos & 7;
Val >>>= 32-N;
BitPos += N;
return Val;
} |
static int |
parse_header()
|
static int |
showbits(int N)
|
static void |
silentSamples(int new_sampling_frequency)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RIFF
public static byte[] RIFF
AIFF
public static byte[] AIFF
PRESCAN
public static boolean PRESCAN
MOTOROLA
public static boolean MOTOROLA
DOWNSAMPLE
public static boolean DOWNSAMPLE
DOWNMIX
public static boolean DOWNMIX
WAVE
public static boolean WAVE
MONO
public static boolean MONO
RESET
public static boolean RESET
NORMALIZE
public static boolean NORMALIZE
MULTIPLY
public static double MULTIPLY
MAX_VALUE
public static int MAX_VALUE
MpaDecoder
public MpaDecoder()
check_sync
public static int check_sync()
loadbits
public static void loadbits(int size)
- public static void loadbits(int size) {
BitPos = BufferPos<<3;
BufferPos += size;
}
public static int getbits(int N) {
int Pos, Val;
Pos = BitPos>>>3;
Val = (0xFF&buf[Pos])<<24 |
(0xFF&buf[Pos+1])<<16 |
(0xFF&buf[Pos+2])<<8 |
(0xFF&buf[Pos+3]);
Val <<= BitPos & 7;
Val >>>= 32-N;
BitPos += N;
return Val;
}
getbits
public static int getbits(int N)
showbits
public static int showbits(int N)
flushbits
public static void flushbits(int N)
flushBuffer
public static void flushBuffer(int N)
parse_header
public static int parse_header()
decode_layer2
public static int decode_layer2()
throws java.io.IOException
decode_layer1
public static int decode_layer1()
throws java.io.IOException
init_work
public static void init_work(int resample_type)
fillAiff
public static void fillAiff(java.lang.String file,
long playtime,
boolean fade,
int fade_millis)
throws java.io.IOException
deleteAiff
public static void deleteAiff(java.lang.String file)
throws java.io.IOException
fillRIFF
public static void fillRIFF(java.lang.String file,
boolean fade,
int fade_millis)
throws java.io.IOException
deleteRIFF
public static void deleteRIFF(java.lang.String file)
throws java.io.IOException
silentSamples
public static void silentSamples(int new_sampling_frequency)
throws java.io.IOException
decodeArray
public static byte[] decodeArray(byte[] data)
get2ndArray
public static byte[] get2ndArray()