Sound::getFormat

FMOD Studio API

Firelight Technologies FMOD Studio API

Sound::getFormat

Returns format information about the sound.

C++ Syntax

FMOD_RESULT Sound::getFormat(
  FMOD_SOUND_TYPE *type,
  FMOD_SOUND_FORMAT *format,
  int *channels,
  int *bits
);

C Syntax

FMOD_RESULT FMOD_Sound_GetFormat(
  FMOD_SOUND *sound,
  FMOD_SOUND_TYPE *type,
  FMOD_SOUND_FORMAT *format,
  int *channels,
  int *bits
);

C# Syntax

RESULT Sound.getFormat(
  out SOUND_TYPE type,
  out SOUND_FORMAT format,
  out int channels,
  out int bits
);

JavaScript Syntax

Sound.getFormat(
  type,                            // writes value to type.val
  format,                          // writes value to format.val
  channels,                        // writes value to channels.val
  bits                             // writes value to bits.val
);

Parameters

type
Address of a variable that receives the type of sound. Optional. Specify 0 or NULL to ignore.
format
Address of a variable that receives the format of the sound. Optional. Specify 0 or NULL to ignore.
channels
Address of a variable that receives the number of channels for the sound. Optional. Specify 0 or NULL to ignore.
bits
Address of a variable that receives the number of bits per sample for the sound. This corresponds to FMOD_SOUND_FORMAT but is provided as an integer format for convenience. Optional. Specify 0 or NULL to ignore.

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

See Also




Version 1.10.03 Built on Feb 1, 2018