I have an AudioQueueBufferRef datatype and I want to allocate memory for the buffers but I don't want to associate it with the queue. Hence, I can't use AudioQueueAllocateBufferWithPacketDescription. What is the general way of allocating memory to开发者_如何学运维 any buffer?
I tried malloc but it didn't work
for(i=0;i<numBuffers;i++){ AudBuf[i] = (AudioQueueBufferRef)malloc(sizeof(AudioQueueBuffer));
}
Have a look at the AudioFileStreamExample from apple.
AudioQueueBuffer dummyAQB;
audioQueueBuffer = malloc(sizeof(dummyAQB)*kNumAQBufs);
精彩评论