SoxConvert Method (String, String, String, SoxAudioFileType) |
Converts the audio data from the specified audio file type to the new audio file type.
Namespace: Alvas.AudioAssembly: Alvas.Audio (in Alvas.Audio.dll) Version: 2016.0.6173.41573
Syntax public static void Convert(
string sox,
string from,
string to,
SoxAudioFileType toType
)
Public Shared Sub Convert (
sox As String,
from As String,
to As String,
toType As SoxAudioFileType
)
public:
static void Convert(
String^ sox,
String^ from,
String^ to,
SoxAudioFileType toType
)
Parameters
- sox
- Type: SystemString
Path to Sox executable file - from
- Type: SystemString
Input audio file. - to
- Type: SystemString
Output audio file. - toType
- Type: Alvas.AudioSoxAudioFileType
Output audio file type
Examples This example shows how translates an audio file in Sun AU format to a Xiph.org's ogg-vorbis lossy compression file
try
{
Sox.Convert("sox.exe", "input.au", "output.ogg", SoxAudioFileType.Ogg);
}
catch (SoxException e)
{
Console.WriteLine("{0}: {1}", e.Code, e.Message);
}
See Also