UtilNAudioInsertFadeIn Method
Inserts a fade-in effect at a specific position 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 InsertFadeIn(
WaveStream wave,
TimeSpan startPosition,
TimeSpan duration,
bool skipAudioBeforeFadeIn
)
Public Shared Function InsertFadeIn (
wave As WaveStream,
startPosition As TimeSpan,
duration As TimeSpan,
skipAudioBeforeFadeIn As Boolean
) As IWaveProvider
Dim wave As WaveStream
Dim startPosition As TimeSpan
Dim duration As TimeSpan
Dim skipAudioBeforeFadeIn As Boolean
Dim returnValue As IWaveProvider
returnValue = UtilNAudio.InsertFadeIn(wave,
startPosition, duration, skipAudioBeforeFadeIn)
public:
static IWaveProvider^ InsertFadeIn(
WaveStream^ wave,
TimeSpan startPosition,
TimeSpan duration,
bool skipAudioBeforeFadeIn
)
static member InsertFadeIn :
wave : WaveStream *
startPosition : TimeSpan *
duration : TimeSpan *
skipAudioBeforeFadeIn : bool -> IWaveProvider
No code example is currently available or this language may not be supported.
- wave WaveStream
-
The source WaveStream.
- startPosition TimeSpan
-
The position where to insert the fade-in effect.
- duration TimeSpan
-
The duration of the fade-in effect.
- skipAudioBeforeFadeIn Boolean
-
If , any leading audio before the fade-in effect position
will be skipped (cutted) from the source WaveStream.
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 position As TimeSpan = TimeSpan.Parse("00:00:05.000")
Dim duration As TimeSpan = TimeSpan.FromSeconds(3)
Dim wave As IWaveProvider = InsertFadeIn(reader, position, duration, skipAudioBeforeFadeIn:=True)
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.