tags:

views:

27

answers:

1

Hi Guys,

     Here I am getting the Exception when I am setting the recordsetting in AvAudioRecord.

The code I written is as:

I created a button named Record and in the action I used the code as... I imported the audio file sound.caf

     [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryRecord error: nil];

    NSDictionary *recordSettings; =[[NSDictionary alloc] initWithObjectsAndKeys:

     [NSNumber numberWithFloat: 44100.0], AVSampleRateKey,

     [NSNumber numberWithInt: kAudioFormatAppleLossless], AVFormatIDKey,

     [NSNumber numberWithInt: 1], AVNumberOfChannelsKey,

     [NSNumber numberWithInt: AVAudioQualityMax],

     AVEncoderAudioQualityKey,nil];



    AVAudioRecorder *newRecorder =[[AVAudioRecorder alloc] initWithURL: soundFileURL settings: recordSettings error: nil];

    [recordSettings release];

    self.soundRecorder = newRecorder;

    [newRecorder release];

Anyone's help will be much appreciated.

Thank you, Monish Calapatapu.

A: 

Remove the line

[newRecorder release];
Tuomas Pelkonen