1
我似乎無法繞過這個問題。試圖玩音頻文件流服務。Xcode 7 - 無法調用AudioFileStreamOpen
一些代碼:
import Foundation
import AudioToolbox
public class StreamingPlayback {
var audioFileStream: UnsafeMutablePointer<AudioFileStreamID>?
var inClientData: UnsafeMutablePointer<Void> = nil
init() {
}
func start() {
AudioFileStreamOpen(&inClientData, propertyProc, packetProc, kAudioFileMP3Type, &audioFileStream)
}
func propertyProc(inClientData: UnsafeMutablePointer<()>,inFileStreamId: AudioFileStreamID,inPropertyId: AudioFileStreamPropertyID,ioFlags: UnsafeMutablePointer<UInt32>) -> Void {
}
func packetProc(inClientData: UnsafeMutablePointer<()>,inNumberOfBytes: UInt32,inNumberOfPackets: UInt32, UnsafeMutablePointer<()>, inPacketDescriptions: UnsafePointer<AudioStreamPacketDescription>) -> Void {
}
}
這給了我:
Cannot invoke 'AudioFileStreamOpen' with an argument list of type '(inout UnsafeMutablePointer<Void>, (UnsafeMutablePointer<()>, inFileStreamId: AudioFileStreamID, inPropertyId: AudioFileStreamPropertyID, ioFlags: UnsafeMutablePointer<UInt32>) -> Void, (UnsafeMutablePointer<()>, inNumberOfBytes: UInt32, inNumberOfPackets: UInt32, UnsafeMutablePointer<()>, inPacketDescriptions: UnsafePointer<AudioStreamPacketDescription>) -> Void, AudioFileTypeID, inout UnsafeMutablePointer<AudioFileStreamID>?)'
Expected an argument list of type '(UnsafeMutablePointer<Void>, AudioFileStream_PropertyListenerProc, AudioFileStream_PacketsProc, AudioFileTypeID, UnsafeMutablePointer<AudioFileStreamID>)'
誰能告訴我什麼,我做錯了什麼?
我可以步行通過這個通過Skype /電子郵件/ FB使者。如果你願意的話,也很樂意談論音頻流/迅速。這個組合有很多障礙,只有一個知道與這兩者合作的小社區。你的聯繫信息是什麼? – 3254523