Note that there are some explanatory texts on larger screens.

plurals
  1. POrecord input coming from bluetooth headset in iPhone
    text
    copied!<p>I have a project in which I have to record the voice coming from bluetooth headset and play with default iPhone speaker. I have searched a lot and got this code.</p> <pre><code>UInt32 allowBluetoothInput = 1; AudioSessionSetProperty ( kAudioSessionProperty_OverrideCategoryEnableBluetoothInput, sizeof (allowBluetoothInput), &amp;allowBluetoothInput ); </code></pre> <p>------------ CODE FOR AUDIO RECORDER START AND STOP ------------</p> <pre><code>- (IBAction)Record: (id)sender { UIButton *btn = (UIButton *)sender; if([btn isSelected]) { [audioRecorder stop]; [btn setSelected:NO]; [btn setTitle:@"Start Recording" forState:UIControlStateNormal]; } else { [audioRecorder record]; [btn setSelected:YES]; [btn setTitle:@"Stop Recording" forState:UIControlStateNormal]; } } </code></pre> <p>and i am using avaudiorecorder after this. There seems to be something else I am missing in here.</p> <p>-------- Code for audio recorder ---------</p> <pre><code>NSURL *soundFileURL = [NSURL fileURLWithPath:AUDIO_FILE]; NSDictionary *recordSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey, [NSNumber numberWithInt:16], AVEncoderBitRateKey, [NSNumber numberWithInt: 2], AVNumberOfChannelsKey, [NSNumber numberWithFloat:44100.0], AVSampleRateKey, nil]; NSError *error = nil; audioRecorder = [[AVAudioRecorder alloc] initWithURL:soundFileURL settings:recordSettings error:&amp;error]; if (error) { NSLog(@"error: %@", [error localizedDescription]); } else { [audioRecorder prepareToRecord]; } </code></pre> <p>I think i am missing something else which needs to be added here. I just want the bluetooth headset input audio. Any help would be appreciated.</p> <p>Thanks in Advance!!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload