1

我想用这种方法读取AudioFileID然后写入它的末尾(使其循环):

        UInt64 outDataSize = 0;
        UInt32 thePropSize = sizeof(UInt64);
        OSStatus result = AudioFileGetProperty(mBackupRecordFile, kAudioFilePropertyAudioDataByteCount, &thePropSize, &outDataSize);

        UInt32 readPoint  = outDataSize;
        void* theData = malloc(outDataSize);

        OSStatus result2 = AudioFileReadBytes(mBackupRecordFile, FALSE, 0, &readPoint, theData);

        UInt32 writeBytes = readPoint;

        OSStatus result3 = AudioFileWriteBytes(mBackupRecordFile, FALSE, readPoint, &writeBytes, theData);

问题是在 result3 中我得到一个大数字而不是 0 并且文件不会增加。result3 的值为 1869627199 = kAudioFileOperationNotSupportedError

4

0 回答 0