Commit f50b2c35 by 徐丛奇

Merge branch 'master' of git.iouou.cn:xucongqi/haihang

parents 3d573dfa f9e5d661
package com.oo.eye; package com.oo.eye;
import com.app.baselibrary.base.app.BaseApplication; import com.app.baselibrary.base.app.BaseApplication;
import com.app.baselibrary.commonUtil.BDttsUtils;
import com.app.baselibrary.commonUtil.LogUtil; import com.app.baselibrary.commonUtil.LogUtil;
import com.oo.eye.db.DbManager; import com.oo.eye.db.DbManager;
import com.oo.seex.netlibrary.net.BaseApiConfig; import com.oo.seex.netlibrary.net.BaseApiConfig;
...@@ -24,5 +25,6 @@ public class EyeApplication extends BaseApplication { ...@@ -24,5 +25,6 @@ public class EyeApplication extends BaseApplication {
LogUtil.e(json); LogUtil.e(json);
} }
}); });
BDttsUtils.getInstance();//初始化百度语音
} }
} }
...@@ -188,27 +188,35 @@ public class BDttsUtils { ...@@ -188,27 +188,35 @@ public class BDttsUtils {
* 释放资源 * 释放资源
*/ */
public void release() { public void release() {
this.mSpeechSynthesizer.release(); if (this != null && mSpeechSynthesizer != null) {
this.mSpeechSynthesizer.release();
}
} }
/** /**
* 停止正在执行的任务 * 停止正在执行的任务
*/ */
public void stop() { public void stop() {
this.mSpeechSynthesizer.stop(); if (this != null && mSpeechSynthesizer != null) {
this.mSpeechSynthesizer.stop();
}
} }
/** /**
* 暂停正在执行的任务 * 暂停正在执行的任务
*/ */
public void pause() { public void pause() {
this.mSpeechSynthesizer.pause(); if (this != null && mSpeechSynthesizer != null) {
this.mSpeechSynthesizer.pause();
}
} }
/** /**
* 恢复暂停的任务 * 恢复暂停的任务
*/ */
public void resume() { public void resume() {
this.mSpeechSynthesizer.resume(); if (this != null && mSpeechSynthesizer != null) {
this.mSpeechSynthesizer.resume();
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment