UtilNAudioCutAudio Method
Cuts a segment of audio in 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 CutAudio(
WaveStream wave,
TimeSpan startPosition,
TimeSpan endPosition
)
Public Shared Function CutAudio (
wave As WaveStream,
startPosition As TimeSpan,
endPosition As TimeSpan
) As IWaveProvider
Dim wave As WaveStream
Dim startPosition As TimeSpan
Dim endPosition As TimeSpan
Dim returnValue As IWaveProvider
returnValue = UtilNAudio.CutAudio(wave,
startPosition, endPosition)
public:
static IWaveProvider^ CutAudio(
WaveStream^ wave,
TimeSpan startPosition,
TimeSpan endPosition
)
static member CutAudio :
wave : WaveStream *
startPosition : TimeSpan *
endPosition : TimeSpan -> IWaveProvider
No code example is currently available or this language may not be supported.
- wave WaveStream
-
The source WaveStream.
- startPosition TimeSpan
-
The start position where to start the cut.
- endPosition TimeSpan
-
The start position where to end the cut.
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 startPosition As TimeSpan = TimeSpan.Parse("00:00:05.000")
Dim endPosition As TimeSpan = TimeSpan.Parse("00:00:10.000")
Dim wave As IWaveProvider = CutAudio(reader, startPosition, endPosition)
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.