Table of Contents

Interface IMicManager

Namespace
CHTLand.SDK.Module.Input

麥克風管理介面,負責開啟與關閉本地麥克風。

public interface IMicManager

Methods

EndLocalMic()

Stops recording.

void EndLocalMic()

RequestPermission()

Request that the user grant access to a Microphone.

void RequestPermission()

StartLocalMic(bool, int, int, bool)

Start Recording with device.

AudioClip StartLocalMic(bool loop = true, int lengthSec = 10, int frequency = 44100, bool leapSync = false)

Parameters

loop bool

Indicates whether the recording should continue recording if lengthSec is reached, and wrap around and record from the beginning of the AudioClip.

lengthSec int

Is the length of the AudioClip produced by the recording.

frequency int

The sample rate of the AudioClip produced by the recording.

leapSync bool

Returns

AudioClip

The function returns null if the recording fails to start.