文档详情

iOS音视频介绍.pdf

发布:2017-09-23约5.52千字共27页下载文档
文本预览下载声明
iOS • • iOS • • iOS • (PCM) • • (bit per sample): . signed 16bit, float. • (sample rate): • (channel): • (mono) (Stereo) • interleave/non-interleave • (frame) In audio data a frame is one sample across all channels. iOS • struct AudioStreamBasicDescription • mSampleRate:The number of frames per second of the data in the stream • mFormatID:An identifier specifying the general audio data format in the stream. (kAudioFormatLinearPCM, etc.) • mFormatFlags:Format-specific flags to specify details of the format.(kLinearPCMFormatFlagIsSignedInteger, kLinearPCMFormatFlagIsFloat, kLinearPCMFormatFlagIsBigEndian, kLinearPCMFormatFlagIsPacked, kLinearPCMFormatFlagIsNonInterleaved, etc.) • mChannelsPerFrame: • mBitsPerChannel: • mBytesPerFrame: • mFramesPerPacket: • mBytesPerPacket: • mReserved: alignment, 0 int kCaptureFormat_SampleRate = 16000; int kCaptureFormat_FormatID = kAudioFormatLinearPCM; int kCaptureFormat_FormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; int kCaptureFormat_FramesPerPacket = 1; int kCaptureFormat_ChannelsPerFrame = 1; int kCaptureFormat_BytesPerFrame = kCaptureFormat_ChannelsPerFrame * sizeof(SInt16); int kCaptureFormat_BytesPerPacket = kCaptureFormat_BytesPerFrame * kCaptureFormat_FramesPerPacket; int kCaptureFormat_BitsPerChannel = 8 * sizeof(SInt16); iOS • Audio Session Ser
显示全部
相似文档