File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/platform/android/app/src/main/java/net/sourceforge/smallbasic Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1+ 2019-14-02 (0.12.15)
2+ ANDROID: fix crash passing negative duration to SOUND command
3+
142019-11-02 (0.12.15)
25 UI: ALT+F4 from edit/run now returns to edit
36 UI: avoid flicker from with ALT+F4 -e edit startup
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public void setSilent(boolean silent) {
5656 * http://stackoverflow.com/questions/2413426/playing-an-arbitrary-tone-with-android
5757 */
5858 private byte [] generateTone (int freqOfTone , int durationMillis ) {
59- int numSamples = durationMillis * AUDIO_SAMPLE_RATE / 1000 ;
59+ int numSamples = Math . max ( 1 , durationMillis * AUDIO_SAMPLE_RATE / 1000 ) ;
6060 double sample [] = new double [numSamples ];
6161 byte result [] = new byte [2 * numSamples ];
6262
You can’t perform that action at this time.
0 commit comments