diff --git a/com.wudsn.ide.snd/lib/atari8bit/asap-6.0.1-java-src.zip b/com.wudsn.ide.snd/lib/atari8bit/asap-6.0.3-java-src.zip similarity index 64% rename from com.wudsn.ide.snd/lib/atari8bit/asap-6.0.1-java-src.zip rename to com.wudsn.ide.snd/lib/atari8bit/asap-6.0.3-java-src.zip index 12420a57..f40c6b8d 100644 Binary files a/com.wudsn.ide.snd/lib/atari8bit/asap-6.0.1-java-src.zip and b/com.wudsn.ide.snd/lib/atari8bit/asap-6.0.3-java-src.zip differ diff --git a/com.wudsn.ide.snd/lib/atari8bit/asap.jar b/com.wudsn.ide.snd/lib/atari8bit/asap.jar index 8a5e026b..ae72a465 100644 Binary files a/com.wudsn.ide.snd/lib/atari8bit/asap.jar and b/com.wudsn.ide.snd/lib/atari8bit/asap.jar differ diff --git a/com.wudsn.ide.snd/lib/atari8bit/asap.txt b/com.wudsn.ide.snd/lib/atari8bit/asap.txt index 9335f51d..e255aeb7 100644 --- a/com.wudsn.ide.snd/lib/atari8bit/asap.txt +++ b/com.wudsn.ide.snd/lib/atari8bit/asap.txt @@ -1,2 +1,2 @@ -The files "asap.jar" and "asap-6.0.1-java-src.zip" were provided by Fox. +The files "asap.jar" and "asap-6.0.3-java-src.zip" were provided by Fox. The source is not included in the build.properties to keep the size at the minimum. diff --git a/com.wudsn.ide.snd/src/com/wudsn/ide/snd/player/atari8/ASAPPlayer.java b/com.wudsn.ide.snd/src/com/wudsn/ide/snd/player/atari8/ASAPPlayer.java index cf449eab..44c7e43d 100644 --- a/com.wudsn.ide.snd/src/com/wudsn/ide/snd/player/atari8/ASAPPlayer.java +++ b/com.wudsn.ide.snd/src/com/wudsn/ide/snd/player/atari8/ASAPPlayer.java @@ -123,7 +123,7 @@ public synchronized void load(String fileName, InputStream inputStream) throws C try { asap.load(fileName, module, moduleLen); asapMusicRoutine = new ASAPMusicRoutine(fileName, module, moduleLen); - } catch (Exception ex) { + } catch (ASAPFormatException|ASAPConversionException ex) { // ERROR: Cannot load sound file '{0}'. {1} IStatus status = new Status(IStatus.ERROR, SoundPlugin.ID, TextUtility.format(Texts.MESSAGE_E502, fileName, ex.getMessage())); @@ -149,8 +149,8 @@ public synchronized void load(String fileName, InputStream inputStream) throws C // Translate the file type to a human readable text. try { info.moduleTypeDescription = ASAPInfo.getExtDescription(info.moduleFileType); - } catch (Exception unknownExtensionException) { - info.moduleTypeDescription = unknownExtensionException.getMessage(); + } catch (ASAPFormatException ex) { + info.moduleTypeDescription = ex.getMessage(); } final List supportedExportFileTypes = new ArrayList(); @@ -241,7 +241,7 @@ public synchronized void play(int song, SoundPlayerListener listener) throws Cor try { info = asap.getInfo(); asap.playSong(song, info.getLoop(song) ? -1 : info.getDuration(song)); - } catch (Exception ex) { + } catch (ASAPArgumentException|ASAPFormatException ex) { // ERROR: Cannot play song number {0}. {1} IStatus status = new Status(IStatus.ERROR, SoundPlugin.ID, TextUtility.format(Texts.MESSAGE_E503, NumberUtility.getLongValueDecimalString(song), ex.getMessage())); @@ -283,7 +283,7 @@ public synchronized void seekPosition(int position) { listenerUpdatedPosition = position; listener.playerUpdated(SoundPlayerListener.POSITION); } - } catch (Exception ex) { + } catch (ASAPFormatException ex) { throw new RuntimeException("Cannot seeek to position " + position, ex); } }