The Format
property of the SoundFile
class represents the format of the audio file. This property is of type SoundFormat
, which is an enumeration that defines the various audio formats supported by the Sandbox engine.
The Format
property of the SoundFile
class represents the format of the audio file. This property is of type SoundFormat
, which is an enumeration that defines the various audio formats supported by the Sandbox engine.
To access the format of a sound file, you can use the Format
property on an instance of SoundFile
. This property is read-only and provides information about the audio format, such as whether it is WAV, MP3, or another supported format.
// Example of accessing the Format property SoundFile soundFile = SoundFile.Load("path/to/soundfile"); SoundFormat format = soundFile.Format; // Output the format switch (format) { case SoundFormat.WAV: // Handle WAV format break; case SoundFormat.MP3: // Handle MP3 format break; // Add cases for other formats as needed }