Version: 2019.1
Experimental: this API is experimental and might be changed or removed in the future.

AudioSampleProvider.enableSilencePadding

Switch to Manual
public bool enableSilencePadding ;

Description

If true, buffers produced by ConsumeSampleFrames will get padded when silence if there are less available than asked for. Otherwise, the extra sample frames in the buffer will be left unchanged.

Without silence padding, AudioSampleProvider.ConsumeSampleFrames will return how many sample frames of the buffer passed were acutally written to, using the available sample frames, and the rest of the buffer will be left intact.

With silence padding enabled, the method will completely fill the buffer passed in and provide silence if needed, in case there were not enough available sample frames.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961