You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: portaudio.rs
    path of file: ./repos/jarvis/app/src/recorder
    
    the code of the file until where you have to start completion: /*
    Abandoned temporary.
*/

use portaudio as pa;
use pa::{DeviceIndex, Stream};
use log::{info, warn, error};

use once_cell::sync::OnceCell;
use std::sync::{Arc, Mutex};
u
    
pub fn start_recording(device_index: i32, frame_length: u32) {
    // ensure microphone is initialized
    init_microphone(device_index, frame_length);

    // start recording
    RECORDER.with(|r| {
        r.get().unwrap().load().lock().unwrap().start().expect("Failed to start audio recording!");
        IS_RECORDING.store(true, Ordering::SeqCst);
        info!("START recording from microphone ...");
    });
}