亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? playermodelimpl.java

?? 使用Exlipse編寫的一個語音程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
     *     * @return the volume, or -1 if unknown, or an error occurred     */    public float getVolume() {	try {	    float adjustedVolume =		synthesizer.getSynthesizerProperties().getVolume();	    if (adjustedVolume < 0.5) {		volume = 0;	    } else {		volume = (float) ((adjustedVolume - 0.5) * 20);	    }	} catch (Exception e) {	    e.printStackTrace();	} 	return volume;    }        /**     * Sets the volume, in the range of 0 to 10.     *     * @param volume the new volume     *     * @return true if new volume is set; false otherwise     */    public boolean setVolume(float volume) {	try {	    float adjustedVolume = (float) (volume/20 + 0.5);	    if (synthesizer != null) {		synthesizer.getSynthesizerProperties().setVolume		    (adjustedVolume);		this.volume = volume;		return true;	    } else {		this.volume = volume;		return false;	    }	} catch (PropertyVetoException pve) {	    try {		synthesizer.getSynthesizerProperties().setVolume(this.volume);	    } catch (PropertyVetoException pe) {		pe.printStackTrace();	    }	    return false;	}    }                    /**     * Returns the speaking rate.     *     * @return the speaking rate, or -1 if unknown or an error occurred     */    public float getSpeakingRate() {	if (synthesizer != null) {	    return synthesizer.getSynthesizerProperties().getSpeakingRate();	} else {	    return -1;	}    }	    /**     * Sets the speaking rate in terms of words per minute.     *     * @param wordsPerMin the new speaking rate     *     * @return the speaking rate, or -1 if unknown or an error occurred     */    public boolean setSpeakingRate(float wordsPerMin) {	float oldSpeed = getSpeakingRate();	SynthesizerProperties properties =	    synthesizer.getSynthesizerProperties();	try {	    properties.setSpeakingRate(wordsPerMin);	    return true;	} catch (PropertyVetoException pve) {	    try {		properties.setSpeakingRate(oldSpeed);	    } catch (PropertyVetoException pe) {		pe.printStackTrace();	    }	    return false;	}    }	    /**     * Returns the baseline pitch for the current synthesis voice.     *     * @return the baseline pitch for the current synthesis voice     */    public float getPitch() {	return synthesizer.getSynthesizerProperties().getPitch();    }	    /**     * Sets the baseline pitch for the current synthesis voice.     *     * @param pitch the baseline pitch     *     * @return true if new pitch is set; false otherwise     */    public boolean setPitch(float pitch) {	float oldPitch = getPitch();	try {	    synthesizer.getSynthesizerProperties().setPitch(pitch);	    return true;	} catch (PropertyVetoException pve) {	    try {		synthesizer.getSynthesizerProperties().setPitch(oldPitch);	    } catch (PropertyVetoException pe) {		pe.printStackTrace();	    }	    return false;	}    }        /**     * Returns the pitch range for the current synthesis voice.     *     * @return the pitch range for the current synthesis voice     */    public float getRange() {	return synthesizer.getSynthesizerProperties().getPitchRange();    }        /**     * Sets the pitch range for the current synthesis voice.     *     * @param range the pitch range     *     * @return true if new range is set; false otherwise     */    public boolean setRange(float range) {	float oldRange = getRange();	try {	    synthesizer.getSynthesizerProperties().setPitchRange(range);	    return true;	} catch (PropertyVetoException pve) {	    try {		synthesizer.getSynthesizerProperties().setPitchRange(oldRange);	    } catch (PropertyVetoException pe) {		pe.printStackTrace();	    }	    return false;	}    }             /**     * Sets the list of voices using the given Synthesizer mode description.     *     * @param modeDesc the synthesizer mode description     */    public void setVoiceList(SynthesizerModeDesc modeDesc) {	Voice[] voices = modeDesc.getVoices();	voiceList.removeAllElements();	for (int i = 0; i < voices.length; i++) {	    voiceList.addElement(new MyVoice(voices[i].getName(),					     voices[i].getGender(),					     voices[i].getAge(),					     voices[i].getStyle()));	}    }    /**     * Returns the play list.     *     * @return the play list     */    public ListModel getPlayList() {	return playList;    }    /**     * Returns the list of voices.     *     * @return the list of voices     */    public ListModel getVoiceList() {	return voiceList;    }    /**     * Returns the list synthesizers     *     * @return the synthesizer list     */    public ListModel getSynthesizerList() {	return synthesizerList;    }        /**     * Returns the Playable object at the given index of the play list.     *     * @return the Playable object     */    public Object getPlayableAt(int index) {	return null;    }        /**     * Adds the given Playable object to the end of the play list.     *     * @param playable the Playable object to add     */    public void addPlayable(Playable playable) {	playList.addElement(playable);    }    /**     * Removes the playable at the given position from the list     *     * @param index the index of the Playable to remove     */    public void removePlayableAt(int index) {	if (index < playList.getSize()) {	    playList.removeElementAt(index);	}    }    /**     * Prints debug statements.     *     * @param statement debug statements     */    public static void debugPrint(String statement) {	if (debug) {	    System.out.println(statement);	}    }}/** * A Voice that implements the <code>toString()</code> method so that * it returns the name of the person who owns this Voice. */class MyVoice extends Voice {    /**     * Constructor provided with voice name, gender, age and style.     *     * @param name the name of the person who owns this Voice     * @param gender the gender of the person     * @param age the age of the person     * @param style the style of the person     */    public MyVoice(String name, int gender, int age, String style) {	super(name, gender, age, style);    }    /**     * Returns the name of the person who owns this Voice.     *     * @param String the name of the person     */    public String toString() {	return getName();    }}/** * A SynthesizerModeDesc that implements the <code>toString()</code> * method so that it returns the name of the synthesizer. */class MySynthesizerModeDesc extends SynthesizerModeDesc {    private PlayerModel playerModel = null;    private Synthesizer synthesizer = null;    private Monitor monitor = null;    private boolean synthesizerLoaded = false;        /**     * Constructs a MySynthesizerModeDesc with the attributes from     * the given SynthesizerModeDesc.     *     * @param modeDesc the SynthesizerModeDesc to get attributes from     */    public MySynthesizerModeDesc(SynthesizerModeDesc modeDesc,				 PlayerModel playerModel) {	super(modeDesc.getEngineName(), modeDesc.getModeName(),	      modeDesc.getLocale(), modeDesc.getRunning(), 	      modeDesc.getVoices());	this.playerModel = playerModel;    }            /**     * Returns true if the synthesizer is already loaded.     *     * @return true if the synthesizer is already loaded     */    public synchronized boolean isSynthesizerLoaded() {	if (synthesizer == null) {	    return false;	}	return ((synthesizer.getEngineState() & Engine.ALLOCATED) != 0);    }            /**     * Returns a Synthesizer that fits the description of this     * MySynthesizerModeDesc. If the synthesize was never loaded,     * it is loaded in a separate thread.     *     * @return a Synthesizer     */    public synchronized Synthesizer getSynthesizer() {	debugPrint("MyModeDesc.getSynthesizer(): " + getEngineName());	return synthesizer;    }    /**     * Creates the Synthesizer and its Monitor.     *     * @return the created Synthesizer     */    public Synthesizer createSynthesizer() {	try {	    debugPrint("Creating " + getEngineName() + "...");	    synthesizer = Central.createSynthesizer(this);	    	    if (synthesizer == null) {		System.out.println("Central created null synthesizer");	    } else {		synthesizer.allocate();		synthesizer.resume();		monitor = new Monitor(synthesizer, getEngineName());		debugPrint("...created monitor");	    }	} catch (Exception e) {	    e.printStackTrace();	} 	return synthesizer;    }        /**     * Allocates the synthesizer if it has never been allocated. This     * method should be called after method <code>createSynthesizer()</code>.     * It spawns a new thread to allocate the synthesizer.     */    public Synthesizer loadSynthesizer() {	try {	    if (!synthesizerLoaded) {		debugPrint("Loading " + getEngineName() + "...");		synthesizerLoaded = true;		SynthesizerLoader loader = new SynthesizerLoader		    (synthesizer, this);		loader.start();	    }	} catch (Exception e) {	    e.printStackTrace();	}	return synthesizer;    }    /**     * Returns the Monitor of this Synthesizer.     *     * @return the Monitor     */    public synchronized Monitor getMonitor() {	if (monitor == null) {	    createSynthesizer();	}	return monitor;    }        /**     * Returns the PlayerModel.     *     * @return the PlayerModel     */    public PlayerModel getPlayerModel() {	return playerModel;    }        /**     * Returns the name of the Synthesizer.     *     * @return the name of the Synthesizer     */    public String toString() {	return getEngineName();    }        /**     * Prints debug statements.     *     * @param statement debug statements     */    private void debugPrint(String statement) {	PlayerModelImpl.debugPrint(statement);    }}/** * A Thread that loads the Synthesizer. */class SynthesizerLoader extends Thread {    private Synthesizer synthesizer;    private MySynthesizerModeDesc modeDesc;    private PlayerModel playerModel;           /**     * Constructs a SynthesizerLoaded which loads the given Synthesizer.     *     * @param synthesizer the Synthesizer to load     * @param modeDesc the MySynthesizerModeDesc from which we can retrieve     *    the PlayerModel     */    public SynthesizerLoader(Synthesizer synthesizer,			     MySynthesizerModeDesc modeDesc) {	this.synthesizer = synthesizer;	this.modeDesc = modeDesc;	this.playerModel = modeDesc.getPlayerModel();    }        /**     * Implements the <code>run()</code> method of the Thread class.     */    public void run() {	try {	    System.out.println("allocating...");	    synthesizer.allocate();	    System.out.println("...allocated");	    synthesizer.resume();	    System.out.println("...resume");	    playerModel.setVoiceList(modeDesc);	} catch (Exception e) {	    e.printStackTrace();	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合av第一页| 91啪亚洲精品| 99精品国产热久久91蜜凸| 欧美日本乱大交xxxxx| 国产三级精品三级| 婷婷综合久久一区二区三区| 国产99久久久国产精品潘金网站| 欧美日韩精品一区二区三区四区| 欧美国产1区2区| 久久99精品国产麻豆婷婷| 91福利在线播放| 国产欧美一区二区精品婷婷| 日韩高清不卡一区二区| 色视频一区二区| 中文一区二区完整视频在线观看| 日韩vs国产vs欧美| 欧美日韩一级黄| 亚洲精选视频免费看| 成人小视频免费在线观看| 日韩精品一区二区三区四区视频| 亚洲一区二区三区四区的| 91亚洲资源网| 中文字幕不卡一区| 国产精品1区2区| 亚洲精品在线三区| 美日韩黄色大片| 91精品国产品国语在线不卡| 亚洲高清三级视频| 久久久一区二区三区捆绑**| 欧美日韩精品电影| 亚洲va韩国va欧美va| 欧洲国产伦久久久久久久| 一区二区三区在线免费观看| 91免费视频网址| 亚洲日本在线视频观看| 91麻豆精品在线观看| 亚洲人成网站精品片在线观看| 国产99精品国产| 中文字幕二三区不卡| 成人高清视频在线| 成人免费一区二区三区在线观看| 成人不卡免费av| 亚洲免费在线电影| 欧美在线观看视频一区二区 | 欧洲生活片亚洲生活在线观看| 中文字幕中文字幕在线一区| 99久久国产综合色|国产精品| 国产精品久久久久久亚洲毛片 | 欧美大片日本大片免费观看| 免费看日韩精品| 精品999久久久| 暴力调教一区二区三区| 亚洲激情男女视频| 91精品在线观看入口| 国产一区二区精品久久91| 国产精品视频线看| 欧美亚洲一区二区三区四区| 日韩成人一区二区| 亚洲国产高清aⅴ视频| 99久久国产综合精品色伊| 亚洲综合久久av| 欧美成人一区二区| 成人综合日日夜夜| 午夜欧美在线一二页| 久久综合色之久久综合| 91猫先生在线| 美女性感视频久久| 国产精品久久久久三级| 4438成人网| 国产福利一区二区三区视频 | 欧美专区在线观看一区| 免费看欧美女人艹b| 国产精品福利电影一区二区三区四区| 在线一区二区视频| 蜜桃免费网站一区二区三区| 国产欧美精品国产国产专区| 欧美综合色免费| 丰满亚洲少妇av| 日日摸夜夜添夜夜添国产精品| 久久精品人人做人人爽97| 欧美在线啊v一区| 岛国精品在线播放| 麻豆精品视频在线观看免费| 亚洲精品国产一区二区精华液| 国产欧美视频一区二区三区| 91黄色免费版| 国产成人午夜99999| 奇米综合一区二区三区精品视频| 亚洲视频在线一区观看| xnxx国产精品| 91精品国产黑色紧身裤美女| 色乱码一区二区三区88| 国产不卡在线视频| 日本女人一区二区三区| 综合电影一区二区三区| 国产亚洲精品超碰| 日韩欧美一级片| 欧美性三三影院| 一本久久精品一区二区| 成人激情文学综合网| 国产精品中文字幕日韩精品 | 欧美精品视频www在线观看| 成人sese在线| 国产精品一区免费在线观看| 久久精品久久99精品久久| 午夜欧美2019年伦理| 亚洲一区二区五区| 亚洲国产视频直播| 亚洲最大成人网4388xx| 亚洲丝袜自拍清纯另类| 中文字幕在线播放不卡一区| 国产精品素人一区二区| 国产亚洲自拍一区| 久久久99精品久久| 26uuu国产一区二区三区| 精品国产一区二区三区四区四| 欧美一区二区免费视频| 欧美一区二区三区男人的天堂| 在线观看一区二区视频| 欧美最新大片在线看 | 欧美一级专区免费大片| 欧美日韩电影一区| 欧美一区二区视频网站| 在线播放日韩导航| 欧美一区二区精品在线| 成人免费毛片嘿嘿连载视频| 成人综合婷婷国产精品久久免费| 懂色av一区二区三区蜜臀| 国产大片一区二区| av在线不卡电影| 日本国产一区二区| 欧美日韩国产电影| 欧美白人最猛性xxxxx69交| 亚洲精品在线免费播放| 国产日本欧美一区二区| 中文字幕一区免费在线观看| 亚洲自拍偷拍网站| 日本亚洲免费观看| 风流少妇一区二区| 欧美性色黄大片手机版| 日韩午夜激情免费电影| 久久精品亚洲乱码伦伦中文| 国产精品国产三级国产普通话三级 | 亚洲国产日产av| 亚洲桃色在线一区| 日日骚欧美日韩| 国产乱一区二区| 色av一区二区| 日韩精品一区二区三区视频播放 | 久久这里只有精品首页| 国产精品久久久久久亚洲毛片| 亚洲综合图片区| 国产一区二区在线视频| 一本一本大道香蕉久在线精品| 69堂成人精品免费视频| 国产精品麻豆视频| 肉色丝袜一区二区| 成人动漫精品一区二区| 欧美丰满一区二区免费视频 | 老色鬼精品视频在线观看播放| 国产成人免费高清| 欧美日韩你懂得| 日本一区二区三区电影| 婷婷一区二区三区| www.久久精品| 日韩免费看网站| 亚洲一区av在线| 丰满少妇久久久久久久| 91精品国产乱| 亚洲综合在线观看视频| 久久精品国产精品青草| 91浏览器入口在线观看| 久久久国产精品午夜一区ai换脸| 亚洲一区在线观看免费观看电影高清| 国产一区二三区好的| 欧美一区二区视频在线观看2022 | 91美女片黄在线观看| 久久亚洲一级片| 日本中文一区二区三区| 97se亚洲国产综合在线| 国产日韩综合av| 久久99精品一区二区三区| 欧美绝品在线观看成人午夜影视| 中文字幕一区日韩精品欧美| 国产乱国产乱300精品| 日韩三级中文字幕| 香蕉久久夜色精品国产使用方法| 91视频在线观看| 国产精品嫩草影院av蜜臀| 国产一区二区在线看| 欧美成人在线直播| 美女脱光内衣内裤视频久久影院| 欧美三级视频在线| 亚洲美女免费在线| www.一区二区| 国产欧美日韩综合精品一区二区| 国产乱妇无码大片在线观看| 亚洲精品一区二区三区影院| 美女爽到高潮91| 欧美电影免费观看高清完整版在线|