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

📄 devicespeakerimpl.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:   DeviceSpeakerImpl.java

package android.speech.recognition.impl;

import android.speech.recognition.*;

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

public class DeviceSpeakerImpl extends DeviceSpeaker
    implements Runnable
{

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

    public void run()
    {
        dispose();
    }

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

    public void start(AudioStream source)
    {
        startProxy(source);
    }

    public void stop()
    {
        stopProxy();
    }

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

    public void setListener(DeviceSpeakerListener listener)
    {
        locallistener = listener;
        setListenerProxy(listener);
    }

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

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

    private native long initNativeObject();

    private native void startProxy(AudioStream audiostream);

    private native void stopProxy();

    private native void setCodecProxy(Codec codec);

    private native void setListenerProxy(DeviceSpeakerListener devicespeakerlistener);

    private native void deleteNativeObject();

    private static DeviceSpeakerImpl instance;
    private long nativeObject;
    private DeviceSpeakerListener locallistener;
}

⌨️ 快捷键说明

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