Updating the changelog and fixed a compile error

canary
WolverinDEV 2020-03-19 15:13:12 +01:00
parent 1ef614b573
commit 3e3cdd5fec
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@
- Added image preview within the chat
- Added an image preview to the music bot thumbnails
- Added an image preview to client avatars
- Fixed the translations system default repository
* **18.03.20**
- Updated the sound playback mechanism and allowing the native backend to playback sounds via the native interface.

View File

@ -9,7 +9,7 @@ namespace audio.sounds {
const file_cache: {[key: string]: Promise<SoundEntry> & { timestamp: number }} = {};
let warned = false;
function get_song_entry(file: SoundFile) : Promise<SoundEntry> {
function get_song_entry(file: sound.SoundFile) : Promise<SoundEntry> {
if(typeof file_cache[file.path] === "object") {
return new Promise<SoundEntry>((resolve, reject) => {
if(file_cache[file.path].timestamp + 60 * 1000 > Date.now()) {
@ -74,7 +74,7 @@ namespace audio.sounds {
})(), { timestamp: Date.now() }));
}
export async function play_sound(file: SoundFile) : Promise<void> {
export async function play_sound(file: sound.SoundFile) : Promise<void> {
const entry = get_song_entry(file);
if(!entry) {
log.warn(LogCategory.AUDIO, tr("Failed to replay sound %s because it could not be resolved."), file.path);