views:

9

answers:

0

Hi, I'm trying to create an application that allows multiple recording to take place. In order for that to happen, I have to include a counter and add a variable to my recording file. The problem is - my counter seems to work but it is not captured when recording take place. Any suggestions?

- (IBAction)record:(id)sender
{
 if (recorder->IsRunning()) // If we are currently recording, stop and save the file.
 {
  [self stopRecord];
 }
 else // If we're not recording, start.
 {  
  btn_play.enabled = NO; 
  NSString* file = [NSString stringWithFormat:@"recordedFile2%i.caf", counter];
    NSLog(file);
  NSLog(filePath);
  // Set the button's state to "stop"
  btn_record.title = @"Berhenti";

  // Start the recorder

  CFStringRef aCFString = (CFStringRef)file;
  NSLog(file);

  recorder->StartRecord(aCFString);

Also, my files don't seem to be saved I don't know what the problem is:

filePath = [NSTemporaryDirectory() stringByAppendingPathComponent: @"recordedFile2%i.caf"];