public virtual bool Record(float duration)
    {
        currentlyRecording = true;
        bool didRecord = false;

#if AUDIO_RECORDER_USE_UNITY
        currentRecordedClip = Microphone.Start(currentDeviceName, false, (int)duration, 44100);
        didRecord           = true;
#elif
#if UNITY_STANDALONE_OSX
#elif UNITY_STANDALONE_WIN
#elif UNITY_ANDROID
        string pathAndroid = FilterPersistentPathAndroid(GetPersistentPath(currentFileName));
        LogUtil.Log("currentFileName pathAndroid: " + pathAndroid);
        AudioRecorderAndroid.startRecording(pathAndroid);
        didRecord = true;
#elif UNITY_WEBPLAYER
#elif UNITY_IPHONE
        didRecord              = AudioRecorderBinding.recordForDuration(duration);
        currentlyRecording     = false;
        lastRecordingSucceeded = didRecord;
#elif UNITY_EDITOR
#endif
#endif
        LogUtil.Log("Record: " + didRecord);
        return(didRecord);
    }
    public virtual void Pause()
    {
#if AUDIO_RECORDER_USE_UNITY
        Microphone.End(currentDeviceName);
#elif
#if UNITY_STANDALONE_OSX
#elif UNITY_STANDALONE_WIN
#elif UNITY_ANDROID
        AudioRecorderAndroid.pause();
#elif UNITY_WEBPLAYER
#elif UNITY_IPHONE
        AudioRecorderBinding.pause();
#elif UNITY_EDITOR
#endif
#endif
    }
    public virtual void Stop(bool finish)
    {
#if AUDIO_RECORDER_USE_UNITY
        Microphone.End(currentDeviceName);
        AudioSystem.Save(currentFileName, currentRecordedClip);
#elif
#if UNITY_STANDALONE_OSX
#elif UNITY_STANDALONE_WIN
#elif UNITY_ANDROID
        AudioRecorderAndroid.stopRecording();
#elif UNITY_WEBPLAYER
#elif UNITY_IPHONE
        AudioRecorderBinding.stop(finish);
#elif UNITY_EDITOR
#endif
#endif
        LogUtil.Log("Stop finish: " + finish);
    }