【发布时间】:2010-03-19 09:49:00
【问题描述】:
所以,我正在完成一个 iPhone 应用程序。
我有以下代码来播放文件:
while(![player isPlaying]) {
totalSoundDuration = soundDuration + 0.5; //Gives a half second break between sounds
sleep(totalSoundDuration); //Don't play next sound until the previous sound has finished
[player play]; //Play sound
NSLog(@" \n Sound Finished Playing \n"); //Output to console
}
由于某种原因,声音播放一次,然后代码循环并输出以下内容:
Sound Finished Playing
Sound Finished Playing
Sound Finished Playing
etc...
这只会永远重复,我想你们这些可爱的人都无法理解这可能是什么?
干杯!
【问题讨论】:
标签: iphone objective-c xcode iphone-sdk-3.0