001 /* Reverb attributes 002 Copyright (C) 2005 Free Software Foundation, Inc. 003 004 This file is part of GNU Classpath. 005 006 GNU Classpath is free software; you can redistribute it and/or modify 007 it under the terms of the GNU General Public License as published by 008 the Free Software Foundation; either version 2, or (at your option) 009 any later version. 010 011 GNU Classpath is distributed in the hope that it will be useful, but 012 WITHOUT ANY WARRANTY; without even the implied warranty of 013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 General Public License for more details. 015 016 You should have received a copy of the GNU General Public License 017 along with GNU Classpath; see the file COPYING. If not, write to the 018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 019 02110-1301 USA. 020 021 Linking this library statically or dynamically with other modules is 022 making a combined work based on this library. Thus, the terms and 023 conditions of the GNU General Public License cover the whole 024 combination. 025 026 As a special exception, the copyright holders of this library give you 027 permission to link this library with independent modules to produce an 028 executable, regardless of the license terms of these independent 029 modules, and to copy and distribute the resulting executable under 030 terms of your choice, provided that you also meet, for each linked 031 independent module, the terms and conditions of the license of that 032 module. An independent module is a module which is not derived from 033 or based on this library. If you modify this library, you may extend 034 this exception to your version of the library, but you are not 035 obligated to do so. If you do not wish to do so, delete this 036 exception statement from your version. */ 037 038 039 package javax.sound.sampled; 040 041 /** 042 * This represents a reverb effect which can be applied to an audio signal. 043 * @since 1.3 044 */ 045 public class ReverbType 046 { 047 private String name; 048 private int earlyReflectionDelay; 049 private float earlyReflectionIntensity; 050 private int lateReflectionDelay; 051 private float lateReflectionIntensity; 052 private int decayTime; 053 054 /** 055 * Create a new ReverbType given its attributes. 056 * @param name the name of this type 057 * @param earlyDelay the early delay time in microseconds 058 * @param earlyInten the early intensity in decibels 059 * @param lateDelay the late delay time in microseconds 060 * @param lateInten the late intensity in decibels 061 * @param decay the decay time in microseconds 062 */ 063 protected ReverbType(String name, int earlyDelay, float earlyInten, 064 int lateDelay, float lateInten, int decay) 065 { 066 this.name = name; 067 this.earlyReflectionDelay = earlyDelay; 068 this.earlyReflectionIntensity = earlyInten; 069 this.lateReflectionDelay = lateDelay; 070 this.lateReflectionIntensity = lateInten; 071 this.decayTime = decay; 072 } 073 074 public final boolean equals(Object o) 075 { 076 return super.equals(o); 077 } 078 079 public final int hashCode() 080 { 081 return super.hashCode(); 082 } 083 084 /** 085 * Return the decay time. 086 */ 087 public final int getDecayTime() 088 { 089 return decayTime; 090 } 091 092 /** 093 * Return the early reflection delay. 094 */ 095 public final int getEarlyReflectionDelay() 096 { 097 return earlyReflectionDelay; 098 } 099 100 /** 101 * Return the early reflection intensity. 102 */ 103 public final float getEarlyReflectionIntensity() 104 { 105 return earlyReflectionIntensity; 106 } 107 108 /** 109 * Return the late reflection delay. 110 */ 111 public final int getLateReflectionDelay() 112 { 113 return lateReflectionDelay; 114 } 115 116 /** 117 * Return the late reflection intensity. 118 */ 119 public final float getLateReflectionIntensity() 120 { 121 return lateReflectionIntensity; 122 } 123 124 /** 125 * Return the name of this ReverbType. 126 * @since 1.5 127 */ 128 public String getName() 129 { 130 return name; 131 } 132 133 /** 134 * Return a description of this ReverbType. 135 */ 136 public final String toString() 137 { 138 return ("name=" + name + "; earlyReflectionDelay=" + earlyReflectionDelay 139 + "; earlyReflectionIntensity=" + earlyReflectionIntensity 140 + "; lateReflectionDelay=" + lateReflectionDelay 141 + "; lateReflectionIntensity=" + lateReflectionIntensity 142 + "; decayTime=" + decayTime); 143 } 144 }