TuSDKAudioTrackInfo Class Reference
Inherits from | NSObject |
---|---|
Declared in | TuSDKAudioInfo.h |
+ trackInfoWithAudioAssetTrack:
TuSDKAudioTrackInfo
+ (instancetype)trackInfoWithAudioAssetTrack:(AVAssetTrack *)audioTrack
Parameters
audioTrack |
AVAssetTrack |
---|
Return Value
TuSDKAudioTrackInfo
Declared In
TuSDKAudioInfo.h
– initWithCMAudioFormatDescriptionRef:
根据 CMAudioFormatDescriptionRef 初始化 TuSDKAudioTrackInfo
- (instancetype)initWithCMAudioFormatDescriptionRef:(CMAudioFormatDescriptionRef)audioFormatDescriptionRef
Parameters
audioFormatDescriptionRef |
CMAudioFormatDescriptionRef |
---|
Return Value
TuSDKAudioTrackInfo
Declared In
TuSDKAudioInfo.h
audioFormatDescriptionRef
audio track format description
@property (nonatomic) CMAudioFormatDescriptionRef audioFormatDescriptionRef
Declared In
TuSDKAudioInfo.h
sampleRate
The number of frames per second of the data in the stream, when the stream is played at normal speed. For compressed formats, this field indicates the number of frames per second of equivalent decompressed data.
@property (nonatomic) Float64 sampleRate
Discussion
To determine the duration represented by one packet, use the mSampleRate field with the mFramesPerPacket field, as follows:
duration = (1 / mSampleRate) * mFramesPerPacket
Declared In
TuSDKAudioInfo.h
channelsPerFrame
The number of channels in each frame of audio data. This value must be nonzero. 声道数
@property (nonatomic) UInt32 channelsPerFrame
Declared In
TuSDKAudioInfo.h
framesPerPacket
每个packet的中frame的个数,等于这个packet中经历了几次采样间隔。
@property (nonatomic, readonly) UInt32 framesPerPacket
Declared In
TuSDKAudioInfo.h
bytesPerPacket
The number of bytes in a packet of audio data. To indicate variable packet size, set this field to 0. For a format that uses variable packet size, specify the size of each packet using an AudioStreamPacketDescription structure. 每个packet中数据字节数
@property (nonatomic, readonly) UInt32 bytesPerPacket
Declared In
TuSDKAudioInfo.h
bitsPerChannel
The number of bits of sample data for each channel in a frame of data. 语音每采样点占用位数[8/16/24/32], eg. 16
@property (nonatomic) UInt32 bitsPerChannel
Declared In
TuSDKAudioInfo.h