gatech-csl / jes

The Jython Environment for Students allows students to write Jython programs that can manipulate pictures, sounds, and videos.
http://mediacomputation.org/
59 stars 38 forks source link

Fixed bug with SoundExplorer #86

Open HenryStevens opened 9 years ago

HenryStevens commented 9 years ago

Opening a sound with less than 640 samples in the SoundExplorer was causing framesPerPixel to become 0; thus causing the explorer to not display the waveform.

    zoomOutWidth = 640;
    zoomInWidth = sound.getLengthInFrames();
    sampleWidth = zoomOutWidth;
    framesPerPixel = sound.getLengthInFrames() / sampleWidth;

Before: jesbefore

After: jesafter