UtilNAudioAppendSilence Method
Appends a silence at the end of the source WaveStream.
Namespace: DevCase.ThirdParty.NAudioAssembly: DevCase.net48.ThirdParty.NAudio (in DevCase.net48.ThirdParty.NAudio.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static IWaveProvider AppendSilence(
WaveStream wave,
TimeSpan duration
)
Public Shared Function AppendSilence (
wave As WaveStream,
duration As TimeSpan
) As IWaveProvider
Dim wave As WaveStream
Dim duration As TimeSpan
Dim returnValue As IWaveProvider
returnValue = UtilNAudio.AppendSilence(wave,
duration)
public:
static IWaveProvider^ AppendSilence(
WaveStream^ wave,
TimeSpan duration
)
static member AppendSilence :
wave : WaveStream *
duration : TimeSpan -> IWaveProvider
No code example is currently available or this language may not be supported.
- wave WaveStream
-
The source WaveStream.
- duration TimeSpan
-
The duration of the silence.
IWaveProvider
The resulting
IWaveProvider.
Note: Some functionalities of this assembly may require to install one or all of the listed NuGet packages:
NAudio
This is a code example.
No code example is currently available or this language may not be supported.
Dim sourceFile As String = "C:\File.mp3"
Dim outputFile As String = "C:\Output.wav" ' It must be a WAVE file
Using reader As New AudioFileReader(sourceFile)
Dim duration As TimeSpan = TimeSpan.FromSeconds(5)
Dim wave As IWaveProvider = AppendSilence(reader, duration)
WaveFileWriter.CreateWaveFile(outputFile, wave)
End Using
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.