AudioFrame
- Unity
更新时间不可用
原始音频数据。
public class AudioFrame
{
public AudioFrame()
{
type = AUDIO_FRAME_TYPE.FRAME_TYPE_PCM16;
samplesPerChannel = 0;
bytesPerSample = BYTES_PER_SAMPLE.TWO_BYTES_PER_SAMPLE;
channels = 0;
samplesPerSec = 0;
RawBuffer = new byte[0];
renderTimeMs = 0;
avsync_type = 0;
}
public AudioFrame(AUDIO_FRAME_TYPE type, int samplesPerChannel, BYTES_PER_SAMPLE bytesPerSample, int channels, int samplesPerSec,
byte[] buffer, long renderTimeMs, int avsync_type)
{
this.type = type;
this.samplesPerChannel = samplesPerChannel;
this.bytesPerSample = bytesPerSample;
this.channels = channels;
this.samplesPerSec = samplesPerSec;
this.RawBuffer = buffer;
this.renderTimeMs = renderTimeMs;
this.avsync_type = avsync_type;
}
public AUDIO_FRAME_TYPE type { set; get; }
public int samplesPerChannel { set; get; }
public BYTES_PER_SAMPLE bytesPerSample { set; get; }
public int channels { set; get; }
public int samplesPerSec { set; get; }
public byte[] RawBuffer { set; get; }
public long renderTimeMs { set; get; }
public int avsync_type { set; get; }
}属性
| 参数名 | 描述 |
|---|---|
type | 音频帧类型,详见 AUDIO_FRAME_TYPE。 |
samplesPerChannel | |
bytesPerSample | |
channels | |
samplesPerSec | |
RawBuffer | |
renderTimeMs | |
avsync_type |