summaryrefslogtreecommitdiff
path: root/songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2007-01-08 23:53:00 +0000
committerBjörn Stenberg <bjorn@haxx.se>2007-01-08 23:53:00 +0000
commit7039a05147b8bbfc829babea1c65bd436450b505 (patch)
tree4ba555eb84ed97b72b0575034d5b0530a393713e /songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java
parent6d4c19707ef95942e323cbdc89fbbfdbe45e7cc5 (diff)
downloadrockbox-7039a05147b8bbfc829babea1c65bd436450b505.tar.gz
rockbox-7039a05147b8bbfc829babea1c65bd436450b505.zip
Splitting out songdbj
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11953 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java')
-rw-r--r--songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java113
1 files changed, 0 insertions, 113 deletions
diff --git a/songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java b/songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java
deleted file mode 100644
index fd9831e291..0000000000
--- a/songdbj/org/tritonus/share/sampled/file/TAudioFileFormat.java
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * TAudioFileFormat.java
3 *
4 * This file is part of Tritonus: http://www.tritonus.org/
5 */
6
7/*
8 * Copyright (c) 1999 by Matthias Pfisterer
9 *
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Library General Public License as published
13 * by the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * You should have received a copy of the GNU Library General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 */
26
27/*
28|<--- this code is formatted to fit into 80 columns --->|
29*/
30
31package org.tritonus.share.sampled.file;
32
33import java.util.Collections;
34import java.util.HashMap;
35import java.util.Map;
36
37import javax.sound.sampled.AudioFileFormat;
38import javax.sound.sampled.AudioFormat;
39
40
41
42/**
43 * This class is just to have a public constructor taking the
44 * number of bytes of the whole file. The public constructor of
45 * AudioFileFormat doesn't take this parameter, the one who takes
46 * it is protected.
47 *
48 * @author Matthias Pfisterer
49 */
50public class TAudioFileFormat
51extends AudioFileFormat
52{
53 private Map<String, Object> m_properties;
54 private Map<String, Object> m_unmodifiableProperties;
55
56
57 /*
58 * Note that the order of the arguments is different from
59 * the one in AudioFileFormat.
60 */
61 public TAudioFileFormat(Type type,
62 AudioFormat audioFormat,
63 int nLengthInFrames,
64 int nLengthInBytes)
65 {
66 super(type,
67 nLengthInBytes,
68 audioFormat,
69 nLengthInFrames);
70 }
71
72
73 public TAudioFileFormat(Type type,
74 AudioFormat audioFormat,
75 int nLengthInFrames,
76 int nLengthInBytes,
77 Map<String, Object> properties)
78 {
79 super(type,
80 nLengthInBytes,
81 audioFormat,
82 nLengthInFrames);
83 initMaps(properties);
84 }
85
86
87 private void initMaps(Map<String, Object> properties)
88 {
89 /* Here, we make a shallow copy of the map. It's unclear if this
90 is sufficient (of if a deep copy should be made).
91 */
92 m_properties = new HashMap<String, Object>();
93 m_properties.putAll(properties);
94 m_unmodifiableProperties = Collections.unmodifiableMap(m_properties);
95 }
96
97
98 public Map<String, Object> properties()
99 {
100 return m_unmodifiableProperties;
101 }
102
103
104
105 protected void setProperty(String key, Object value)
106 {
107 m_properties.put(key, value);
108 }
109}
110
111
112
113/*** TAudioFileFormat.java ***/