public override ConversionQuality ConvertStreamingAudio( TargetPlatform platform, ConversionQuality quality, AudioContent content, string inputFile, out string destinationFile) { var targetFormat = PlatformToFormat(platform); // Get the song output path with the target format extension. destinationFile = Path.ChangeExtension( inputFile, AudioHelper.GetExtension(targetFormat)); // Make sure the output folder for the file exists. Directory.CreateDirectory(Path.GetDirectoryName(destinationFile)); return(ConvertToFormat(content, targetFormat, quality, destinationFile)); }
public override ConversionQuality ConvertAudio( TargetPlatform platform, ConversionQuality quality, AudioContent content) { //// Default to PCM data, or ADPCM if the source is ADPCM. //var targetFormat = ConversionFormat.Pcm; // //if (quality != ConversionQuality.Best || // content.Format.Format == 2 || // content.Format.Format == 17) //{ // if (platform == TargetPlatform.iOS || // platform == TargetPlatform.MacOSX || // platform == TargetPlatform.DesktopGL) // targetFormat = ConversionFormat.ImaAdpcm; // else // targetFormat = ConversionFormat.Adpcm; //} var targetFormat = ConversionFormat.Vorbis; return(ConvertToFormat(content, targetFormat, quality, null)); }
/// <summary> /// Converts the audio content to a streaming format that works on targeted platform. /// </summary> /// <param name="platform">The platform to build the audio content for.</param> /// <param name="quality">The suggested audio quality level.</param> /// <param name="content">he audio content to convert.</param> /// <param name="inputFile">The input file name. This may change varying on platform and profile.</param> /// <param name="destinationFile">The output file name, changed by platform and profile.</param> /// <returns>The quality used for conversion which could be different from the suggested quality.</returns> public abstract ConversionQuality ConvertStreamingAudio( TargetPlatform platform, ConversionQuality quality, AudioContent content, string inputFile, out string destinationFile);
/// <summary> /// Converts the audio content to work on targeted platform. /// </summary> /// <param name="platform">The platform to build the audio content for.</param> /// <param name="quality">The suggested audio quality level.</param> /// <param name="content">The audio content to convert.</param> /// <returns>The quality used for conversion which could be different from the suggested quality.</returns> public abstract ConversionQuality ConvertAudio( TargetPlatform platform, ConversionQuality quality, AudioContent content);