jdk/src/share/classes/javax/sound/sampled/ReverbType.java
author malenkov
Tue, 29 Oct 2013 17:01:06 +0400
changeset 21278 ef8a3a2a72f2
parent 5506 202f599c92aa
child 22260 c9185e010e03
permissions -rw-r--r--
8022746: List of spelling errors in API doc Reviewed-by: alexsch, smarks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.sound.sampled;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * The <code>ReverbType</code> class provides methods for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * accessing various reverberation settings to be applied to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * an audio signal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * Reverberation simulates the reflection of sound off of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * the walls, ceiling, and floor of a room.  Depending on
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * the size of the room, and how absorbent or reflective the materials in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * room's surfaces are, the sound might bounce around for a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * long time before dying away.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * The reverberation parameters provided by <code>ReverbType</code> consist
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * of the delay time and intensity of early reflections, the delay time and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * intensity of late reflections, and an overall decay time.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * Early reflections are the initial individual low-order reflections of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * direct signal off the surfaces in the room.
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
    45
 * The late Reflections are the dense, high-order reflections that characterize
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * the room's reverberation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * The delay times for the start of these two reflection types give the listener
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * a sense of the overall size and complexity of the room's shape and contents.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * The larger the room, the longer the reflection delay times.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * The early and late reflections' intensities define the gain (in decibels) of the reflected
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * signals as compared to the direct signal.  These intensities give the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * listener an impression of the absorptive nature of the surfaces and objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * in the room.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * The decay time defines how long the reverberation takes to exponentially
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * decay until it is no longer perceptible ("effective zero").
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * The larger and less absorbent the surfaces, the longer the decay time.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * The set of parameters defined here may not include all aspects of reverberation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * as specified by some systems.  For example, the Midi Manufacturer's Association
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * (MMA) has an Interactive Audio Special Interest Group (IASIG), which has a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * 3-D Working Group that has defined a Level 2 Spec (I3DL2).  I3DL2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * supports filtering of reverberation and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * control of reverb density.  These properties are not included in the JavaSound 1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * definition of a reverb control.  In such a case, the implementing system
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * should either extend the defined reverb control to include additional
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * parameters, or else interpret the system's additional capabilities in a way that fits
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * the model described here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * If implementing JavaSound on a I3DL2-compliant device:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * <li>Filtering is disabled (high-frequency attenuations are set to 0.0 dB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * <li>Density parameters are set to midway between minimum and maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * The following table shows what parameter values an implementation might use for a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * representative set of reverberation settings.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * <b>Reverberation Types and Parameters</b>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * <table border=1 cellpadding=5 summary="reverb types and params: decay time, late intensity, late delay, early intensity, and early delay">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 *  <th>Type</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 *  <th>Decay Time (ms)</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 *  <th>Late Intensity (dB)</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 *  <th>Late Delay (ms)</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 *  <th>Early Intensity (dB)</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 *  <th>Early Delay(ms)</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 *  <td>Cavern</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 *  <td>2250</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 *  <td>-2.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 *  <td>41.3</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 *  <td>-1.4</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
 *  <td>10.3</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 *  <td>Dungeon</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
 *  <td>1600</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 *  <td>-1.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 *  <td>10.3</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 *  <td>-0.7</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 *  <td>2.6</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 *  <td>Garage</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 *  <td>900</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 *  <td>-6.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 *  <td>14.7</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 *  <td>-4.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 *  <td>3.9</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 *  <td>Acoustic Lab</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 *  <td>280</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 *  <td>-3.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 *  <td>8.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 *  <td>-2.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 *  <td>2.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 *  <td>Closet</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 *  <td>150</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 *  <td>-10.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 *  <td>2.5</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 *  <td>-7.0</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 *  <td>0.6</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 * </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 * @author Kara Kytle
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
public class ReverbType {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * Descriptive name of the reverb type..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    private String name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * Early reflection delay in microseconds.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    private int earlyReflectionDelay;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * Early reflection intensity.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    private float earlyReflectionIntensity;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * Late reflection delay in microseconds.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    private int lateReflectionDelay;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * Late reflection intensity.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    private float lateReflectionIntensity;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * Total decay time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    private int decayTime;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * Constructs a new reverb type that has the specified reverberation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * parameter values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * @param name the name of the new reverb type, or a zero-length <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * @param earlyReflectionDelay the new type's early reflection delay time in microseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * @param earlyReflectionIntensity the new type's early reflection intensity in dB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * @param lateReflectionDelay the new type's late reflection delay time in microseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * @param lateReflectionIntensity the new type's late reflection intensity in dB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     * @param decayTime the new type's decay time in microseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    protected ReverbType(String name, int earlyReflectionDelay, float earlyReflectionIntensity, int lateReflectionDelay, float lateReflectionIntensity, int decayTime) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        this.name = name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        this.earlyReflectionDelay = earlyReflectionDelay;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        this.earlyReflectionIntensity = earlyReflectionIntensity;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        this.lateReflectionDelay = lateReflectionDelay;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        this.lateReflectionIntensity = lateReflectionIntensity;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        this.decayTime = decayTime;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * Obtains the name of this reverb type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * @return the name of this reverb type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    public String getName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
            return name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * Returns the early reflection delay time in microseconds.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * This is the amount of time between when the direct signal is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * heard and when the first early reflections are heard.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * @return  early reflection delay time for this reverb type, in microseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    public final int getEarlyReflectionDelay() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        return earlyReflectionDelay;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     * Returns the early reflection intensity in decibels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * This is the amplitude attenuation of the first early reflections
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     * relative to the direct signal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * @return  early reflection intensity for this reverb type, in dB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    public final float getEarlyReflectionIntensity() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        return earlyReflectionIntensity;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     * Returns the late reflection delay time in microseconds.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * This is the amount of time between when the first early reflections
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * are heard and when the first late reflections are heard.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * @return  late reflection delay time for this reverb type, in microseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    public final int getLateReflectionDelay() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        return lateReflectionDelay;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     * Returns the late reflection intensity in decibels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * This is the amplitude attenuation of the first late reflections
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * relative to the direct signal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * @return  late reflection intensity for this reverb type, in dB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    public final float getLateReflectionIntensity() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        return lateReflectionIntensity;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     * Obtains the decay time, which is the amount of time over which the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     * late reflections attenuate to effective zero.  The effective zero
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     * value is implementation-dependent.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * @return  the decay time of the late reflections, in microseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    public final int getDecayTime() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
        return decayTime;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * Indicates whether the specified object is equal to this reverb type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * returning <code>true</code> if the objects are identical.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * @param obj the reference object with which to compare
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * @return <code>true</code> if this reverb type is the same as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * <code>obj</code>; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    public final boolean equals(Object obj) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        return super.equals(obj);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * Finalizes the hashcode method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    public final int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
        return super.hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     * Provides a <code>String</code> representation of the reverb type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * including its name and its parameter settings.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * The exact contents of the string may vary between implementations of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * Java Sound.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     * @return reverberation type name and description
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
    public final String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
        //$$fb2001-07-20: fix for bug 4385060: The "name" attribute of class "ReverbType" is not accessible.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
        //return (super.toString() + ", early reflection delay " + earlyReflectionDelay +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
        return (name + ", early reflection delay " + earlyReflectionDelay +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
                " ns, early reflection intensity " + earlyReflectionIntensity +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
                " dB, late deflection delay " + lateReflectionDelay +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
                " ns, late reflection intensity " + lateReflectionIntensity +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
                " dB, decay time " +  decayTime);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
} // class ReverbType