Enum Error

Source
pub enum Error {
Show 82 variants BadCommand, ChannelAlloc, ChannelStolen, DMA, DspConnection, DspDontProcess, DspFormat, DspInuse, DspNotFound, DspReserved, DspSilence, DspType, FileBad, FileCouldNotSeek, FileDiskEjected, FileEof, FileEndOfData, FileNotFound, Format, HeaderMismatch, Http, HttpAccess, HttpProxyAuth, HttpServerError, HttpTimeout, Initialization, Initialized, Internal, InvalidFloat, InvalidHandle, InvalidParam, InvalidPosition, InvalidSpeaker, InvalidSyncPoint, InvalidThread, InvalidVector, MaxAudible, Memory, MemoryCantPoint, Needs3D, NeedsHardWare, NetConnect, NetSocketError, NetUrl, NetWouldBlock, NotReady, OutputAllocated, OutputCreateBuffer, OuputDriverCall, OutputFormat, OutputInit, OutputNoDrivers, Plugin, PluginMissing, PluginResource, PluginVersion, Record, ReverbChannelGroup, ReverbInstance, Subsounds, SubsoundAllocated, SubsoundCantMove, TagNotFound, TooManyChannels, Truncated, Unimplemented, Uninitialized, Unsupported, Version, EventAlreadyLoaded, EventLiveUpdateBusy, EventLiveUpdateMismatch, EventLiveUpdateTimeout, EventNotFound, StudioUninitialized, StudioNotLoaded, InvalidString, AlreadyLocked, NotLocked, RecordDisconnected, TooManySamples, EnumFromPrivitive { name: &'static str, primitive: i64, },
}
Expand description

An error that FMOD (or this crate) might return.

Variants§

§

BadCommand

Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound).

§

ChannelAlloc

Error trying to allocate a channel.

§

ChannelStolen

The specified channel has been reused to play another sound.

§

DMA

DMA Failure. See debug output for more information.

§

DspConnection

DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts.

§

DspDontProcess

DSP code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph.

§

DspFormat

DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.

§

DspInuse

DSP is already in the mixer’s DSP network. It must be removed before being reinserted or released.

§

DspNotFound

DSP connection error. Couldn’t find the DSP unit specified.

§

DspReserved

DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.

§

DspSilence

DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.

§

DspType

DSP operation cannot be performed on a DSP of this type.

§

FileBad

Error loading file.

§

FileCouldNotSeek

Couldn’t perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.

§

FileDiskEjected

Media was ejected while reading.

§

FileEof

End of file unexpectedly reached while trying to read essential data (truncated?).

§

FileEndOfData

End of current chunk reached while trying to read data.

§

FileNotFound

File not found.

§

Format

Unsupported file or audio format.

§

HeaderMismatch

There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library.

§

Http

A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.

§

HttpAccess

The specified resource requires authentication or is forbidden.

§

HttpProxyAuth

Proxy authentication is required to access the specified resource.

§

HttpServerError

A HTTP server error occurred.

§

HttpTimeout

The HTTP request timed out.

§

Initialization

FMOD was not initialized correctly to support this function.

§

Initialized

Cannot call this command after SystemBuilder::build.

§

Internal

An error occured in the FMOD system. Use the logging version of FMOD for more information.

§

InvalidFloat

Value passed in was a NaN, Inf or denormalized float.

§

InvalidHandle

An invalid object handle was used.

§

InvalidParam

An invalid parameter was passed to this function.

§

InvalidPosition

An invalid seek position was passed to this function.

§

InvalidSpeaker

An invalid speaker was passed to this function based on the current speaker mode.

§

InvalidSyncPoint

The syncpoint did not come from this sound handle.

§

InvalidThread

Tried to call a function on a thread that is not supported.

§

InvalidVector

The vectors passed in are not unit length, or perpendicular.

§

MaxAudible

Reached maximum audible playback count for this sound’s soundgroup.

§

Memory

Not enough memory or resources.

§

MemoryCantPoint

Can’t use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.

§

Needs3D

Tried to call a command on a 2d sound when the command was meant for 3d sound.

§

NeedsHardWare

Tried to use a feature that requires hardware support.

§

NetConnect

Couldn’t connect to the specified host.

§

NetSocketError

A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.

§

NetUrl

The specified URL couldn’t be resolved.

§

NetWouldBlock

The specified URL couldn’t be resolved.

§

NotReady

Operation could not be performed because specified sound/DSP connection is not ready.

§

OutputAllocated

Error initializing output device, but more specifically, the output device is already in use and cannot be reused.

§

OutputCreateBuffer

Error creating hardware sound buffer.

§

OuputDriverCall

A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.

§

OutputFormat

Soundcard does not support the specified format.

§

OutputInit

Error initializing output device.

§

OutputNoDrivers

The output device has no drivers installed. If pre-init, OutputType::NoSound is selected as the output mode. If post-init, the function just fails.

§

Plugin

An unspecified error has been returned from a plugin.

§

PluginMissing

A requested output, dsp unit type or codec was not available.

§

PluginResource

A resource that the plugin requires cannot be allocated or found. (ie the DLS file for MIDI playback)

§

PluginVersion

A plugin was built with an unsupported SDK version.

§

Record

An error occurred trying to initialize the recording device.

§

ReverbChannelGroup

Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection.

§

ReverbInstance

Specified instance in FMOD_REVERB_PROPERTIES couldn’t be set. Most likely because it is an invalid instance number or the reverb doesn’t exist.

§

Subsounds

The error occurred because the sound referenced contains subsounds when it shouldn’t have, or it doesn’t contain subsounds when it should have. The operation may also not be able to be performed on a parent sound.

§

SubsoundAllocated

This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent’s entry first.

§

SubsoundCantMove

Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.

§

TagNotFound

The specified tag could not be found or there are no tags.

§

TooManyChannels

The sound created exceeds the allowable input channel count. This can be increased using the ‘maxinputchannels’ parameter in SystemBuilder::software_format.

§

Truncated

The retrieved string is too long to fit in the supplied buffer and has been truncated.

§

Unimplemented

Something in FMOD hasn’t been implemented when it should be. Contact support.

§

Uninitialized

This command failed because SystemBuilder::build or System::set_driver was not called.

§

Unsupported

A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.

§

Version

The version number of this file format is not supported.

§

EventAlreadyLoaded

The specified bank has already been loaded.

§

EventLiveUpdateBusy

The live update connection failed due to the game already being connected.

§

EventLiveUpdateMismatch

The live update connection failed due to the game data being out of sync with the tool.

§

EventLiveUpdateTimeout

The live update connection timed out.

§

EventNotFound

The requested event, parameter, bus or vca could not be found.

§

StudioUninitialized

The studio::System object is not yet initialized.

§

StudioNotLoaded

The specified resource is not loaded, so it can’t be unloaded.

§

InvalidString

An invalid string was passed to this function.

§

AlreadyLocked

The specified resource is already locked.

§

NotLocked

The specified resource is not locked, so it can’t be unlocked.

§

RecordDisconnected

The specified recording driver has been disconnected.

§

TooManySamples

The length provided exceeds the allowable limit.

§

EnumFromPrivitive

Failed to turn a number into an enum value

This error does not come from FMOD, and instead comes from this crate. If this error is ever returned from this crate, please file an issue!

Fields

§name: &'static str

The enum name

§primitive: i64

The invalid number

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for FMOD_RESULT

Source§

fn from(val: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FMOD_RESULT> for Error

Source§

fn from(value: FMOD_RESULT) -> Self

Converts to this type from the input type.
Source§

impl<T> From<TryFromPrimitiveError<T>> for Error

Source§

fn from(value: TryFromPrimitiveError<T>) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Error) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Error

Source§

impl Eq for Error

Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.