美好的一天精彩的電腦人們的地球!請求會員______這是非班級類型
這裏是一個叫AudioQueue.h文件的結構:
typedef struct AudioQueueBuffer {
const UInt32 mAudioDataBytesCapacity;
void * const mAudioData;
UInt32 mAudioDataByteSize;
void * mUserData;
const UInt32 mPacketDescriptionCapacity;
AudioStreamPacketDescription * const mPacketDescriptions;
UInt32 mPacketDescriptionCount;
#ifdef __cplusplus
AudioQueueBuffer() : mAudioDataBytesCapacity(0), mAudioData(0), mPacketDescriptionCapacity(0), mPacketDescriptions(0) { }
#endif
} AudioQueueBuffer;
/*!
@typedef AudioQueueBufferRef
@abstract An pointer to an AudioQueueBuffer.
*/
typedef AudioQueueBuffer *AudioQueueBufferRef;
再後來就沒有這AudioPlayer.h頭:
AudioQueueBufferRef mBuffers[kNumberBuffers];
然後呢我m試圖做的:
for (int i = 0; i < kNumberBuffers; ++i) {
printf("%i\n", &mBuffers[i].mAudioData);
XThrowIfError(AudioQueueAllocateBufferWithPacketDescriptions(mQueue, bufferByteSize, (isFormatVBR ? mNumPacketsToRead : 0), &mBuffers[i]), "AudioQueueAllocateBuffer failed");
基本上我試圖訪問mAudioData中的信息,但得到的錯誤:
request for member 'mAudioData' in '((AQPlayer*)this)->AQPlayer::mBuffers[i]', which is of non-class type 'AudioQueueBuffer*'
任何幫助非常感謝!
也許這是一個運算符優先級的錯誤?嘗試 - >而不是。訪問mAudioData。 – 2011-02-03 12:11:56