diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-10 11:57:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 11:57:38 -0400 |
commit | 35abd517b933036b95bb58b463a48edd1c985bb1 (patch) | |
tree | 34a31589727c6e04659cc7195b5c27b61df5036e /ext/mixed/js/audio-system.js | |
parent | 17ebe6a754d53fad97ab607f17e2bba8d8565361 (diff) |
AudioUriBuilder simplification (#799)
* Rename variables to disambiguate
* Update handler argument convention
* Update getUri argument convention
* Change _getAudioUri argument convention
* Change getDefinitionAudio argument convention
* Add api.getDefinitionAudio definition
Diffstat (limited to 'ext/mixed/js/audio-system.js')
-rw-r--r-- | ext/mixed/js/audio-system.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/mixed/js/audio-system.js b/ext/mixed/js/audio-system.js index 9bf12510..4a49c135 100644 --- a/ext/mixed/js/audio-system.js +++ b/ext/mixed/js/audio-system.js @@ -78,8 +78,8 @@ class AudioSystem { } } - async getDefinitionAudio(definition, sources, details) { - const key = `${definition.expression}:${definition.reading}`; + async getDefinitionAudio(sources, expression, reading, details) { + const key = `${expression}:${reading}`; const hasCache = (this._cache !== null && !details.disableCache); if (hasCache) { @@ -95,7 +95,7 @@ class AudioSystem { for (let i = 0, ii = sources.length; i < ii; ++i) { const source = sources[i]; - const uri = await this._getAudioUri(definition, source, details); + const uri = await this._getAudioUri(source, expression, reading, details); if (uri === null) { continue; } try { @@ -129,10 +129,10 @@ class AudioSystem { // NOP } - _getAudioUri(definition, source, details) { + _getAudioUri(source, expression, reading, details) { return ( this._audioUriBuilder !== null ? - this._audioUriBuilder.getUri(definition, source, details) : + this._audioUriBuilder.getUri(source, expression, reading, details) : null ); } |