rfmod/enums.rs
1/*
2* Rust-FMOD - Copyright (c) 2014 Gomez Guillaume.
3*
4* The Original software, FmodEx library, is provided by FIRELIGHT TECHNOLOGIES.
5*
6* This software is provided 'as-is', without any express or implied warranty.
7* In no event will the authors be held liable for any damages arising from
8* the use of this software.
9*
10* Permission is granted to anyone to use this software for any purpose,
11* including commercial applications, and to alter it and redistribute it
12* freely, subject to the following restrictions:
13*
14* 1. The origin of this software must not be misrepresented; you must not claim
15* that you wrote the original software. If you use this software in a product,
16* an acknowledgment in the product documentation would be appreciated but is
17* not required.
18*
19* 2. Altered source versions must be plainly marked as such, and must not be
20* misrepresented as being the original software.
21*
22* 3. This notice may not be removed or altered from any source distribution.
23*/
24
25use std::fmt;
26
27#[derive(Clone, PartialEq, PartialOrd, Debug)]
28pub enum RStatus {
29 Other(String),
30 FMOD(Status),
31}
32
33impl fmt::Display for RStatus {
34 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
35 match *self {
36 RStatus::Other(ref s) => write!(f, "Other: {}", s),
37 RStatus::FMOD(ref s) => write!(f, "FMOD: {:?}", s),
38 }
39 }
40}
41
42#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
43#[repr(C)]
44/// Error codes. Returned from every function.
45pub enum Status {
46 /// No errors.
47 Ok,
48 /// Tried to call lock a second time before unlock was called.
49 AlreadyLocked,
50 /// Tried to call a function on a data type that does not allow this type of functionality (ie
51 /// calling Sound::lock on a streaming sound).
52 BadCommand,
53 /// Neither NTSCSI nor ASPI could be initialised.
54 CDDADrivers,
55 /// An error occurred while initialising the CDDA subsystem.
56 CDDAInit,
57 /// Couldn't find the specified device.
58 CDDAInvalidDevice,
59 /// No audio tracks on the specified disc.
60 CDDANoAudio,
61 /// No CD/DVD devices were found.
62 CDDANoDevices,
63 /// No disc present in the specified drive.
64 CDDANoDisc,
65 /// A CDDA read error occurred.
66 CDDARead,
67 /// Error trying to allocate a channel.
68 ChannelAlloc,
69 /// The specified channel has been reused to play another sound.
70 ChannelStolen,
71 /// A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed
72 /// meaning a Windows codec or driver was not installed properly.
73 COM,
74 /// DMA Failure. See debug output for more information.
75 DMA,
76 /// DSP connection error. Connection possibly caused a cyclic dependancy. Or tried to connect a
77 /// tree too many units deep (more than 128).
78 DSPConnection,
79 /// DSP Format error. A DSP unit may have attempted to connect to this network with the wrong
80 /// format.
81 DSPFormat,
82 /// DSP connection error. Couldn't find the DSP unit specified.
83 DSPNotFound,
84 /// DSP error. Cannot perform this operation while the network is in the middle of running. This
85 /// will most likely happen if a connection or disconnection is attempted in a DSP callback.
86 DSPRunning,
87 /// DSP connection error. The unit being connected to or disconnected should only have 1 input
88 /// or output.
89 DSPTooManyConnections,
90 /// Error loading file.
91 FileBad,
92 /// Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the
93 /// file format.
94 FileCouldNotSeek,
95 /// Media was ejected while reading.
96 FileDiskEjected,
97 /// End of file unexpectedly reached while trying to read essential data (truncated data ?).
98 FileEOF,
99 /// File not found.
100 FileNotFound,
101 /// Unwanted file access occured.
102 FileUnwanted,
103 /// Unsupported file or audio format.
104 Format,
105 /// A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.
106 HTTP,
107 /// The specified resource requires authentication or is forbidden.
108 HTTPAccess,
109 /// Proxy authentication is required to access the specified resource.
110 HTTPProxyAuth,
111 /// A HTTP server error occurred.
112 HTTPServerError,
113 /// The HTTP request timed out.
114 HTTPTimeout,
115 /// FMOD was not initialized correctly to support this function.
116 Initialization,
117 /// Cannot call this command after System::init.
118 Initialized,
119 /// An error occured that wasn't supposed to. Contact support.
120 Internal,
121 /// On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with
122 /// XPhysicalAlloc.)
123 InvalidAddress,
124 /// Value passed in was a NaN, Inf or denormalized float.
125 InvalidFloat,
126 /// An invalid object handle was used.
127 InvalidHandle,
128 /// An invalid parameter was passed to this function.
129 InvalidParam,
130 /// An invalid seek position was passed to this function.
131 InvalidPosition,
132 /// An invalid speaker was passed to this function based on the current speaker mode.
133 InvalidSpeaker,
134 /// The syncpoint did not come from this sound handle.
135 InvalidSyncPoint,
136 /// The vectors passed in are not unit length, or perpendicular.
137 InvalidVector,
138 /// Reached maximum audible playback count for this sound's soundgroup.
139 MaxAudible,
140 /// Not enough memory or resources.
141 Memory,
142 /// Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if
143 /// FMOD_CREATECOMPRESSEDSAMPLE was used.
144 MemoryCantPoint,
145 /// Not enough memory or resources on console sound ram.
146 MemorySRAM,
147 /// Tried to call a command on a 3d sound when the command was meant for 2d sound.
148 Needs2D,
149 /// Tried to call a command on a 2d sound when the command was meant for 3d sound.
150 Needs3D,
151 /// Tried to use a feature that requires hardware support. (ie trying to play a GCADPCM
152 /// compressed sound in software on Wii).
153 NeedsHardware,
154 /// Tried to use a feature that requires the software engine. Software engine has either been
155 /// turned off, or command was executed on a hardware channel which does not support this
156 /// feature.
157 NeedsSoftware,
158 /// Couldn't connect to the specified host.
159 NetConnect,
160 /// A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.
161 NetSocketError,
162 /// The specified URL couldn't be resolved.
163 NetURL,
164 /// Operation on a non-blocking socket could not complete immediately.
165 NetWouldBlock,
166 /// Operation could not be performed because specified sound/DSP connection is not ready.
167 NotReady,
168 /// Error initializing output device, but more specifically, the output device is already in
169 /// use and cannot be reused.
170 OutputAllocated,
171 /// Error creating hardware sound buffer.
172 OutputCreateBuffer,
173 /// A call to a standard soundcard driver failed, which could possibly mean a bug in the driver
174 /// or resources were missing or exhausted.
175 OutputDriverCall,
176 /// Error enumerating the available driver list. List may be inconsistent due to a recent device
177 /// addition or removal.
178 OutputEnumeration,
179 /// Soundcard does not support the minimum features needed for this soundsystem (16bit stereo
180 /// output).
181 OutputFormat,
182 /// Error initializing output device.
183 OutputInit,
184 /// FMOD_HARDWARE was specified but the sound card does not have the resources necessary to play
185 /// it.
186 OutputNoHardware,
187 /// Attempted to create a software sound but no software channels were specified in
188 /// System::init.
189 OutputNoSoftware,
190 /// Panning only works with mono or stereo sound sources.
191 Pan,
192 /// An unspecified error has been returned from a 3rd party plugin.
193 Plugin,
194 /// The number of allowed instances of a plugin has been exceeded.
195 PluginInstances,
196 /// A requested output, dsp unit type or codec was not available.
197 PluginMissing,
198 /// A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback or
199 /// other DLLs that it needs to load)
200 PluginResource,
201 /// The specified sound is still in use by the event system, call EventSystem::unloadFSB before
202 /// trying to release it.
203 Preloaded,
204 /// The specified sound is still in use by the event system, wait for the event which is using
205 /// it finish with it.
206 ProgrammerSound,
207 /// An error occured trying to initialize the recording device.
208 Record,
209 /// Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an
210 /// invalid instance number or the reverb doesnt exist.
211 ReverbInstance,
212 /// This subsound is already being used by another sound, you cannot have more than one parent
213 /// to a sound. Null out the other parent's entry first.
214 SubsoundAllocated,
215 /// Shared subsounds cannot be replaced or moved from their parent stream, such as when the
216 /// parent stream is an FSB file.
217 SubsoundCantMove,
218 /// The subsound's mode bits do not match with the parent sound's mode bits. See documentation
219 /// for function that it was called with.
220 SubsoundMode,
221 /// The error occured because the sound referenced contains subsounds when it shouldn't have, or
222 /// it doesn't contain subsounds when it should have. The operation may also not be able to be
223 /// performed on a parent sound, or a parent sound was played without setting up a sentence
224 /// first.
225 Subsounds,
226 /// The specified tag could not be found or there are no tags.
227 TagNotFound,
228 /// The sound created exceeds the allowable input channel count. This can be increased using the
229 /// maxinputchannels parameter in System::setSoftwareFormat.
230 TooManyChannels,
231 /// Something in FMOD hasn't been implemented when it should be ! contact support !
232 Unimplemented,
233 /// This command failed because System::init or System::setDriver was not called.
234 Uninitialized,
235 /// A command issued was not supported by this object. Possibly a plugin without certain
236 /// callbacks specified.
237 Unsupported,
238 /// An error caused by System::update occured.
239 Update,
240 /// The version number of this file format is not supported.
241 Version,
242 /// An Event failed to be retrieved, most likely due to 'just fail' being specified as the max
243 /// playbacks behavior.
244 EventFailed,
245 /// Can't execute this command on an EVENT_INFOONLY event.
246 EventInfoOnly,
247 /// An error occured that wasn't supposed to. See debug log for reason.
248 EventInternal,
249 /// Event failed because 'Max streams' was hit when FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS was
250 /// specified.
251 EventMaxStreams,
252 /// FSB mismatches the FEV it was compiled with, the stream/sample mode it was meant to be
253 /// created with was different, or the FEV was built for a different platform.
254 EventMismatch,
255 /// A category with the same name already exists.
256 EventNameConflict,
257 /// The requested event, event group, event category or event property could not be found.
258 EventNotFound,
259 /// Tried to call a function on a complex event that's only supported by simple events.
260 EventNeedsSimple,
261 /// An event with the same GUID already exists.
262 EventGuidConflict,
263 /// The specified project or bank has already been loaded. Having multiple copies of the same
264 /// project loaded simultaneously is forbidden.
265 EventAlreadyLoaded,
266 /// Music system is not initialized probably because no music data is loaded.
267 MusicUninitialized,
268 /// The requested music entity could not be found.
269 MusicNotFound,
270 /// The music callback is required, but it has not been set.
271 MusicNoCallback,
272 /// Makes sure this enum is signed 32bit.
273 StatusForceInt = 65536,
274}
275
276#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
277#[repr(C)]
278/// When creating a multichannel sound, FMOD will pan them to their default speaker locations:
279/// * For example a 6 channel sound will default to one channel per 5.1 output speaker.
280/// * Another example is a stereo sound. It will default to left = front left, right = front right.
281/// * This is for sounds that are not 'default'. For example you might have a sound that is 6
282/// channels but actually made up of 3 stereo pairs, that should all be located in front left,
283/// front right only.
284pub enum SpeakerMapType {
285 /// This is the default, and just means FMOD decides which speakers it puts the source channels.
286 Default,
287 /// This means the sound is made up of all mono sounds. All voices will be panned to the front
288 /// center by default in this case.
289 AllMono,
290 /// This means the sound is made up of all stereo sounds. All voices will be panned to front
291 /// left and front right alternating every second channel.
292 AllStereo,
293 /// Map a 5.1 sound to use protools L C R Ls Rs LFE mapping. Will return an error if not a 6
294 /// channel sound.
295 _51ProTools,
296}
297
298#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
299#[repr(C)]
300/// These definitions describe the native format of the hardware or software buffer that will be used.
301pub enum SoundFormat {
302 /// Uninitialized / unknown.
303 None,
304 /// 8bit integer PCM data.
305 PCM8,
306 /// 16bit integer PCM data.
307 PCM16,
308 /// 24bit integer PCM data.
309 PCM24,
310 /// 32bit integer PCM data.
311 PCM32,
312 /// 32bit floating point PCM data.
313 PCMFloat,
314 /// Compressed Nintendo 3DS/Wii DSP data.
315 GCADPCM,
316 /// Compressed IMA ADPCM data.
317 IMAADPCM,
318 /// Compressed PlayStation Portable ADPCM data.
319 VAG,
320 /// Compressed PSVita ADPCM data.
321 HEVAG,
322 /// Compressed Xbox360 XMA data.
323 XMA,
324 /// Compressed MPEG layer 2 or 3 data.
325 MPEG,
326 /// Compressed CELT data.
327 CELT,
328 /// Compressed PSVita ATRAC9 data.
329 AT9,
330 /// Compressed Xbox360 xWMA data.
331 XWMA,
332 /// Compressed Vorbis data.
333 VORBIS,
334 /// Maximum number of sound formats supported.
335 Max,
336 /// Makes sure this enum is signed 32bit.
337 ForceInt = 65536,
338}
339
340#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
341#[repr(C)]
342/// These definitions describe the type of song being played.
343pub enum SoundType {
344 /// 3rd party / unknown plugin format.
345 Unknown,
346 /// AIFF.
347 AIFF,
348 /// Microsoft Advanced Systems Format (ie WMA/ASF/WMV).
349 ASF,
350 /// Sony ATRAC 3 format
351 AT3,
352 /// Digital CD audio.
353 CDDA,
354 /// Sound font / downloadable sound bank.
355 DLS,
356 /// FLAC lossless codec.
357 FLAC,
358 /// FMOD Sample Bank.
359 FSB,
360 /// Nintendo GameCube/Wii ADPCM
361 GCADPCM,
362 /// Impulse Tracker.
363 IT,
364 /// MIDI. extracodecdata is a pointer to an FMOD_MIDI_EXTRACODECDATA structure.
365 MIDI,
366 /// Protracker / Fasttracker MOD.
367 MOD,
368 /// MP2/MP3 MPEG.
369 MPEG,
370 /// Ogg vorbis.
371 OGGVORBIS,
372 /// Information only from ASX/PLS/M3U/WAX playlists
373 Playlist,
374 /// Raw PCM data.
375 Raw,
376 /// ScreamTracker 3.
377 S3M,
378 /// Sound font 2 format.
379 SF2,
380 /// User created sound.
381 User,
382 /// Microsoft WAV.
383 WAV,
384 /// FastTracker 2 XM.
385 XM,
386 /// Xbox360 XMA
387 XMA,
388 /// PlayStation Portable ADPCM VAG format.
389 VAG,
390 /// iPhone hardware decoder, supports AAC, ALAC and MP3. extracodecdata is a pointer to an
391 /// FMOD_AUDIOQUEUE_EXTRACODECDATA structure.
392 AudioQueue,
393 /// Xbox360 XWMA
394 XWMA,
395 /// 3DS BCWAV container format for DSP ADPCM and PCM
396 BCWAV,
397 /// NGP ATRAC 9 format
398 AT9,
399 /// Raw vorbis
400 VORBIS,
401 /// Microsoft Media Foundation wrappers, supports ASF/WMA
402 MediaFoundation,
403 /// Maximum number of sound types supported.
404 Max,
405 /// Makes sure this enum is signed 32bit.
406 ForceInt = 65536,
407}
408
409#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
410#[repr(C)]
411/// List of tag types that could be stored within a sound. These include id3 tags, metadata from
412/// netstreams and vorbis/asf data.
413pub enum TagType {
414 Unknown = 0,
415 ID3V1,
416 ID3V2,
417 VORBISComment,
418 ShoutCast,
419 IceCast,
420 ASF,
421 MIDI,
422 Playlist,
423 Fmod,
424 User,
425
426 /// Maximum number of tag types supported.
427 Max,
428 /// Makes sure this enum is signed 32bit.
429 ForceInt = 65536,
430}
431
432#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
433#[repr(C)]
434/// List of data types that can be returned by
435/// [`Sound::get_tag`](../../struct.Sound.html#method.get_tag)
436pub enum TagDataType {
437 Binary = 0,
438 Int,
439 Float,
440 String,
441 StringUTF16,
442 StringUTF16BE,
443 StringUTF8,
444 CDTOC,
445 /// Maximum number of tag datatypes supported.
446 Max,
447 /// Makes sure this enum is signed 32bit.
448 ForceInt = 65536,
449}
450
451#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
452#[repr(C)]
453/// Special channel index values for FMOD functions.
454pub enum ChannelIndex {
455 /// For a channel index, FMOD chooses a free voice using the priority system.
456 Free = -1,
457 /// For a channel index, re-use the channel handle that was passed in.
458 ReUse = -2,
459}
460
461#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
462#[repr(C)]
463/// List of windowing methods used in spectrum analysis to reduce leakage / transient signals
464/// intefering with the analysis. This is a problem with analysis of continuous signals that only
465/// have a small portion of the signal sample (the fft window size). Windowing the signal with a
466/// curve or triangle tapers the sides of the fft window to help alleviate this problem.
467pub enum DspFftWindow {
468 /// w[n] = 1.0
469 Rect,
470 /// w[n] = TRI(2n/N)
471 Triangle,
472 /// w[n] = 0.54 - (0.46 * COS(n/N) )
473 Hamming,
474 /// w[n] = 0.5 * (1.0 - COS(n/N) )
475 Hanning,
476 /// w[n] = 0.42 - (0.5 * COS(n/N) ) + (0.08 * COS(2.0 * n/N) )
477 BlackMan,
478 /// w[n] = 0.35875 - (0.48829 * COS(1.0 * n/N)) + (0.14128 * COS(2.0 * n/N)) - (0.01168 *
479 /// COS(3.0 * n/N))
480 BlackManHarris,
481 /// Maximum number of FFT window types supported.
482 Max,
483 /// Makes sure this enum is signed 32bit.
484 ForceInt = 65536,
485}
486
487#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
488#[repr(C)]
489/// Types of delay that can be used with
490/// [`Channel::set_delay`](../../struct.Channel.html#method.set_delay) /
491/// [`Channel::get_delay`](../../struct.Channel.html#method.get_delay).
492pub enum DelayType {
493 /// Delay at the end of the sound in milliseconds. Use delayhi only.
494 /// [`Channel::is_playing`](../../struct.Channel.html#method.is_playing) will remain true until
495 /// this delay has passed even though the sound itself has stopped playing.
496 EndMS,
497 /// Time the sound started if [`Channel::get_delay`](../../struct.Channel.html#method.get_delay)
498 /// is used, or if [`Channel::set_delay`](../../struct.Channel.html#method.set_delay) is used,
499 /// the sound will delay playing until this exact tick.
500 DSPClockStart,
501 /// Time the sound should end. If this is non-zero, the channel will go silent at this exact
502 /// tick.
503 DSPClockEnd,
504 /// Time the sound should pause. If this is non-zero, the channel will pause at this exact tick.
505 DSPClockPause,
506 /// Maximum number of tag datatypes supported.
507 Max,
508 /// Makes sure this enum is signed 32bit.
509 ForceInt = 65536,
510}
511
512#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
513#[repr(C)]
514/// These output types are used with [`Sys::set_output`](../../struct.Sys.html#method.set_output) /
515/// [`Sys::get_output`](../../struct.Sys.html#method.get_output), to choose which output method to use.
516pub enum OutputType {
517 /// Picks the best output mode for the platform. This is the default.
518 AutoDetect,
519 /// All - 3rd party plugin, unknown. This is for use with
520 /// [`Sys::get_output`](../../struct.Sys.html#method.get_output) only.
521 Unknown,
522 /// All - All calls in this mode succeed but make no sound.
523 NoSound,
524 /// All - Writes output to fmodoutput.wav by default. Use the 'extradriverdata'
525 /// parameter in [`Sys::init`](../../struct.Sys.html#method.init), by simply passing the
526 /// filename as a string, to set the wav filename.
527 WAVWriter,
528 /// All - Non-realtime version of FMOD_OUTPUTYPE_NOSOUND. User can drive mixer with
529 /// [`Sys::update`](../../struct.Sys.html#method.update) at whatever rate they want.
530 NoSoundNRT,
531 /// All - Non-realtime version of FMOD_OUTPUTYPE_WAVWRITER. User can drive mixer
532 /// with [`Sys::update`](../../struct.Sys.html#method.update) at whatever rate they want.
533 WAVWriterNRT,
534 /// Win32/Win64 - DirectSound output. (Default on Windows XP and below)
535 DSound,
536 /// Win32/Win64 - Windows Multimedia output.
537 WinMM,
538 /// Win32 - Windows Audio Session API. (Default on Windows Vista and
539 /// above)
540 WASAPI,
541 /// Win32 - Low latency ASIO 2.0 driver.
542 ASIO,
543 /// Linux/Linux64 - Open Sound System output. (Default on Linux, third
544 /// preference)
545 OSS,
546 /// Linux/Linux64 - Advanced Linux Sound Architecture output. (Default on Linux, second
547 /// preference if available)
548 ALSA,
549 /// Linux/Linux64 - Enlightment Sound Daemon output.
550 ESD,
551 /// Linux/Linux64 - PulseAudio output. (Default on Linux, first
552 /// preference if available)
553 PulseAudio,
554 /// Mac - Macintosh CoreAudio output. (Default on Mac)
555 CoreAudio,
556 /// Xbox 360 - Native Xbox360 output. (Default on Xbox 360)
557 Xbox360,
558 /// PSP - Native PSP output. (Default on PSP)
559 PSP,
560 /// PS3 - Native PS3 output. (Default on PS3)
561 PS3,
562 /// NGP - Native NGP output. (Default on NGP)
563 NGP,
564 /// Wii - Native Wii output. (Default on Wii)
565 Wii,
566 /// 3DS - Native 3DS output (Default on 3DS)
567 _3DS,
568 /// Android - Java Audio Track output. (Default on Android 2.2 and below)
569 AudioTrack,
570 /// Android - OpenSL ES output. (Default on Android 2.3 and above)
571 OpenSL,
572 /// Native Client - Native Client output. (Default on Native Client)
573 NACL,
574 /// Wii U - Native Wii U output. (Default on Wii U)
575 WiiU,
576 /// BlackBerry - Native BlackBerry asound output. (Default on BlackBerry)
577 ASound,
578 /// Orbis - Audio Out output. (Default on Orbis)
579 AudioOut,
580 /// Durango - XAudio2 output.
581 XAudio,
582 /// Maximum number of output types supported.
583 Max,
584 /// Makes sure this enum is signed 32bit.
585 ForceInt = 65536,
586}
587
588#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
589#[repr(C)]
590// FIXME
591/// These are speaker types defined for use with the
592/// [`Channel::set_speaker_level`](../../struct.Channel.html#method.set_speaker_level) command. It
593/// can also be used for speaker placement in the
594/// [`Sys::set_3D_speaker_position`](../../struct.Sys.html#method.set_3D_speaker_position) command.
595pub enum Speaker {
596 FrontLeft,
597 FrontRight,
598 FrontCenter,
599 LowFrequency,
600 BackLeft,
601 BackRight,
602 SideLeft,
603 SideRight,
604 /// Maximum number of speaker types supported.
605 Max,
606 // For use with_MONO and Channel::SetSpeakerLevels. Mapped to same value asSpeaker_FRONT_LEFT.
607 //SpeakerMono = 0,
608 /// A non speaker. Use this with ASIO mapping to ignore a speaker.
609 Null = 65535,
610 // For use with_7POINT1 on PS3 where the extra speakers are surround back inside of side
611 // speakers.
612 //SpeakerSBL = 6,
613 // For use with_7POINT1 on PS3 where the extra speakers are surround back inside of side
614 // speakers.
615 //SpeakerSBR = 7,
616 /// Makes sure this enum is signed 32bit.
617 ForceInt = 65536,
618}
619
620#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
621#[repr(C)]
622/// These are speaker types defined for use with the
623/// [`Sys::set_speaker_mode`](../../struct.Sys.html#method.set_speaker_mode) or
624/// [`Sys::get_speaker_mode`](../../struct.Sys.html#method.get_speaker_mode) command.
625pub enum SpeakerMode {
626 /// There is no specific . Sound channels are mapped in order of input to output. Use
627 /// [`Sys::set_software_format`](../../struct.Sys.html#method.set_software_format) to specify
628 /// speaker count. See remarks for more information.
629 Raw,
630 /// The speakers are monaural.
631 Mono,
632 /// The speakers are stereo (DEFAULT).
633 Stereo,
634 /// 4 speaker setup. This includes front left, front right, rear left, rear right.
635 Quad,
636 /// 5 speaker setup. This includes front left, front right, center, rear left, rear right.
637 Surround,
638 /// 5.1 speaker setup. This includes front left, front right, center, rear left, rear right and
639 /// a subwoofer.
640 _5Point1,
641 /// 7.1 speaker setup. This includes front left, front right, center, rear left, rear right,
642 /// side left, side right and a subwoofer.
643 _7Point1,
644 /// Stereo compatible output, embedded with surround information. SRS 5.1/Prologic/Prologic2
645 /// decoders will split the signal into a 5.1 speaker set-up or SRS virtual surround will decode
646 /// into a 2-speaker/headphone setup. See remarks about limitations.
647 SRS5_1_Matrix,
648 /// Stereo compatible output, embedded with surround information. Dolby Pro Logic II decoders
649 /// will split the signal into a 5.1 speaker set-up.
650 DOLBY5_1_Matrix,
651 /// Stereo output, but data is encoded using personalized HRTF algorithms. See myears.net.au
652 MYears,
653 /// Maximum number of speaker modes supported.
654 Max,
655 /// Makes sure this enum is signed 32bit.
656 ForceInt = 65536,
657}
658
659#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
660#[repr(C)]
661/// List of interpolation types that the FMOD Ex software mixer supports.
662pub enum DspResampler {
663 /// No interpolation. High frequency aliasing hiss will be audible depending on the sample rate
664 /// of the sound.
665 NoInterp,
666 /// Linear interpolation (default method). Fast and good quality, causes very slight lowpass
667 /// effect on low frequency sounds.
668 Linear,
669 /// Cubic interpolation. Slower than linear interpolation but better quality.
670 Cubic,
671 /// 5 point spline interpolation. Slowest resampling method but best quality.
672 Spline,
673 /// Maximum number of resample methods supported.
674 Max,
675 /// Makes sure this enum is signed 32bit.
676 ForceInt = 65536,
677}
678
679#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
680#[repr(C)]
681/// These are plugin types defined for use with the
682/// [`Sys::get_num_plugins`](../../struct.Sys.html#method.get_num_plugins),
683/// [`Sys::get_plugin_info`](../../struct.Sys.html#method.get_plugin_info) and
684/// [`Sys::unload_plugin`](../../struct.Sys.html#method.unload_plugin) functions.
685pub enum PluginType {
686 /// The plugin type is an output module. FMOD mixed audio will play through one of these
687 /// devices.
688 Output,
689 /// The plugin type is a file format codec. FMOD will use these codecs to load file formats for
690 /// playback.
691 Codec,
692 /// The plugin type is a DSP unit. FMOD will use these plugins as part of its DSP network to
693 /// apply effects to output or generate sound in realtime.
694 DSP,
695 /// Maximum number of plugin types supported.
696 Max,
697 /// Makes sure this enum is signed 32bit.
698 ForceInt = 65536,
699}
700
701#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
702#[repr(C)]
703/// These values describe what state a sound is in after FMOD_NONBLOCKING has been used to open it.
704pub enum OpenState {
705 /// Opened and ready to play.
706 Ready = 0,
707 /// Initial load in progress.
708 Loading,
709 /// Failed to open - file not found, out of memory etc. See return value of
710 /// [`Sound::get_open_state`](../../struct.Sound.html#method.get_open_state) for what happened.
711 Error,
712 /// Connecting to remote host (internet sounds only).
713 Connecting,
714 /// Buffering data.
715 Buffering,
716 /// Seeking to subsound and re-flushing stream buffer.
717 Seeking,
718 /// Ready and playing, but not possible to release at this time without stalling the main
719 /// thread.
720 Playing,
721 /// Seeking within a stream to a different position.
722 SetPosition,
723 /// Maximum number of open state types.
724 Max,
725 /// Makes sure this enum is signed 32bit.
726 ForceInt = 65536,
727}
728
729#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
730#[repr(C)]
731/// These callback types are used with
732/// [`Channel::set_callback`](../../struct.Channel.html#method.set_callback).
733pub enum SystemCallbackType {
734 /// Called from [`Sys::update`](../../struct.Sys.html#method.update) when the enumerated list of
735 /// devices has changed.
736 DeviceListChanged,
737 /// Called from [`Sys::update`](../../struct.Sys.html#method.update) when an output device has
738 /// been lost due to control panel parameter changes and FMOD cannot automatically recover.
739 DeviceLost,
740 /// Called directly when a memory allocation fails somewhere in FMOD. (NOTE - 'system' will be
741 /// NULL in this callback type.)
742 MemoryAllocationFailed,
743 /// Called directly when a thread is created.
744 ThreadCreated,
745 /// Called when a bad connection was made with
746 /// [`Dsp::add_input`](../../struct.Dsp.html#method.add_input). Usually called from mixer thread
747 /// because that is where the connections are made.
748 BadDSPConnection,
749 /// Called when too many effects were added exceeding the maximum tree depth of 128. This is
750 /// most likely caused by accidentally adding too many DSP effects. Usually called from mixer
751 /// thread because that is where the connections are made.
752 BadDSPLevel,
753 /// Called directly when a thread is destroyed.
754 ThreadDestroyed,
755 /// Maximum number of callback types supported.
756 Max,
757 /// Makes sure this enum is signed 32bit.
758 ForceInt = 65536,
759}
760
761#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
762#[repr(C)]
763/// These flags are used with
764/// [`SoundGroup::set_max_audible_behavior`](../../struct.SoundGroup.html#method.set_max_audible_behavior)
765/// to determine what happens when more sounds are played than are specified with
766/// [`SoundGroup::set_max_audible`](../../struct.SoundGroup.html#method.set_max_audible).
767pub enum SoundGroupBehavior {
768 /// Any sound played that puts the sound count over the
769 /// [`SoundGroup::set_max_audible`](../../struct.SoundGroup.html#method.set_max_audible)
770 /// setting, will simply fail during [`Sound::play`](../../struct.Sound.html#method.play).
771 Fail,
772 /// Any sound played that puts the sound count over the
773 /// [`SoundGroup::set_max_audible`](../../struct.SoundGroup.html#method.set_max_audible)
774 /// setting, will be silent, then if another sound in the group stops the sound that was silent
775 /// before becomes audible again.
776 Mute,
777 /// Any sound played that puts the sound count over the
778 /// [`SoundGroup::set_max_audible`](../../struct.SoundGroup.html#method.set_max_audible)
779 /// setting, will steal the quietest / least important sound playing in the group.
780 StealLowest,
781 /// Maximum number of open state types.
782 Max,
783 /// Makes sure this enum is signed 32bit.
784 ForceInt = 65536,
785}
786
787#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
788#[repr(C)]
789/// These definitions can be used for creating FMOD defined special effects or DSP units.
790/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
791/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter).
792pub enum DspType {
793 /// This unit was created via a non FMOD plugin so has an unknown purpose.
794 Unknown,
795 /// This unit does nothing but take inputs and mix them together then feed the result to the
796 /// soundcard unit.
797 Mixer,
798 /// This unit generates sine/square/saw/triangle or noise tones.
799 Oscillator,
800 /// This unit filters sound using a high quality, resonant lowpass filter algorithm but consumes
801 /// more CPU time.
802 LowPass,
803 /// This unit filters sound using a resonant lowpass filter algorithm that is used in Impulse
804 /// Tracker, but with limited Cutoff range (0 to 8060hz).
805 ITLowPass,
806 /// This unit filters sound using a resonant highpass filter algorithm.
807 HighPass,
808 /// This unit produces an echo on the sound and fades out at the desired rate.
809 Echo,
810 /// This unit produces a flange effect on the sound.
811 Flange,
812 /// This unit distorts the sound.
813 Distortion,
814 /// This unit normalizes or amplifies the sound to a certain level.
815 Normalize,
816 /// This unit attenuates or amplifies a selected frequency range.
817 Parameq,
818 /// This unit bends the pitch of a sound without changing the speed of playback.
819 PitchShift,
820 /// This unit produces a chorus effect on the sound.
821 Chorus,
822 /// This unit allows the use of Steinberg VST plugins
823 VSTPlugin,
824 /// This unit allows the use of Nullsoft Winamp plugins
825 WinampPlugin,
826 /// This unit produces an echo on the sound and fades out at the desired rate as is used in
827 /// Impulse Tracker.
828 ITEcho,
829 /// This unit implements dynamic compression (linked multichannel, wideband)
830 Compressor,
831 /// This unit implements SFX reverb
832 SFXReverb,
833 /// This unit filters sound using a simple lowpass with no resonance, but has flexible Cutoff
834 /// and is fast.
835 LowPassSimple,
836 /// This unit produces different delays on individual channels of the sound.
837 Delay,
838 /// This unit produces a tremolo / chopper effect on the sound.
839 Tremolo,
840 /// This unit allows the use of LADSPA standard plugins.
841 LADSPAPlugin,
842 /// This unit filters sound using a simple highpass with no resonance, but has flexible Cutoff
843 /// and is fast.
844 HighPassSimple,
845 /// Offset that platform specific FMOD_HARDWARE DSPs will start at.
846 Hardware = 1000,
847 /// Makes sure this enum is signed 32bit.
848 ForceInt = 65536,
849}
850
851#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
852#[repr(C)]
853/// Parameter types for the FMOD_DSP_TYPE_OSCILLATOR filter.
854/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
855/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
856pub enum DspOscillator {
857 /// Waveform type. 0 = sine. 1 = square. 2 = sawup. 3 = sawdown. 4 = triangle. 5 = noise.
858 Type,
859 /// Frequency of the sinewave in hz. 1.0 to 22000.0. Default = 220.0.
860 Rate,
861}
862
863#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
864#[repr(C)]
865/// Parameter types for the FMOD_DSP_TYPE_LOWPASS filter.
866/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
867/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
868pub enum DspLowPass {
869 /// Lowpass Cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0.
870 Cutoff,
871 /// Lowpass resonance Q value. 1.0 to 10.0. Default = 1.0.
872 Resonance,
873}
874
875#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
876#[repr(C)]
877/// Parameter types for the FMOD_DSP_TYPE_ITLOWPASS filter.
878/// This is different to the default FMOD_DSP_TYPE_ITLOWPASS filter in that it uses a different
879/// quality algorithm and is the filter used to produce the correct sounding playback in .IT files.
880/// FMOD Ex's .IT playback uses this filter.
881/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
882/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
883pub enum DspITLowPass {
884 /// Lowpass Cutoff frequency in hz. 1.0 to 22000.0. Default = 5000.0
885 Cutoff,
886 /// Lowpass resonance Q value. 0.0 to 127.0. Default = 1.0.
887 Resonance,
888}
889
890#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
891#[repr(C)]
892/// Parameter types for the FMOD_DSP_TYPE_HIGHPASS filter.
893/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
894/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter).
895pub enum DspHighPass {
896 /// Highpass Cutoff frequency in hz. 1.0 to output 22000.0. Default = 5000.0.
897 Cutoff,
898 /// Highpass resonance Q value. 1.0 to 10.0. Default = 1.0.
899 Resonance,
900}
901
902#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
903#[repr(C)]
904/// Parameter types for the DspTypeEcho filter.
905/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
906/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter).
907pub enum DspTypeEcho {
908 /// Echo delay in ms. 10 to 5000. Default = 500.
909 Delay,
910 /// Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (ie simple 1 line delay).
911 /// Default = 0.5.
912 DecayRatio,
913 /// Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono,
914 /// 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0!
915 MaxChannels,
916 /// Volume of original signal to pass to output. 0.0 to 1.0. Default = 1.0.
917 DryMix,
918 /// Volume of echo signal to pass to output. 0.0 to 1.0. Default = 1.0.
919 WetMix,
920}
921
922#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
923#[repr(C)]
924/// Parameter types for the FMOD_DSP_TYPE_DELAY filter.
925/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
926/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
927pub enum DspDelay {
928 /// Channel #0 Delay in ms. 0 to 10000. Default = 0.
929 CH0,
930 /// Channel #1 Delay in ms. 0 to 10000. Default = 0.
931 CH1,
932 /// Channel #2 Delay in ms. 0 to 10000. Default = 0.
933 CH2,
934 /// Channel #3 Delay in ms. 0 to 10000. Default = 0.
935 CH3,
936 /// Channel #4 Delay in ms. 0 to 10000. Default = 0.
937 CH4,
938 /// Channel #5 Delay in ms. 0 to 10000. Default = 0.
939 CH5,
940 /// Channel #6 Delay in ms. 0 to 10000. Default = 0.
941 CH6,
942 /// Channel #7 Delay in ms. 0 to 10000. Default = 0.
943 CH7,
944 /// Channel #8 Delay in ms. 0 to 10000. Default = 0.
945 CH8,
946 /// Channel #9 Delay in ms. 0 to 10000. Default = 0.
947 CH9,
948 /// Channel #10 Delay in ms. 0 to 10000. Default = 0.
949 CH10,
950 /// Channel #11 Delay in ms. 0 to 10000. Default = 0.
951 CH11,
952 /// Channel #12 Delay in ms. 0 to 10000. Default = 0.
953 CH12,
954 /// Channel #13 Delay in ms. 0 to 10000. Default = 0.
955 CH13,
956 /// Channel #14 Delay in ms. 0 to 10000. Default = 0.
957 CH14,
958 /// Channel #15 Delay in ms. 0 to 10000. Default = 0.
959 CH15,
960 /// Maximum delay in ms. 0 to 10000. Default = 10.
961 MaxDelay,
962}
963
964#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
965#[repr(C)]
966/// Parameter types for the FMOD_DSP_TYPE_FLANGE filter.
967/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
968/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
969pub enum DspFlange {
970 /// Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.45.
971 DryMix,
972 /// Volume of flange signal to pass to output. 0.0 to 1.0. Default = 0.55.
973 WetMix,
974 /// Flange depth (percentage of 40ms delay). 0.01 to 1.0. Default = 1.0.
975 Depth,
976 /// Flange speed in hz. 0.0 to 20.0. Default = 0.1.
977 Rate,
978}
979
980#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
981#[repr(C)]
982/// Parameter types for the FMOD_DSP_TYPE_TREMOLO filter.
983/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
984/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
985pub enum DspTremolo {
986 /// LFO frequency in Hz. 0.1 to 20. Default = 4.
987 Frequency,
988 /// Tremolo depth. 0 to 1. Default = 0.
989 Depth,
990 /// LFO shape morph between triangle and sine. 0 to 1. Default = 0.
991 Shape,
992 /// Time-skewing of LFO cycle. -1 to 1. Default = 0.
993 Skew,
994 /// LFO on-time. 0 to 1. Default = 0.5.
995 Duty,
996 /// Flatness of the LFO shape. 0 to 1. Default = 0.
997 Square,
998 /// Instantaneous LFO phase. 0 to 1. Default = 0.
999 Phase,
1000 /// Rotation / auto-pan effect. -1 to 1. Default = 0.
1001 Spread
1002}
1003
1004#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1005#[repr(C)]
1006/// Parameter types for the FMOD_DSP_TYPE_DISTORTION filter.
1007/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1008/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1009pub enum DspDistortion {
1010 /// Distortion value. 0.0 to 1.0. Default = 0.5.
1011 Level,
1012 /// Useless enum
1013 Unused,
1014}
1015
1016#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1017#[repr(C)]
1018/// Parameter types for the FMOD_DSP_TYPE_NORMALIZE filter.
1019/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1020/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1021pub enum DspNormalize {
1022 /// Time to ramp the silence to full in ms. 0.0 to 20000.0. Default = 5000.0.
1023 FadeTime,
1024 /// Lower volume range threshold to ignore. 0.0 to 1.0. Default = 0.1. Raise higher to stop
1025 /// amplification of very quiet signals.
1026 Threshold,
1027 /// Maximum amplification allowed. 1.0 to 100000.0. Default = 20.0. 1.0 = no amplifaction,
1028 /// higher values allow more boost.
1029 MaxAmp,
1030}
1031
1032#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1033#[repr(C)]
1034/// Parameter types for the DspTypeParameq filter.
1035/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1036/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1037pub enum DspTypeParameq {
1038 /// Frequency center. 20.0 to 22000.0. Default = 8000.0.
1039 Center,
1040 /// Octave range around the center frequency to filter. 0.2 to 5.0. Default = 1.0.
1041 Bandwidth,
1042 /// Frequency Gain. 0.05 to 3.0. Default = 1.0.
1043 Gain,
1044}
1045
1046#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1047#[repr(C)]
1048/// Parameter types for the FMOD_DSP_TYPE_PITCHSHIFT filter.
1049/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1050/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1051pub enum DspPitchShift {
1052 /// Pitch value. 0.5 to 2.0. Default = 1.0. 0.5 = one octave down, 2.0 = one octave up. 1.0 does
1053 /// not change the pitch.
1054 Pitch,
1055 /// FFT window size. 256, 512, 1024, 2048, 4096. Default = 1024. Increase this to reduce
1056 /// 'smearing'. This effect is a warbling sound similar to when an mp3 is encoded at very low
1057 /// bitrates.
1058 FFTSize,
1059 /// Removed. Do not use. FMOD now uses 4 overlaps and cannot be changed.
1060 OverLap,
1061 /// Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono,
1062 /// 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0!
1063 MaxChannels,
1064}
1065
1066#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1067#[repr(C)]
1068/// Parameter types for the FMOD_DSP_TYPE_CHORUS filter.
1069/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1070/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1071pub enum DspChorus {
1072 /// Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5.
1073 DryMix,
1074 /// Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5.
1075 WetMix1,
1076 /// Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0.
1077 /// Default = 0.5.
1078 WetMix2,
1079 /// Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0.
1080 /// Default = 0.5.
1081 WetMix3,
1082 /// Chorus delay in ms. 0.1 to 100.0. Default = 40.0 ms.
1083 Delay,
1084 /// Chorus modulation rate in hz. 0.0 to 20.0. Default = 0.8 hz.
1085 Rate,
1086 /// Chorus modulation depth. 0.0 to 1.0. Default = 0.03.
1087 Depth,
1088}
1089
1090#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1091#[repr(C)]
1092/// Parameter types for the FMOD_DSP_TYPE_ITECHO filter.
1093/// This is effectively a software based echo filter that emulates the DirectX DMO echo effect.
1094/// Impulse tracker files can support this, and FMOD will produce the effect on ANY platform, not
1095/// just those that support DirectX effects!
1096/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1097/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1098pub enum DspITEcho {
1099 /// Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0.0
1100 /// through 100.0 (all wet). The default value is 50.
1101 WetDryMix,
1102 /// Percentage of output fed back into input, in the range from 0.0 through 100.0. The default
1103 /// value is 50.
1104 FeedBack,
1105 /// Delay for left channel, in milliseconds, in the range from 1.0 through 2000.0. The default
1106 /// value is 500 ms.
1107 LeftDelay,
1108 /// Delay for right channel, in milliseconds, in the range from 1.0 through 2000.0. The default
1109 /// value is 500 ms.
1110 RightDelay,
1111 /// Value that specifies whether to swap left and right delays with each successive echo. The
1112 /// default value is zero, meaning no swap. Possible values are defined as 0.0 (equivalent to
1113 /// FALSE) and 1.0 (equivalent to TRUE). CURRENTLY NOT SUPPORTED.
1114 PanDelay,
1115}
1116
1117#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1118#[repr(C)]
1119/// Parameter types for the FMOD_DSP_TYPE_COMPRESSOR unit.
1120/// This is a simple linked multichannel software limiter that is uniform across the whole spectrum.
1121/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1122/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter)
1123pub enum DspCompressor {
1124 /// Threshold level (dB) in the range from -60 through 0. The default value is 0.
1125 Threshold,
1126 /// Gain reduction attack time (milliseconds), in the range from 10 through 200. The default
1127 /// value is 50.
1128 Attack,
1129 /// Gain reduction release time (milliseconds), in the range from 20 through 1000. The default
1130 /// value is 50.
1131 Release,
1132 /// Make-up gain (dB) applied after limiting, in the range from 0 through 30. The default value
1133 /// is 0.
1134 GainMakeup,
1135}
1136
1137#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1138#[repr(C)]
1139/// Parameter types for the FMOD_DSP_TYPE_SFXREVERB unit.
1140/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1141/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter).
1142pub enum DspSfxReverb {
1143 /// Dry Level : Mix level of dry signal in output in mB. Ranges from -10000.0 to 0.0.
1144 /// Default is 0.
1145 DryLevel,
1146 /// Room : Room effect level at low frequencies in mB. Ranges from -10000.0 to 0.0.
1147 /// Default is -10000.0.
1148 Room,
1149 /// Room HF : Room effect high-frequency level re. low frequency level in mB. Ranges from
1150 /// -10000.0 to 0.0. Default is 0.0.
1151 RoomHF,
1152 /// Decay Time : Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to
1153 /// 20.0. Default is 1.0.
1154 DecayTime,
1155 /// Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0.
1156 /// Default is 0.5.
1157 DecayHFRatio,
1158 /// Reflections : Early reflections level relative to room effect in mB. Ranges from -10000.0
1159 /// to 1000.0. Default is -10000.0.
1160 ReflectionsLevel,
1161 /// Reflect Delay : Delay time of first reflection in seconds. Ranges from 0.0 to 0.3. Default
1162 /// is 0.02.
1163 ReflectionsDelay,
1164 /// Reverb : Late reverberation level relative to room effect in mB. Ranges from
1165 /// -10000.0 to 2000.0. Default is 0.0.
1166 ReverbLevel,
1167 /// Reverb Delay : Late reverberation delay time relative to first reflection in seconds.
1168 /// Ranges from 0.0 to 0.1. Default is 0.04.
1169 ReverbDelay,
1170 /// Diffusion : Reverberation diffusion (echo density) in percent. Ranges from 0.0 to
1171 /// 100.0. Default is 100.0.
1172 Diffusion,
1173 /// Density : Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0.
1174 /// Default is 100.0.
1175 Density,
1176 /// HF Reference : Reference high frequency in Hz. Ranges from 20.0 to 20000.0. Default is
1177 /// 5000.0.
1178 HFReference,
1179 /// Room LF : Room effect low-frequency level in mB. Ranges from -10000.0 to 0.0. Default
1180 /// is 0.0.
1181 RoomLF,
1182 /// LF Reference : Reference low-frequency in Hz. Ranges from 20.0 to 1000.0. Default is
1183 /// 250.0.
1184 LFReference,
1185}
1186
1187#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1188#[repr(C)]
1189/// Parameter types for the FMOD_DSP_TYPE_LOWPASS_SIMPLE filter.
1190/// This is a very simple low pass filter, based on two single-pole RC time-constant modules.
1191/// The emphasis is on speed rather than accuracy, so this should not be used for task requiring
1192/// critical filtering.
1193/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1194/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter).
1195pub enum DspLowPassSimple {
1196 /// Lowpass Cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0
1197 Cutoff,
1198 /// Useless enum
1199 Unused,
1200}
1201
1202#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
1203#[repr(C)]
1204/// Parameter types for the FMOD_DSP_TYPE_HIGHPASS_SIMPLE filter.
1205/// This is a very simple single-order high pass filter.
1206/// The emphasis is on speed rather than accuracy, so this should not be used for task requiring
1207/// critical filtering.
1208/// Used with [`Dsp::set_parameter`](../struct.Dsp.html#method.set_parameter) and
1209/// [`Dsp::get_parameter`](../struct.Dsp.html#method.get_parameter).
1210pub enum DspHighPassSimple {
1211 /// Highpass cutoff frequency in hz. 10.0 to 22000.0. Default = 1000.0
1212 Cutoff,
1213 /// Useless enum
1214 Unused,
1215}