Created
July 19, 2019 01:30
-
-
Save SunXiaoShan/a11a67c7e4a0dfc6904cb819b7971bef to your computer and use it in GitHub Desktop.
AudioToolbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const UInt32 maxBufferSize = 0x10000; | |
static const UInt32 minBufferSize = 0x4000; | |
static const UInt32 maxBufferNum = 3; | |
@interface AudioPlayerManager() { | |
AudioFileID _audioFile; | |
AudioStreamBasicDescription _dataFormat; | |
AudioQueueRef _queue; | |
UInt32 numPacketsToRead; | |
AudioStreamPacketDescription *packetDescs; | |
AudioQueueBufferRef buffers[maxBufferNum]; | |
SInt64 packetIndex; | |
UInt32 maxPacketSize; | |
UInt32 outBufferSize; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment