aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/audio.js8
-rw-r--r--ext/mixed/js/display.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/mixed/js/audio.js b/ext/mixed/js/audio.js
index 1da5d48c..31c476b1 100644
--- a/ext/mixed/js/audio.js
+++ b/ext/mixed/js/audio.js
@@ -78,16 +78,16 @@ class AudioSystem {
}
}
- async getExpressionAudio(expression, sources, details) {
- const key = `${expression.expression}:${expression.reading}`;
- const cacheValue = this._cache.get(expression);
+ async getDefinitionAudio(definition, sources, details) {
+ const key = `${definition.expression}:${definition.reading}`;
+ const cacheValue = this._cache.get(definition);
if (typeof cacheValue !== 'undefined') {
const {audio, uri, source} = cacheValue;
return {audio, uri, source};
}
for (const source of sources) {
- const uri = await this._getAudioUri(expression, source, details);
+ const uri = await this._getAudioUri(definition, source, details);
if (uri === null) { continue; }
try {
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 9d2746fd..3fe8e684 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -775,7 +775,7 @@ class Display {
const sources = this.options.audio.sources;
let audio, source, info;
try {
- ({audio, source} = await this.audioSystem.getExpressionAudio(expression, sources));
+ ({audio, source} = await this.audioSystem.getDefinitionAudio(expression, sources));
info = `From source ${1 + sources.indexOf(source)}: ${source}`;
} catch (e) {
if (this.audioFallback === null) {