Defined in carb/audio/AudioUtils.h

inline bool carb::audio::saveSoundToDisk(const IAudioUtils *iface, SoundData *snd, const char *fileName, SampleFormat fmt = SampleFormat::eDefault, SaveFlags flags = 0)

Save a sound to disk.


When converting to any format with specific encoder settings, these will be left at their defaults.

  • iface[in] The IAudioUtils interface to use.

  • snd[in] The sound to convert to a new format. This may not be nullptr.

  • fileName[in] The path to the file on disk to save this to.

  • fmt[in] The format to save the sound as. This can be any valid format.

  • flags[in] Flags to alter the behavior of this function.


true if the sound was successfully saved.


false if the operation failed.