0

Im experiencing some issues related to playback of some wav files. I added the wav files earlier by drag-and-dropping them into my Supporting files folder. Now for some reason it will always play the sound of one particular file i tested earlier, and nothing else.

The wierd thing is that i deleted all the files and moved them to the trashbin - but still the same file will playback. It doesnt even exist! Any ideas how i can fix this? I tried Product > Clean already, and that didnt help. Here is a part of my code that I use to play the sound with:

//initiate sound
SystemSoundID completeSound = nil;

//yellow folder doesnt need folder
//blue folder (true folder) will need to use subdirectory:@"dirname"
NSURL *audioPath = [[NSBundle mainBundle] URLForResource:target_sound_filename withExtension:@"wav"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound);
AudioServicesPlaySystemSound (completeSound);
4

2 回答 2

1

一种最佳解决方案是:也从垃圾箱中删除 wav 文件..然后尝试从模拟器/设备中删除应用程序..然后完全关闭 xcode.restart it.clean 项目,然后检查您的 wav 文件是否无法播放。

于 2013-06-17T16:18:46.850 回答
1

退出 Xcode 并重新启动它。还要从设备或模拟器中删除应用程序并重新部署它。

于 2013-06-17T16:17:46.220 回答