Copyright © 2008-2023 MultiMedia Soft

How to export edited sounds

Previous pageReturn to chapter overviewNext page

After completing an editing session, the current sound, or a defined range within the current sound, can be resampled and exported into a disk file; the first thing to decide is the output format of the recorded sound: for this purpose you need to set the EncodeFormats.FormatToUse property to one of the available encoding formats.

 

Each encoding format set into the EncodeFormats.FormatToUse property has its own settings which can be controlled through sub-properties of the EncodeFormats property: for example, if the chosen encoding format should be ENCODING_FORMAT_WAV, you would have to modify settings of the EncodeFormats.WAV property, if chosen encoding format should be ENCODING_FORMAT_MP3 you would have to modify settings of the EncodeFormats.MP3 property and so on for the remaining accepted encoding formats.

 

The most important property for choosing a specific encode mode for a certain encoding format is to set the EncodeMode sub-property: for example, if the chosen encoding format should be ENCODING_FORMAT_WAV, you would have to modify the EncodeFormats.WAV.EncodeMode property, if chosen encoding format should be ENCODING_FORMAT_MP3 you would have to modify the EncodeFormats.MP3.EncodeMode property and so on for the remaining accepted encoding formats.

 

For each encoding format, available encoding modes can be enumerated using the GetEncodeModesCount and GetEncodeModeDesc methods available inside each format related sub-property: for example, if the chosen encoding format should be ENCODING_FORMAT_WAV, you would have to use the EncodeFormats.WAV.GetEncodeModesCount method and the EncodeFromats.WAV.GetEncodeModeDesc method, if chosen encoding format should be ENCODING_FORMAT_MP3 you would have to use the EncodeFormats.MP3.GetEncodeModesCount method and the EncodeFormats.MP3.GetEncodeModeDesc method and so on for the remaining accepted encoding formats.

 

At this point the edited sound can be resampled and exported to a disk file calling the ExportToFile method. A successful call to this method will fire the SoundExportStarted event. Once the exporting session has been performed completely, the control will fire the SoundExportDone event. Exporting advancement can be controlled through the SoundExportPerc event.

The exporting session can be canceled through the ExportSoundCancel method.

 

As an alternative to the ExportToFile method, the ExportToFileWithTags method attempts to export eventual tags available inside the originally loaded sound file: this feature is only available for sound files loaded from a file on disk through the LoadSound method and only for the following audio formats:

MP3
WMA
Ogg Vorbis
MP4

 

For stereo files only, in case you should need to export audio data of the left and right channels into different output files, in place of the ExportToFile method you could use the ExportAndSplitStereoChannelsToFile method.

 

For multi-channel surround files (like 3.1, 5.1 and 7.1), in case you should need to export audio data of a specific channel or of a specific pair of channels, in place of the ExportToFile method you could use the ExportChannelsToFile method .

 

During an exporting session in which the edited sound is being down-mixed to lower frequencies (for example from 44100 Hz to 11025 Hz), the SetDownmixFilterQuality method allows applying an anti-aliasing filter to exported sounds, allowing better quality results.

 

 

Special notes

 

If you need dealing with Windows Media Audio files (WMA, ASF, WMV, etc.), the Microsoft Windows Media Format modules must already be installed on the target PC: for Windows XP and previous versions the Windows Media Format modules can be installed using the redistribution setup package (wmfdist.exe) provided by Microsoft. For Windows Vista and later versions there is the need to install the Microsoft's Windows Media Player application (which is usually installed by default).
For encoding of MP3 files, the Lame encoder (Lame.exe) must be available on the target system.
For encoding of MP2 files, the TwoLame encoder (TwoLame.exe) must be available on the target system.
For encoding of OGG Vorbis files, the OggEnc encoder (OggEnc.exe) must be available on the target system.
For encoding of AAC and MP4 files, the Faac encoder (Faac.exe) must be available on the target system.
For encoding of AAC+ files, the FdkAac encoder (FdkAac.exe) must be available on the target system.
For encoding of OPUS files, the OPUS encoder (OpusEnc.exe) must be available on the target system.