0
我設置我的網址與記錄:設置記錄的NSDocumentDirectory url?
NSArray *dirPaths;
NSString *docsDir;
dirPaths = NSSearchPathForDirectoriesInDomains(
NSDocumentDirectory, NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:[globals sharedGlobals].folderCounter];
NSString *soundFilePath = [docsDir
stringByAppendingPathComponent:@"sound1.caf"];
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath];
時[globals sharedGlobals].folderCounter
爲0時開始,它的工作原理。 接下來的時間我記錄我做它在另一個指標:
[globals sharedGlobals].folderCounter=[globals sharedGlobals].folderCounter+1;
所以在接下來的時間我試圖記錄我得到錯誤:
index 1 beyond bounds [0 .. 0]
但爲什麼不能我創建一個新的地方錄音?我想有4個文件夾1-2-3-4,並且每次錄製另一個文件夾。
我該怎麼做?
謝謝。