Skip to content

Commit

Permalink
Update SoundFeature.tsx
Browse files Browse the repository at this point in the history
from volume (0->1) to dBFS (-50-> 0)
  • Loading branch information
pierromond authored Aug 21, 2023
1 parent 94cfbd9 commit c027ef1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const SoundFeature: FC<{ feature?: Feature; mapId: string }> = ({ mapId,

if (properties.sound) {
const volume = feature.properties.acoustic_soundlevel
? feature.properties.acoustic_soundlevel / noiseVariable.maximumValue
? 10^(((50*(feature.properties.acoustic_soundlevel-noiseVariable.minimumValue) / (noiseVariable.maximumValue-noiseVariable.minimumValue))-50)/20)
: 1;
howler = new Howl({
src: [feature.properties.sound],
Expand Down

0 comments on commit c027ef1

Please sign in to comment.