From 880cea5a564268c3d2e6ed884d92827710fb2bb5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Feb 2020 03:14:17 +0900 Subject: Better sfx --- src/client/assets/sounds/syuilo/down.mp3 | Bin 0 -> 18240 bytes src/client/assets/sounds/syuilo/pope1.mp3 | Bin 19242 -> 18240 bytes src/client/assets/sounds/syuilo/pope2.mp3 | Bin 19250 -> 18240 bytes src/client/assets/sounds/syuilo/up.mp3 | Bin 0 -> 18240 bytes src/client/assets/sounds/syuilo/waon.mp3 | Bin 19242 -> 18240 bytes src/client/components/timeline.vue | 4 +++- src/client/pages/preferences/index.vue | 12 ++++++++++++ src/client/store.ts | 7 ++++--- 8 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 src/client/assets/sounds/syuilo/down.mp3 create mode 100644 src/client/assets/sounds/syuilo/up.mp3 (limited to 'src/client') diff --git a/src/client/assets/sounds/syuilo/down.mp3 b/src/client/assets/sounds/syuilo/down.mp3 new file mode 100644 index 0000000000..4cd421139d Binary files /dev/null and b/src/client/assets/sounds/syuilo/down.mp3 differ diff --git a/src/client/assets/sounds/syuilo/pope1.mp3 b/src/client/assets/sounds/syuilo/pope1.mp3 index 585bb0407e..d6f53cfacc 100644 Binary files a/src/client/assets/sounds/syuilo/pope1.mp3 and b/src/client/assets/sounds/syuilo/pope1.mp3 differ diff --git a/src/client/assets/sounds/syuilo/pope2.mp3 b/src/client/assets/sounds/syuilo/pope2.mp3 index 83865b989e..fe5d95e292 100644 Binary files a/src/client/assets/sounds/syuilo/pope2.mp3 and b/src/client/assets/sounds/syuilo/pope2.mp3 differ diff --git a/src/client/assets/sounds/syuilo/up.mp3 b/src/client/assets/sounds/syuilo/up.mp3 new file mode 100644 index 0000000000..3f30867764 Binary files /dev/null and b/src/client/assets/sounds/syuilo/up.mp3 differ diff --git a/src/client/assets/sounds/syuilo/waon.mp3 b/src/client/assets/sounds/syuilo/waon.mp3 index c5797f066e..a4af473861 100644 Binary files a/src/client/assets/sounds/syuilo/waon.mp3 and b/src/client/assets/sounds/syuilo/waon.mp3 differ diff --git a/src/client/components/timeline.vue b/src/client/components/timeline.vue index ba367bf23d..6befd7c2a7 100644 --- a/src/client/components/timeline.vue +++ b/src/client/components/timeline.vue @@ -53,7 +53,9 @@ export default Vue.extend({ (this.$refs.tl as any).prepend(note); if (this.sound) { - const audio = new Audio(`/assets/sounds/${this.$store.state.device.sfxNote}.mp3`); + const audio = new Audio(note.userId === this.$store.state.i.id + ? `/assets/sounds/${this.$store.state.device.sfxNoteMy}.mp3` + : `/assets/sounds/${this.$store.state.device.sfxNote}.mp3`); audio.volume = this.$store.state.device.sfxVolume; audio.play(); } diff --git a/src/client/pages/preferences/index.vue b/src/client/pages/preferences/index.vue index 4193959188..9d57ddad58 100644 --- a/src/client/pages/preferences/index.vue +++ b/src/client/pages/preferences/index.vue @@ -17,6 +17,11 @@ + + + + + @@ -87,6 +92,8 @@ import { langs } from '../../config'; const sounds = [ null, + 'syuilo/up', + 'syuilo/down', 'syuilo/pope1', 'syuilo/pope2', 'syuilo/waon', @@ -170,6 +177,11 @@ export default Vue.extend({ set(value) { this.$store.commit('device/set', { key: 'sfxNote', value }); } }, + sfxNoteMy: { + get() { return this.$store.state.device.sfxNoteMy; }, + set(value) { this.$store.commit('device/set', { key: 'sfxNoteMy', value }); } + }, + sfxNotification: { get() { return this.$store.state.device.sfxNotification; }, set(value) { this.$store.commit('device/set', { key: 'sfxNotification', value }); } diff --git a/src/client/store.ts b/src/client/store.ts index 4a329a0ebb..1a26bc82d1 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -42,10 +42,11 @@ const defaultDeviceSettings = { showFixedPostForm: false, useNotificationsPopup: true, sfxVolume: 0.3, - sfxNote: 'syuilo/pope1', + sfxNote: 'syuilo/down', + sfxNoteMy: 'syuilo/up', sfxNotification: 'syuilo/pope2', - sfxChat: 'syuilo/waon', - sfxChatBg: null, + sfxChat: 'syuilo/pope1', + sfxChatBg: 'syuilo/waon', userData: {}, }; -- cgit v1.2.3-freya