AudioContent.ConvertFormat Method (Microsoft.Xna.Framework.Content.Pipeline.Audio)

Transcodes the source audio to the target format and quality.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Audio
Assembly: MonoGame.Framework.Content.Pipeline (MonoGame.Framework.Content.Pipeline.dll 3.8.0.1082)
  • C#
  • VB
  • F#
[ObsoleteAttribute("You should prefer to use AudioProfile.")]
public void ConvertFormat(
	ConversionFormat formatType, 
	ConversionQuality quality, 
	string saveToFile
)

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

formatType
Type: Microsoft.Xna.Framework.Content.Pipeline.Audio.ConversionFormat
Format to convert this audio to.
quality
Type: Microsoft.Xna.Framework.Content.Pipeline.Audio.ConversionQuality
Quality of the processed output audio. For streaming formats, it can be one of the following: Low (96 kbps), Medium (128 kbps), Best (192 kbps). For WAV formats, it can be one of the following: Low (11kHz ADPCM), Medium (22kHz ADPCM), Best (44kHz PCM)
saveToFile
Type: System.String
The name of the file that the converted audio should be saved into. This is used for SongContent, where the audio is stored external to the XNB file. If this is null, then the converted audio is stored in the Data property.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop