From 1f7effc97db14630124b41ae485cca22f0f1b4b9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 15 Oct 2023 17:43:53 -0500 Subject: [PATCH] Refactor sounds, oga -> ogg, remove proprietary avatar from boop.mp3 --- src/assets/sounds/LICENSE.md | 2 +- src/assets/sounds/boop.mp3 | Bin 12280 -> 4096 bytes src/assets/sounds/boop.ogg | Bin 5247 -> 5251 bytes src/assets/sounds/{chat.oga => chat.ogg} | Bin src/utils/sounds.ts | 31 +++++++++-------------- 5 files changed, 13 insertions(+), 20 deletions(-) rename src/assets/sounds/{chat.oga => chat.ogg} (100%) diff --git a/src/assets/sounds/LICENSE.md b/src/assets/sounds/LICENSE.md index 42d569b40..0d4a360eb 100644 --- a/src/assets/sounds/LICENSE.md +++ b/src/assets/sounds/LICENSE.md @@ -1,6 +1,6 @@ # Sound licenses - `chat.mp3` -- `chat.oga` +- `chat.ogg` © [notificationsounds.com](https://notificationsounds.com/notification-sounds/intuition-561), licensed under [CC BY 4.0](https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/src/assets/sounds/boop.mp3 b/src/assets/sounds/boop.mp3 index bf9c3c1aaff40dea76ad82e3e853d2d32382bcea..b8f7610826e5519cc430dd7978ef50d55ffca74a 100644 GIT binary patch delta 94 zcmewn-=LuE>0->x00g|XA;H0}Kn5cahxoYq0Vx&-1_l#TgUK#Rx^f|ru0cQ{Rv0Dy!50Qvxb004mK004C`008P>0026e z000+ooVrmw0008|P)t-s>72Xeo4M7es;ioNsFrr6lX04dXlYhAgl$EVct@OoPn>~L ztdVu78f~0U3VuN6>U^* z8wNE@HBN_mY7YS!Y*123VRI$3l|RAvwj8Vdv!FdP_fbApzIYgkrtH$_Z0 zDJOA%Zf$8wGgLMaWJ@L|IY=}xVk`()aab;6L>o~v4qG}B5)&sV8(3aJ8is6BHbz+q z2MHG!7bh83cxFf$B`j-GELJ-iG*)sW3PpNsRajL@iFQ{$U~p$#M;jSL78yK{aEx10 zK}S0%Rb^^yV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(opFhaU$CLc**1PwB`!588;(L9AcP?LXlCKP-;F7t{#Xke< zM0G(92S3OgVdQ-Dy)*3cYide=s)P~WYQ1|Ku=ki^1mC`M=dz37zQO8~r9QM4W@~qm zFOc<0bpc2o1?BpsAm?GnY9M59U=_=Lkk>YJPqHf}9Y$pl4qGc6yT(w`~|`MRk;% z@Im0=K5FdSTyNi?huNZkRML-^PO_`q}_~=^?X!0eElV;lL0D7CC+=&*sdHrNf^9~v6IKRDbsRA{t{biIz+bc)h5Vgy)WfVj@jMNemM z7`VcF#?VOaAmKwt>-|AEwzehNtQ1*ZcwtSC zzYw%ST+6fp_`gPSKfOLeNqj*N;`CY2Lx$cp=XT^<7u_no1>;Vi>hz6AJx1{X4DgNabw z0000907*qoM6N<$f{`OFEJIICO#lD@6951JWo~BxYHxF8W@}|`Zh0|N} N1Tru&H<4~00sp2)%w_-p diff --git a/src/assets/sounds/boop.ogg b/src/assets/sounds/boop.ogg index a6551c9fdd0ae0727e44cf7e1baf1ac3f5000cba..936d570420f996785ac34be9200bcd93675bb620 100644 GIT binary patch delta 57 zcmeyb(X2TkfbHT}y|sMPCx&TGTx2OH#lXPe;u`E6F;Nom0z5imYtfHSE-kr NpF6Q$dE?hEVE|+$6;uEK delta 53 zcmZqH{I4+~fX)4;%t^k<6T>toUQ?b}Zz(0lz`)?_@9XR87h;>0U!0njotl?dsh6Ce JyYXk2FaQih6SDvS diff --git a/src/assets/sounds/chat.oga b/src/assets/sounds/chat.ogg similarity index 100% rename from src/assets/sounds/chat.oga rename to src/assets/sounds/chat.ogg diff --git a/src/utils/sounds.ts b/src/utils/sounds.ts index fddba87c7..6774862d6 100644 --- a/src/utils/sounds.ts +++ b/src/utils/sounds.ts @@ -1,10 +1,15 @@ +import boopMp3 from 'soapbox/assets/sounds/boop.mp3'; +import boopOgg from 'soapbox/assets/sounds/boop.ogg'; +import chatMp3 from 'soapbox/assets/sounds/chat.mp3'; +import chatOgg from 'soapbox/assets/sounds/chat.ogg'; + /** Soapbox audio clip. */ -type Sound = { +interface Sound { src: string; type: string; } -export type Sounds = 'boop' | 'chat' +type Sounds = 'boop' | 'chat'; /** Produce HTML5 audio from sound data. */ const createAudio = (sources: Sound[]): HTMLAudioElement => { @@ -42,25 +47,13 @@ const play = (audio: HTMLAudioElement): Promise => { const soundCache: Record = { boop: createAudio([ - { - src: require('../assets/sounds/boop.ogg'), - type: 'audio/ogg', - }, - { - src: require('../assets/sounds/boop.mp3'), - type: 'audio/mpeg', - }, + { src: boopOgg, type: 'audio/ogg' }, + { src: boopMp3, type: 'audio/mpeg' }, ]), chat: createAudio([ - { - src: require('../assets/sounds/chat.oga'), - type: 'audio/ogg', - }, - { - src: require('../assets/sounds/chat.mp3'), - type: 'audio/mpeg', - }, + { src: chatOgg, type: 'audio/ogg' }, + { src: chatMp3, type: 'audio/mpeg' }, ]), }; -export { soundCache, play }; +export { soundCache, play, type Sounds };