Michael-Heinzelmann-IT-Consulting / ORCC-open-rapid-content-creation

open source tools that enable rapid content creation for enternainment, education and media production
GNU General Public License v3.0
0 stars 0 forks source link

bug RotatingAmplitudes on high rotation speed #50

Closed mheinzelmann closed 11 years ago

mheinzelmann commented 12 years ago

java.lang.ArithmeticException: / by zero at org.mcuosmipcuter.orcc.soundvis.defaultcanvas.RotatingAmplitudes.nextSample(RotatingAmplitudes.java:79)

degreesPerFrame = 2230

mheinzelmann commented 12 years ago

this is because it does not make sense to rotate 2230 degrees per frame if there are only e.g. 1764 samples per frame, but this number is only known at runtime, - to fix this properly some form of dynamic limitation is needed - so it's more an API bug

mheinzelmann commented 12 years ago

too complicated because of side issues and complicated user interaction, what if different sample rates are loaded and a value becomes invalid but was valid before ...

additional issue: degreesperFrame=0

java.lang.ArithmeticException: / by zero at org.mcuosmipcuter.orcc.soundvis.defaultcanvas.RotatingAmplitudes.getPreRunFrames(RotatingAmplitudes.java:148) at org.mcuosmipcuter.orcc.soundvis.model.SoundCanvasWrapperImpl.getPreRunFrames(SoundCanvasWrapperImpl.java:94) at org.mcuosmipcuter.orcc.soundvis.threads.PlayThread.run(PlayThread.java:90)

mheinzelmann commented 12 years ago

above seems fixed, it is still possible to reduce size to 0: java.util.NoSuchElementException at java.util.ArrayDeque.removeFirst(Unknown Source) at org.mcuosmipcuter.orcc.soundvis.defaultcanvas.RotatingAmplitudes.nex Sample(RotatingAmplitudes.java:88) at org.mcuosmipcuter.orcc.soundvis.model.SoundCanvasWrapperImpl.nextSam le(SoundCanvasWrapperImpl.java:52) at org.mcuosmipcuter.orcc.soundvis.gui.GraphPanel.nextSample(GraphPanel java:196)

mheinzelmann commented 11 years ago

not reproduced anymore