SoxConvert Method (String, String, SoxAudioFileType, 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,
SoxAudioFileType fromType,
string to,
SoxAudioFileType toType
)
Public Shared Sub Convert (
sox As String,
from As String,
fromType As SoxAudioFileType,
to As String,
toType As SoxAudioFileType
)
public:
static void Convert(
String^ sox,
String^ from,
SoxAudioFileType fromType,
String^ to,
SoxAudioFileType toType
)
Parameters
- sox
- Type: SystemString
Path to Sox executable file - from
- Type: SystemString
Input audio file. - fromType
- Type: Alvas.AudioSoxAudioFileType
Input audio file type - to
- Type: SystemString
Output audio file. - toType
- Type: Alvas.AudioSoxAudioFileType
Output audio file type
Examples This example shows how translates an audio file in Creative Technology Sound Blaster format to a Xiph.org's ogg-vorbis lossy compression file
try
{
Sox.Convert("sox.exe", "input.voc", SoxAudioFileType.Voc, "output.ogg", SoxAudioFileType.Ogg);
}
catch (SoxException e)
{
Console.WriteLine("{0}: {1}", e.Code, e.Message);
}
See Also