Browse Source

Given value of 0 for weird amplitudes

main
Luke Murphy 5 years ago
parent
commit
4bf3a8094a
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 6
      voicegardens/static/voicegardens.js

6
voicegardens/static/voicegardens.js

@ -218,7 +218,11 @@ class GeneratedShape {
**/
// sound and properties passed into shape creation
this.soundRecorded = soundRecorded;
this.soundAmplitude = soundAmplitude;
// ensure that erroneous minus amplitudes are at least given 0
if (soundAmplitude < 0) this.soundAmplitude = 0.0;
else this.soundAmplitude = soundAmplitude;
this.soundDuration = soundDuration;
// mouse hover awareness for sound playing

Loading…
Cancel
Save