もちろん、話すことはできますが自信を持ってこれは私のクライアントのための仕事であり、彼は外部の機能や橋渡しを要求しなかった。だから私はFoundationへの参照なしにオーディオキューコンポーネントを構築しなければならなかった。レコードの
、私はちょうどこれをやってsuccedeed:
const char *home = getenv("HOME");
const char *subdir = "/Documents/";
const char *file = "recordedFile.caf";
char *recPath = (char*)(calloc(strlen(home) + strlen(subdir)
+ strlen(file) + 1, sizeof(char)));
strcpy(recPath, home); // copy string one into the result.
strcat(recPath, subdir); // append string two to the result.
strcat(recPath, file); // append string three to the result.
//recordFilePath is our CFStringRef
recordFilePath = CFStringCreateWithCString(0, recPath, kCFStringEncodingUTF8);
//recorder is an AQRecorder class like the one from SpeakHere code sample
recorder->StartRecord(recordFilePath);
をそのは、iPhone上で実行するものであれば、あなたが財団のAPIを使用することはできませんなぜあなたは説明できますか? – abidon
これはCocos2d-xでコンパイルする必要があるためです。 – CttPla
これは私が探していたものだと思いますが、まだ有効な場合: http://stackoverflow.com/questions/13469342/using-c-to-access-documents-folder-on-ios – CttPla