diff options
Diffstat (limited to 'songdbj/org/tritonus/file/gsm/GSMAudioFileWriter.java')
-rw-r--r-- | songdbj/org/tritonus/file/gsm/GSMAudioFileWriter.java | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/songdbj/org/tritonus/file/gsm/GSMAudioFileWriter.java b/songdbj/org/tritonus/file/gsm/GSMAudioFileWriter.java new file mode 100644 index 0000000000..eb3d1f3f16 --- /dev/null +++ b/songdbj/org/tritonus/file/gsm/GSMAudioFileWriter.java | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * GSMAudioFileWriter.java | ||
3 | * | ||
4 | * This file is part of Tritonus: http://www.tritonus.org/ | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * Copyright (c) 2000 by Florian Bomers <http://www.bomers.de> | ||
9 | * Copyright (c) 2000 by Matthias Pfisterer | ||
10 | * | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU Library General Public License as published | ||
14 | * by the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU Library General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU Library General Public | ||
23 | * License along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | /* | ||
29 | |<--- this code is formatted to fit into 80 columns --->| | ||
30 | */ | ||
31 | |||
32 | package org.tritonus.sampled.file.gsm; | ||
33 | |||
34 | import java.util.Arrays; | ||
35 | |||
36 | import javax.sound.sampled.AudioFileFormat; | ||
37 | import javax.sound.sampled.AudioFormat; | ||
38 | import javax.sound.sampled.AudioSystem; | ||
39 | |||
40 | import org.tritonus.share.TDebug; | ||
41 | import org.tritonus.share.sampled.file.THeaderlessAudioFileWriter; | ||
42 | |||
43 | |||
44 | |||
45 | /** Class for writing GSM streams | ||
46 | * | ||
47 | * @author Florian Bomers | ||
48 | * @author Matthias Pfisterer | ||
49 | */ | ||
50 | public class GSMAudioFileWriter | ||
51 | extends THeaderlessAudioFileWriter | ||
52 | { | ||
53 | private static final AudioFileFormat.Type[] FILE_TYPES = | ||
54 | { | ||
55 | new AudioFileFormat.Type("GSM", "gsm") | ||
56 | }; | ||
57 | |||
58 | private static final AudioFormat[] AUDIO_FORMATS = | ||
59 | { | ||
60 | new AudioFormat(new AudioFormat.Encoding("GSM0610"), 8000.0F, ALL, 1, 33, 50.0F, false), | ||
61 | new AudioFormat(new AudioFormat.Encoding("GSM0610"), 8000.0F, ALL, 1, 33, 50.0F, true), | ||
62 | }; | ||
63 | |||
64 | |||
65 | |||
66 | public GSMAudioFileWriter() | ||
67 | { | ||
68 | super(Arrays.asList(FILE_TYPES), | ||
69 | Arrays.asList(AUDIO_FORMATS)); | ||
70 | if (TDebug.TraceAudioFileWriter) { TDebug.out("GSMAudioFileWriter.<init>(): begin"); } | ||
71 | if (TDebug.TraceAudioFileWriter) { TDebug.out("GSMAudioFileWriter.<init>(): end"); } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | |||
76 | |||
77 | /*** GSMAudioFileWriter.java ***/ | ||