6

AVCaptureAudioDataOutput に次の audioSettings を設定したいのですが、どうすればよいですか?

NSMutableDictionary *recordSettings = [[NSMutableDictionary alloc] initWithCapacity:10];
    [recordSettings setObject:[NSNumber numberWithInt: kAudioFormatLinearPCM] forKey: AVFormatIDKey];
    [recordSettings setObject:[NSNumber numberWithFloat:44100] forKey: AVSampleRateKey];
    [recordSettings setObject:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey];
    [recordSettings setObject:[NSNumber numberWithInt:705600] forKey:AVEncoderBitRateKey];
    [recordSettings setObject:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];

self.audioRecorder = [[[ AVAudioRecorder alloc] initWithURL:[NSURL fileURLWithPath:self.audioRecorderDestinationFilePath] settings:recordSettings error:nil]autorelease];

[recordSettings リリース];

4

0 に答える 0