¡@

Home 

2014/10/15 ¤U¤È 10:13:18

iphone Programming Glossary: reportaudioerror

AudioQueue how to find out playback length of queued data

http://stackoverflow.com/questions/7375309/audioqueue-how-to-find-out-playback-length-of-queued-data

corresponds to seconds of audio NSData getNextDataChunk int seconds @end Implementation #import MusicChunker.h void ReportAudioError OSStatus statusCode @implementation MusicChunker id init self super init if self Initialization code here. return self void.. statusCode @implementation MusicChunker id init self super init if self Initialization code here. return self void ReportAudioError OSStatus statusCode switch statusCode case noErr break case kAudioFileUnspecifiedError NSException raise @ AudioFileUnspecifiedError.. ext OSStatus theErr AudioFileOpenURL CFURLRef url kAudioFileReadPermission hint audioFile if theErr ReportAudioError theErr UInt32 thePropertySize sizeof theFileFormat thePropertySize sizeof fileDataSize theErr AudioFileGetProperty audioFile..