AudioSink.OnSamples Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
When overridden in a derived class, is invoked when an audio device captures a complete audio sample.
Namespace: System.Windows.Media
Assembly: System.Windows (in System.Windows.dll)
Syntax
Protected MustOverride Sub OnSamples ( _
sampleTimeInHundredNanoseconds As Long, _
sampleDurationInHundredNanoseconds As Long, _
sampleData As Byte() _
)
protected abstract void OnSamples(
long sampleTimeInHundredNanoseconds,
long sampleDurationInHundredNanoseconds,
byte[] sampleData
)
Parameters
- sampleTimeInHundredNanoseconds
Type: System..::.Int64
The time, in 100-nanosecond units, when the sample was captured.
- sampleDurationInHundredNanoseconds
Type: System..::.Int64
The duration of the sample, in 100-nanosecond units.
- sampleData
Type: array<System..::.Byte>[]()[]
A byte stream that contains audio data, to be interpreted per the relevant audio format information.
Remarks
The interval at which OnSamples is called depends on the AudioFrameSize value for the active AudioCaptureDevice.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1
Platforms
Windows Phone