⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 microphoneimpl.java

📁 goolge phone 目前没有开放的android 平台的源码
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   MicrophoneImpl.java

package android.speech.recognition.impl;

import android.speech.recognition.*;

// Referenced classes of package android.speech.recognition.impl:
//            AudioStreamImpl, System

public class MicrophoneImpl extends Microphone
    implements Runnable
{

    private MicrophoneImpl()
    {
        System.getInstance().register(this);
        nativeObject = initNativeObject();
    }

    public void run()
    {
        dispose();
    }

    public static MicrophoneImpl getInstance()
    {
        if(instance == null)
            instance = new MicrophoneImpl();
        return instance;
    }

    public void setCodec(Codec recordingCodec)
    {
        setCodecProxy(recordingCodec);
    }

    public void setListener(MicrophoneListener listener)
    {
        setListenerProxy(listener);
    }

    public AudioStream createAudio()
    {
        return new AudioStreamImpl(createAudioProxy());
    }

    public void start()
    {
        startProxy();
    }

    public void stop()
    {
        stopProxy();
    }

    private void dispose()
    {
        if(nativeObject != 0L)
        {
            deleteNativeObject();
            nativeObject = 0L;
            instance = null;
        }
    }

    protected void finalize()
        throws Throwable
    {
        dispose();
        super.finalize();
    }

    private native long initNativeObject();

    private native void setCodecProxy(Codec codec);

    private native void setListenerProxy(MicrophoneListener microphonelistener);

    private native long createAudioProxy();

    private native void startProxy();

    private native void stopProxy();

    private native void deleteNativeObject();

    private static MicrophoneImpl instance;
    private long nativeObject;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -