/** * Plays an earcon given its id. * * @param earconId The id of the earcon to be played. */ private void playEarcon(int earconId) { String earconName = mEarconNames.get(earconId); if (earconName == null) { // We do not know the sound id, hence we need to load the sound. Integer resourceId = sSoundsResourceIds.get(earconId); if (resourceId != null) { earconName = "[" + earconId + "]"; mTts.addEarcon(earconName, getPackageName(), resourceId); mEarconNames.put(earconId, earconName); } } mTts.playEarcon(earconName, QUEUING_MODE_INTERRUPT, null); } }
/** * Plays an earcon given its id. * * @param earconId The id of the earcon to be played. */ private void playEarcon(int earconId) { String earconName = mEarconNames.get(earconId); if (earconName == null) { // We do not know the sound id, hence we need to load the sound. Integer resourceId = sSoundsResourceIds.get(earconId); if (resourceId != null) { earconName = "[" + earconId + "]"; mTts.addEarcon(earconName, getPackageName(), resourceId); mEarconNames.put(earconId, earconName); } } mTts.playEarcon(earconName, QUEUING_MODE_INTERRUPT, null); } }
mTts.addEarcon(EARCON_PRE_FOOTNOTE, BibleApplication.Companion.getApplication().getPackageName(), R.raw.short_pling); // TODO: change mTts.addEarcon(EARCON_POST_FOOTNOTE, BibleApplication.Companion.getApplication().getPackageName(), R.raw.short_pling_reverse); mTts.addEarcon(EARCON_PRE_TITLE, BibleApplication.Companion.getApplication().getPackageName(), R.raw.pageflip); mTts.addEarcon(EARCON_PRE_CHAPTER_CHANGE, BibleApplication.Companion.getApplication().getPackageName(), R.raw.medium_pling); mTts.addEarcon(EARCON_PRE_BOOK_CHANGE, BibleApplication.Companion.getApplication().getPackageName(), R.raw.long_pling);