blob: 24a2eaa19ab477b11fff9eb3f51ccaacd23f369e (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* $ProjectName$
* $ProjectRevision$
* -----------------------------------------------------------
* $Id$
* -----------------------------------------------------------
*
* $Author$
*
* Description:
*
* Copyright 2002-2003 Tor-Einar Jarnbjo
* -----------------------------------------------------------
*
* Change History
* -----------------------------------------------------------
* $Log$
* Revision 1.1 2005/07/11 15:42:36 hcl
* Songdb java version, source. only 1.5 compatible
*
* Revision 1.1.1.1 2004/04/04 22:09:12 shred
* First Import
*
* Revision 1.2 2003/03/16 01:11:12 jarnbjo
* no message
*
*
*/
package de.jarnbjo.vorbis;
import java.io.IOException;
import de.jarnbjo.util.io.BitInputStream;
abstract class Mapping {
protected static Mapping createInstance(VorbisStream vorbis, BitInputStream source, SetupHeader header) throws VorbisFormatException, IOException {
int type=source.getInt(16);
switch(type) {
case 0:
//System.out.println("mapping type 0");
return new Mapping0(vorbis, source, header);
default:
throw new VorbisFormatException("Mapping type "+type+" is not supported.");
}
}
protected abstract int getType();
protected abstract int[] getAngles();
protected abstract int[] getMagnitudes() ;
protected abstract int[] getMux();
protected abstract int[] getSubmapFloors();
protected abstract int[] getSubmapResidues();
protected abstract int getCouplingSteps();
protected abstract int getSubmaps();
}
|