AudioCaptureDevice.AudioFrameSize Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the intended audio frame size.
Namespace: System.Windows.Media
Assembly: System.Windows (in System.Windows.dll)
Syntax
Public Property AudioFrameSize As Integer
public int AudioFrameSize { get; set; }
Property Value
Type: System..::.Int32
The audio frame size, in milliseconds. The default is 1000. See Remarks.
Remarks
The minimum value is 10 milliseconds, and the maximum value is 2000 milliseconds. Setting AudioFrameSize to a value greater than 2000 or less than 10 does not throw an exception; however, the stored value is constrained to be within those restrictions.
AudioFrameSize influences the sample size if you process audio sink sample information with overrides of OnSamples.
Tip
Setting the AudioFrameSize correctly for your sample processing technique and application scenario may take some tuning to arrive at optimal frame size for a balance between quality and application performance. A too-long frame size can produce latency if you are time-dependent on immediate playback or other actions that should result from audio capture. A too-short frame size can result in buffer underrun. A buffer underrun can result from trying to play audio that has not made it through the record buffer and processing yet. Such buffer underruns might produce audible artifacts in the sound playback or obvious sample gaps in converted sound files.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1
Platforms
Windows Phone