class SoundFile
A sound resource.
public Action OnSoundReloaded { get; set; }
Ran when the file is reloaded/recompiled, etc.
public bool IsLoaded { get; }
true if sound is loaded
public SoundFormat Format { get; }
Format of the audio file.
public int BitsPerSample { get; }
Bits per each sample of this sound file.
public int Channels { get; }
Number of channels this audio file has.
public int BytesPerSample { get; }
Bytes per each sample of this sound file.
public int SampleFrameSize { get; }
Size of one sample, typically this would be "sample size * channel count", but can vary on audio format.
public int Rate { get; }
Sample rate of this sound file, per second.
public float Duration { get; }
Duration of the sound this sound file contains, in seconds.
public static SoundFile Load( string filename )
Load a new sound from disk. Includes automatic caching.
filenameThe file path to load the sound from.- Returns The loaded sound file, or null if failed.
public Type GetType( )
😔 No documentation found.
public void StateHasChanged( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool HasUnsavedChanges { get; }
😔 No documentation found.
public string ResourceName { get; }
😔 No documentation found.
public string ResourcePath { get; }
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public Task<short[]> GetSamplesAsync( )
😔 No documentation found.
public void Preload( )
😔 No documentation found.
public Task<bool> LoadAsync( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public bool IsValidForPlayback { get; }
😔 No documentation found.
public bool IsValid { get; }
😔 No documentation found.
public int ResourceId { get; }
😔 No documentation found.
public static SoundFile FromWav( string filename, Span<byte> data, bool loop )
😔 No documentation found.