00001 using Microsoft.VisualBasic;
00002 using Microsoft.VisualBasic.Compatibility;
00003 using System;
00004 using System.Collections;
00005 using System.Collections.Generic;
00006 using System.Data;
00007 using System.Drawing;
00008 using System.Diagnostics;
00009 using System.Windows.Forms;
00010 using System.Linq;
00011 using System.Xml.Linq;
00012 using SoundsSharpNameSpace.fmodex.fmodexvb;
00013 using SoundsSharpNameSpace.fmodex.DSP;
00014 namespace SoundsSharpNameSpace
00015 {
00016
00017 public class SoundsSharp
00018 {
00019 public static GlobalVelocity;
00020 public static Vector lastpos = new Vector();
00021
00022
00023 #region "SoundManager"
00024 public static long SoundSystem;
00025 public class SoundManager
00026 {
00027 #region "SoundManager::Init Stuffs"
00028 #region "SoundManager::Init Stuffs::New"
00029 public SoundManager()
00030 {
00031 Init();
00032 Config(FMOD_OUTPUTTYPE.FMOD_OUTPUTTYPE_OPENAL, FMOD_SPEAKERMODE.FMOD_SPEAKERMODE_STEREO);
00033 }
00034 public SoundManager(FMOD_OUTPUTTYPE optype)
00035 {
00036 Init();
00037 Config(optype, FMOD_SPEAKERMODE.FMOD_SPEAKERMODE_STEREO);
00038 }
00039 public SoundManager(FMOD_OUTPUTTYPE optype, FMOD_SPEAKERMODE spkmde)
00040 {
00041 Init();
00042 Config(optype, spkmde);
00043 }
00044 #endregion
00045
00046 public bool Init()
00047 {
00048 bool FirstResult = false;
00049 bool SecondResult = false;
00050 if (SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_Create(ref SoundsSharp.SoundSystem) == 0) {
00051 FirstResult = true;
00052 }
00053 else {
00054 FirstResult = false;
00055 }
00056
00057
00058 if (SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_Init(SoundsSharp.SoundSystem, 32, FMOD_INITFLAGS.FMOD_INIT_3D_RIGHTHANDED, 0) == FMOD_RESULT.FMOD_OK) {
00059 SecondResult = true;
00060 }
00061 else {
00062 SecondResult = false;
00063 }
00064
00065 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_Set3DSettings(SoundsSharp.SoundSystem, 1, 1.0, 1);
00066
00067 return (FirstResult & SecondResult);
00068 }
00069
00070 public void Config(fmodex.FMOD_OUTPUTTYPE Outputmode, fmodex.FMOD_SPEAKERMODE SpeakerMode)
00071 {
00072 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_SetOutput(SoundsSharp.SoundSystem, Outputmode);
00073 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_SetSpeakerMode(SoundsSharp.SoundSystem, SpeakerMode);
00074 }
00075 #endregion
00076
00077
00078
00079
00080
00081
00082
00083
00084 private long[] DSP = new long[21];
00085 private long[] Active = new long[21];
00086 public long getID()
00087 {
00088 return SoundsSharp.SoundSystem;
00089 }
00090 public void ActivateSFX(FMOD_DSP_TYPE type)
00091 {
00092 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateDSPByType(SoundsSharp.SoundSystem, FMOD_DSP_TYPE.FMOD_DSP_TYPE_COMPRESSOR, ref DSP(type));
00093 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_DSP_GetActive(DSP(type), ref Active(type));
00094 }
00095 public void DesactivateSFX(FMOD_DSP_TYPE type)
00096 {
00097 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_DSP_Remove(DSP(type));
00098 }
00099
00100 public void Update()
00101 {
00102 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_Update(SoundsSharp.SoundSystem);
00103 }
00104
00105 public void Update_3D(Vector pos, Vector Forward, Vector up, float FPS)
00106 {
00107 Vector vel = default(Vector);
00108 vel.X = (pos.X - SoundsSharp.lastpos.X) * (1000 / FPS);
00109 vel.Y = (pos.Y - SoundsSharp.lastpos.Y) * (1000 / FPS);
00110 vel.Z = (pos.Z - SoundsSharp.lastpos.Z) * (1000 / FPS);
00111
00112 SoundsSharp.lastpos = pos;
00113 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_Update(SoundsSharp.SoundSystem);
00114 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_Set3DListenerAttributes(SoundsSharp.SoundSystem, 0, ref pos, ref SoundsSharp.GlobalVelocity, ref Forward, ref up);
00115
00116 }
00117
00118
00119
00120
00121 }
00122 #endregion
00123
00124
00125 #region "Sound::Ambient"
00126 public class SoundAmbient
00127 {
00128 public long ID;
00129 public long Channel;
00130 private float Volume_;
00131 private float Frequency;
00132 public bool _loop {
00133 set {
00134 if (value == true) {
00135 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_NORMAL);
00136 }
00137 else {
00138 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_OFF);
00139 }
00140 }
00141 }
00142 public SoundAmbient(System.Object filepath, bool loopy)
00143 {
00144 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateSound(SoundsSharp.SoundSystem, filepath, FMOD_MODE.FMOD_LOOP_NORMAL, ref ID);
00145
00146 if (loopy == true) {
00147 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_NORMAL);
00148 }
00149 else {
00150 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_OFF);
00151 }
00152 }
00153 public SoundAmbient(System.Object filepath)
00154 {
00155 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateSound(SoundsSharp.SoundSystem, filepath, FMOD_MODE.FMOD_LOOP_NORMAL, ref ID);
00156 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_NORMAL);
00157 }
00158 public void Play()
00159 {
00160 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_PlaySound(SoundsSharp.SoundSystem, FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, this.ID, 0, ref Channel);
00161 }
00162 public void stop_()
00163 {
00164 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_Stop(this.Channel);
00165 }
00166 public void pause()
00167 {
00168 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetPaused(Channel, 1);
00169 }
00170
00171 public void Pitch(float value)
00172 {
00173 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetFrequency(this.Channel, 22050 * value);
00174 }
00175 public void InitChannel()
00176 {
00177 Play();
00178 stop_();
00179 }
00180 public float Volume {
00181 get {
00182 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetVolume(this.Channel, ref this.Volume_);
00183 return Volume;
00184 }
00185 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.Channel, this.Volume_); }
00186 }
00187 private float delayst;
00188 private float delay_end;
00189 public float delayStart {
00190 get {
00191 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetDelay(this.Channel, ref delayst, ref delay_end);
00192 return delayst;
00193 }
00194 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetDelay(this.Channel, value, delay_end); }
00195 }
00196 public float delayEnd {
00197 get {
00198 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetDelay(this.Channel, ref delayst, ref delay_end);
00199 return delay_end;
00200 }
00201 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetDelay(this.Channel, delayst, value); }
00202 }
00203
00204
00205 }
00206 #endregion
00207
00208 #region "Sound::3D"
00209 public class Sound3D
00210 {
00211 public long ID;
00212 public long Channel;
00213 private float Volume_;
00214 private Vector _3Dposition;
00215 public Vector _3Dpos {
00216 get { return this._3Dposition; }
00217 set {
00218 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_Set3DAttributes(this.Channel, ref value, ref SoundsSharp.GlobalVelocity);
00219 _3Dposition = value;
00220 }
00221 }
00222 private float MinDistance;
00223 private float MaxDistance;
00224 private float frequency;
00225 public bool _loop {
00226 set {
00227 if (value == true) {
00228 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_NORMAL);
00229 }
00230 else {
00231 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(ID, FMOD_MODE.FMOD_LOOP_OFF);
00232 }
00233 }
00234 }
00235
00236
00237
00238
00239 public Sound3D(System.Object Path, Vector positionvector, float minDist, float maxDis, bool loop_)
00240 {
00241
00242
00243 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateSound(SoundsSharp.SoundSystem, Path, FMOD_MODE.FMOD_HARDWARE | FMOD_MODE.FMOD_3D, ref ID);
00244
00245
00246 _3Dpos = positionvector;
00247
00248
00249 if (loop_ == true) {
00250 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_NORMAL);
00251 this._loop = true;
00252 }
00253 else {
00254 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(ID, FMOD_MODE.FMOD_LOOP_OFF);
00255 this._loop = false;
00256 }
00257
00258 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_Set3DMinMaxDistance(this.ID, minDist, MaxDistance);
00259 this.MinDistance = minDist;
00260 this.MaxDistance = maxDis;
00261
00262
00263 }
00264 public Sound3D(System.Object Path, Vector positionvector, float minDist, float maxDis)
00265 {
00266 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateSound(SoundsSharp.SoundSystem, Path, FMOD_MODE.FMOD_HARDWARE | FMOD_MODE.FMOD_3D, ref ID);
00267
00268 _3Dpos = positionvector;
00269
00270
00271 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_SetMode(this.ID, FMOD_MODE.FMOD_LOOP_NORMAL);
00272 this._loop = true;
00273
00274 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Sound_Set3DMinMaxDistance(this.ID, minDist, MaxDistance);
00275 this.MinDistance = minDist;
00276 this.MaxDistance = maxDis;
00277
00278 }
00279 public void Play()
00280 {
00281 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_PlaySound(SoundsSharp.SoundSystem, FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, this.ID, 0, ref Channel);
00282 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_Set3DAttributes(this.Channel, ref this._3Dpos, ref SoundsSharp.GlobalVelocity);
00283 }
00284 public void stop_()
00285 {
00286 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_Stop(this.Channel);
00287 }
00288 public void pause()
00289 {
00290 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetPaused(Channel, 1);
00291 }
00292
00293 public void Pitch(float value)
00294 {
00295 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetFrequency(this.Channel, 22050 * value);
00296 }
00297 public void InitChannel()
00298 {
00299 Play();
00300 stop_();
00301 }
00302 public float Volume {
00303 get {
00304 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetVolume(this.Channel, ref this.Volume_);
00305 return Volume;
00306 }
00307 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.Channel, this.Volume_); }
00308 }
00309 private float delayst;
00310 private float delay_end;
00311 public float delayStart {
00312 get {
00313 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetDelay(this.Channel, ref delayst, ref delay_end);
00314 return delayst;
00315 }
00316 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetDelay(this.Channel, value, delay_end); }
00317 }
00318 public float delayEnd {
00319 get {
00320 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetDelay(this.Channel, ref delayst, ref delay_end);
00321 return delay_end;
00322 }
00323 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetDelay(this.Channel, delayst, value); }
00324 }
00325
00326 }
00327 #endregion
00328
00329 #region "Sound::Music"
00330 public class Music
00331 {
00332 private long channel;
00333 private long ID;
00334 private float volume_;
00335 private float frequency;
00336 public struct FMOD_CREATESOUNDEXINFO
00337 {
00338
00339 public int cbsize;
00340
00341 public int Length;
00342
00343 public int fileoffset;
00344
00345 public int Numchannels;
00346
00347 public int defaultfrequency;
00348
00349
00350 public FMOD_SOUND_FORMAT Format_Renamed;
00351
00352 public int decodebuffersize;
00353
00354 public int initialsubsound;
00355
00356 public int Numsubsounds;
00357
00358 public int inclusionlist;
00359
00360 public int inclusionlistnum;
00361
00362 public int pcmreadcallback;
00363
00364 public int pcmsetposcallback;
00365
00366 public int nonblockcallback;
00367
00368 public string dlsname;
00369
00370 public string encryptionkey;
00371
00372 public int maxpolyphony;
00373
00374 public int userdata;
00375
00376 public FMOD_SOUND_TYPE suggestedsoundtype;
00377
00378 public int useropen;
00379
00380 public int userclose;
00381
00382 public int userread;
00383
00384 public int userseek;
00385
00386 public FMOD_SPEAKERMAPTYPE speakermap;
00387
00388 public int initialsoundgroup;
00389
00390 public int initialseekposition;
00391
00392 public FMOD_TIMEUNIT initialseekpostype;
00393
00394 public int ignoresetfilesystem;
00395 }
00396 public void FadeInAndPlay()
00397 {
00398 float timer = 0.5;
00399 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.channel, 0);
00400 this.Play();
00401 while (timer <= 100) {
00402 timer += 6E-05;
00403 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.channel, timer / 100);
00404 }
00405
00406
00407 }
00408 public void FadeOutAndStop()
00409 {
00410 float timer = 0.5;
00411 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.channel, 1);
00412
00413 while (timer <= 100) {
00414 timer += 6E-05;
00415 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.channel, 1 - timer / 100);
00416 }
00417 this.stop_();
00418
00419 }
00420 public Music(System.Object Path)
00421 {
00422 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateStream(SoundsSharp.SoundSystem, Path, FMOD_MODE.FMOD_LOOP_NORMAL, ref ID);
00423 }
00424 public void Play()
00425 {
00426 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_PlaySound(SoundsSharp.SoundSystem, FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, this.ID, 0, ref channel);
00427 }
00428 public void stop_()
00429 {
00430 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_Stop(this.channel);
00431 }
00432 public void pause()
00433 {
00434 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetPaused(channel, 1);
00435 }
00436 public void InitChannel()
00437 {
00438 Play();
00439 stop_();
00440 }
00441 public void Pitch(float value)
00442 {
00443
00444
00445
00446 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetFrequency(this.channel, 22050 * value);
00447 }
00448 public float Volume {
00449 get {
00450 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetVolume(this.channel, ref this.volume_);
00451 return Volume;
00452 }
00453 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetVolume(this.channel, this.volume_); }
00454 }
00455 private float delayst;
00456 private float delay_end;
00457 public float delayStart {
00458 get {
00459 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetDelay(this.channel, ref delayst, ref delay_end);
00460 return delayst;
00461 }
00462 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetDelay(this.channel, value, delay_end); }
00463 }
00464 public float delayEnd {
00465 get {
00466 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_GetDelay(this.channel, ref delayst, ref delay_end);
00467 return delay_end;
00468 }
00469 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Channel_SetDelay(this.channel, delayst, value); }
00470 }
00471
00472 }
00473 #endregion
00474
00475 #region "Reverb"
00476 public class Reverb
00477 {
00478 private long ID;
00479 private FMOD_REVERB_PROPERTIES properties_;
00480 private Vector pos;
00481 float minD;
00482 float maxD;
00483 private actif;
00484 public void Activate()
00485 {
00486 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_SetActive(ID, actif);
00487 }
00488 public void Desactivate()
00489 {
00490 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_Release(ID);
00491 }
00492 public Vector Position {
00493 get { return pos; }
00494 set {
00495 pos = value;
00496 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_Set3DAttributes(ID, ref value, minD, maxD);
00497 }
00498 }
00499 public float MaxDistance {
00500 get { return maxD; }
00501 set {
00502 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_Set3DAttributes(ID, ref pos, minD, value);
00503 maxD = value;
00504 }
00505 }
00506 public float MinDistance {
00507 get { return minD; }
00508 set {
00509 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_Set3DAttributes(ID, ref pos, value, maxD);
00510 minD = value;
00511 }
00512 }
00513 public FMOD_REVERB_PROPERTIES properties {
00514
00515 get {
00516 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_GetProperties(ID, ref properties_);
00517 return properties_;
00518 }
00519 set { SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_Reverb_SetProperties(ID, ref properties_); }
00520 }
00521 public Reverb(Vector Position)
00522 {
00523 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateReverb(SoundsSharp.SoundSystem, ref ID);
00524 this.Position = Position;
00525 }
00526 public Reverb()
00527 {
00528 SoundsSharpNameSpace.fmodex.fmodexvb.FMOD_System_CreateReverb(SoundsSharp.SoundSystem, ref ID);
00529 }
00530 }
00531 #endregion
00532 #region "Reverb Presets"
00533
00534 public static FMOD_REVERB_PROPERTIES getPreset(System.Object instance, System.Object environement, float envsize, float envDiff, System.Object Room, System.Object RoomHF, System.Object RoomLF, float decaytime, System.Object DecayHF, System.Object DecayLf,
00535 long refs, float refdelay, Vector reflectionPan, System.Object reverb, float reverbdelay, Vector reverbPan, float echoTime, float echoDepth, float modulationtime, float modulatiodepth,
00536
00537 float airabsorp, float HFref, float LFref, float RoomRollOff, float Diff, float Density, int Flags)
00538 {
00539 float[] reverbpan_ = { reverbPan.X, reverbPan.Y, reverbPan.Z };
00540 float[] refpan_ = { reflectionPan.X, reflectionPan.Y, reflectionPan.Z };
00541
00542 FMOD_REVERB_PROPERTIES X = default(FMOD_REVERB_PROPERTIES);
00543 X.Instance = instance;
00544 X.Environment = environement;
00545 X.EnvSize = envsize;
00546 X.EnvDiffusion = envDiff;
00547 X.Room = Room;
00548 X.RoomHF = RoomHF;
00549 X.RoomLF = RoomLF;
00550 X.DecayTime = decaytime;
00551 X.DecayHFRatio = DecayHF;
00552 X.DecayLFRatio = DecayLf;
00553 X.Reflections = refs;
00554 X.ReflectionsDelay = refdelay;
00555 X.ReflectionsPan = refpan_;
00556 X.reverb = reverb;
00557 X.ReverbDelay = reverbdelay;
00558 X.ReverbPan = reverbpan_;
00559 X.EchoTime = echoTime;
00560 X.EchoDepth = echoDepth;
00561 X.ModulationTime = modulationtime;
00562 X.ModulationDepth = modulatiodepth;
00563 X.AirAbsorptionHF = airabsorp;
00564 X.HFReference = HFref;
00565 X.LFReference = LFref;
00566 X.RoomRolloffFactor = RoomRollOff;
00567 X.Diffusion = Diff;
00568 X.Density = Density;
00569 X.Flags = Flags;
00570
00571 return X;
00572
00573
00574 }
00575
00576 static VECTOR NullVector;
00577
00578
00579 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_GENERIC = getPreset(0, 0, 7.5f, 1f, -1000, -100, 0, 1.49f, 0.83f, 1f,
00580 -2602, 0.007f, NullVector, 200, 0.011f, NullVector, 0.25f, 0f, 0.25f, 0f,
00581 -5f, 5000f, 250f, 0f, 100f, 100f, 0x33f);
00582 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PADDEDCELL = getPreset(0, 1, 1.4f, 1f, -1000, -6000, 0, 0.17f, 0.1f, 1f,
00583 -1204, 0.001f, NullVector, 207, 0.002f, NullVector, 0.25f, 0f, 0.25f, 0f,
00584 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00585 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_ROOM = getPreset(0, 2, 1.9f, 1f, -1000, -454, 0, 0.4f, 0.83f, 1f,
00586 -1646, 0.002f, NullVector, 53, 0.003f, NullVector, 0.25f, 0f, 0.25f, 0f,
00587 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00588 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_BATHROOM = getPreset(0, 3, 1.4f, 1f, -1000, -1200, 0, 1.49f, 0.54f, 1f,
00589 -370, 0.007f, NullVector, 1030, 0.011f, NullVector, 0.25f, 0f, 0.25f, 0f,
00590 -5f, 5000f, 250f, 0f, 100f, 60f, 0x3f);
00591 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_LIVINGROOM = getPreset(0, 4, 2.5f, 1f, -1000, -6000, 0, 0.5f, 0.1f, 1f,
00592 -1376, 0.003f, NullVector, -1104, 0.004f, NullVector, 0.25f, 0f, 0.25f, 0f,
00593 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00594 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_STONEROOM = getPreset(0, 5, 11.6f, 1f, -1000, -300, 0, 2.31f, 0.64f, 1f,
00595 -711, 0.012f, NullVector, 83, 0.017f, NullVector, 0.25f, 0f, 0.25f, 0f,
00596 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00597 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_AUDITORIUM = getPreset(0, 6, 21.6f, 1f, -1000, -476, 0, 4.32f, 0.59f, 1f,
00598 -789, 0.02f, NullVector, -289, 0.03f, NullVector, 0.25f, 0f, 0.25f, 0f,
00599 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00600 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_CONCERTHALL = getPreset(0, 7, 19.6f, 1f, -1000, -500, 0, 3.92f, 0.7f, 1f,
00601 -1230, 0.02f, NullVector, -2, 0.029f, NullVector, 0.25f, 0f, 0.25f, 0f,
00602 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00603 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_CAVE = getPreset(0, 8, 14.6f, 1f, -1000, 0, 0, 2.91f, 1.3f, 1f,
00604 -602, 0.015f, NullVector, -302, 0.022f, NullVector, 0.25f, 0f, 0.25f, 0f,
00605 -5f, 5000f, 250f, 0f, 100f, 100f, 0x1f);
00606 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_ARENA = getPreset(0, 9, 36.2f, 1f, -1000, -698, 0, 7.24f, 0.33f, 1f,
00607 -1166, 0.02f, NullVector, 16, 0.03f, NullVector, 0.25f, 0f, 0.25f, 0f,
00608 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00609 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_HANGAR = getPreset(0, 10, 50.3f, 1f, -1000, -1000, 0, 10.05f, 0.23f, 1f,
00610 -602, 0.02f, NullVector, 198, 0.03f, NullVector, 0.25f, 0f, 0.25f, 0f,
00611 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00612 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_CARPETTEDHALLWAY = getPreset(0, 11, 1.9f, 1f, -1000, -4000, 0, 0.3f, 0.1f, 1f,
00613 -1831, 0.002f, NullVector, -1630, 0.03f, NullVector, 0.25f, 0f, 0.25f, 0f,
00614 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00615 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_HALLWAY = getPreset(0, 12, 1.8f, 1f, -1000, -300, 0, 1.49f, 0.59f, 1f,
00616 -1219, 0.007f, NullVector, 441, 0.011f, NullVector, 0.25f, 0f, 0.25f, 0f,
00617 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00618 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_STONECORRIDOR = getPreset(0, 13, 13.5f, 1f, -1000, -237, 0, 2.7f, 0.79f, 1f,
00619 -1214, 0.013f, NullVector, 395, 0.02f, NullVector, 0.25f, 0f, 0.25f, 0f,
00620 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00621 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_ALLEY = getPreset(0, 14, 7.5f, 0.3f, -1000, -270, 0, 1.49f, 0.86f, 1f,
00622 -1204, 0.007f, NullVector, -4, 0.011f, NullVector, 0.125f, 0.95f, 0.25f, 0f,
00623 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00624 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_FOREST = getPreset(0, 15, 38f, 0.3f, -1000, -3300, 0, 1.49f, 0.54f, 1f,
00625 -2560, 0.162f, NullVector, -229, 0.088f, NullVector, 0.125f, 1f, 0.25f, 0f,
00626 -5f, 5000f, 250f, 0f, 79f, 100f, 0x3f);
00627 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_CITY = getPreset(0, 16, 7.5f, 0.5f, -1000, -800, 0, 1.49f, 0.67f, 1f,
00628 -2273, 0.007f, NullVector, -1691, 0.011f, NullVector, 0.25f, 0f, 0.25f, 0f,
00629 -5f, 5000f, 250f, 0f, 50f, 100f, 0x3f);
00630 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_MOUNTAINS = getPreset(0, 17, 100f, 0.27f, -1000, -2500, 0, 1.49f, 0.21f, 1f,
00631 -2780, 0.3f, NullVector, -1434, 0.1f, NullVector, 0.25f, 1f, 0.25f, 0f,
00632 -5f, 5000f, 250f, 0f, 27f, 100f, 0x1f);
00633 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_QUARRY = getPreset(0, 18, 17.5f, 1f, -1000, -1000, 0, 1.49f, 0.83f, 1f,
00634 -10000, 0.061f, NullVector, 500, 0.025f, NullVector, 0.125f, 0.7f, 0.25f, 0f,
00635 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00636 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PLAIN = getPreset(0, 19, 42.5f, 0.21f, -1000, -2000, 0, 1.49f, 0.5f, 1f,
00637 -2466, 0.179f, NullVector, -1926, 0.1f, NullVector, 0.25f, 1f, 0.25f, 0f,
00638 -5f, 5000f, 250f, 0f, 21f, 100f, 0x3f);
00639 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PARKINGLOT = getPreset(0, 20, 8.3f, 1f, -1000, 0, 0, 1.65f, 1.5f, 1f,
00640 -1363, 0.008f, NullVector, -1153, 0.012f, NullVector, 0.25f, 0f, 0.25f, 0f,
00641 -5f, 5000f, 250f, 0f, 100f, 100f, 0x1f);
00642 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_SEWERPIPE = getPreset(0, 21, 1.7f, 0.8f, -1000, -1000, 0, 2.81f, 0.14f, 1f,
00643 429, 0.014f, NullVector, 1023, 0.021f, NullVector, 0.25f, 0f, 0.25f, 0f,
00644 -5f, 5000f, 250f, 0f, 80f, 60f, 0x3f);
00645 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_UNDERWATER = getPreset(0, 22, 1.8f, 1f, -1000, -4000, 0, 1.49f, 0.1f, 1f,
00646 -449, 0.007f, NullVector, 1700, 0.011f, NullVector, 0.25f, 0f, 1.18f, 0.348f,
00647 -5f, 5000f, 250f, 0f, 100f, 100f, 0x3f);
00648 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_DRUGGED = getPreset(0, 23, 1.9f, 0.5f, -1000, 0, 0, 8.39f, 1.39f, 1f,
00649 -115, 0.002f, NullVector, 985, 0.03f, NullVector, 0.25f, 0f, 0.25f, 1f,
00650 -5f, 5000f, 250f, 0f, 100f, 100f, 0x1f);
00651 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_DIZZY = getPreset(0, 24, 1.8f, 0.6f, -1000, -400, 0, 17.23f, 0.56f, 1f,
00652 -1713, 0.02f, NullVector, -613, 0.03f, NullVector, 0.25f, 1f, 0.81f, 0.31f,
00653 -5f, 5000f, 250f, 0f, 100f, 100f, 0x1f);
00654 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PSYCHOTIC = getPreset(0, 25, 1f, 0.5f, -1000, -151, 0, 7.56f, 0.91f, 1f,
00655 -626, 0.02f, NullVector, 774, 0.03f, NullVector, 0.25f, 0f, 4f, 1f,
00656 -5f, 5000f, 250f, 0f, 100f, 100f, 0x1f);
00657 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_ROOM = getPreset(0, 1, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00658 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00659 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00660 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_STUDIO_A = getPreset(0, 2, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00661 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00662 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00663 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_STUDIO_B = getPreset(0, 3, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00664 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00665 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00666 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_STUDIO_C = getPreset(0, 4, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00667 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00668 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00669 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_HALL = getPreset(0, 5, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00670 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00671 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00672 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_SPACE = getPreset(0, 6, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00673 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00674 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00675 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_ECHO = getPreset(0, 7, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00676 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0.75f, 0f, 0f,
00677 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00678 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_DELAY = getPreset(0, 8, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00679 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00680 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00681 public static FMOD_REVERB_PROPERTIES REVERB_PRESET_PS2_PIPE = getPreset(0, 9, 0, 0, 0, 0, 0, 0f, 0f, 0f,
00682 0, 0f, NullVector, 0, 0f, NullVector, 0.25f, 0f, 0f, 0f,
00683 #endregion
00684 0f, 0f, 0f, 0f, 0f, 0f, 0x31f);
00685 #region "Useful/Useless"
00686 public class tools
00687 {
00688 public static float DegToRad(float degree)
00689 {
00690 return degree / 180;
00691 }
00692 public static float RadToDeg(float rad)
00693 {
00694 return rad * 180;
00695 }
00696 public static float twoDtoRad(Vector vecXY)
00697 {
00698 return Math.Atan(vecXY.Y / vecXY.X);
00699 }
00700 public static Vector RadtoTwoD(float rad)
00701 {
00702 Vector functionReturnValue = default(Vector);
00703 functionReturnValue.X = 1;
00704 functionReturnValue.Z = 0;
00705 functionReturnValue.Y = Math.Tan(rad);
00706 return functionReturnValue;
00707 return functionReturnValue;
00708 }
00709 }
00710 #endregion
00711
00712
00713 }
00714 }
00715