0

Hypotesis:

  • I import inside my project, in Netbeans, the external library "Tritonus_remaining_0.3.6" (I import the compiled .jar file)
  • I need to use the mehod "javax.sound.sampled.AudioSystem.getAudioInputStream(MY_AudioFormat__Target, MY_audio_input_stream__Source)"
  • Tritonus override this method "javax.sound.sampled.AudioSystem.getAudioInputStream()" ; I see it because in some cases, when I invoke this javax method, I get an exception on this method indicates the problem in "org.tritonus....."

Target:

  • In same cases I DON'T want that Tritonus override this "javax.sound.sampled.AudioSystem.getAudioInputStream()" and I want to use the original method of javax package.

Question:

  • How to do it, considering that I need that Tritonus library in other parts of my project, then I need to import it?
Fausto70
  • 541
  • 5
  • 20
  • No library can change a single method in a class. What a library can do is to to provide another class with the same fully qualified name. – Erwin Bolwidt Aug 09 '17 at 09:08
  • @ Erwin Bolwidt; Hi, I didn't understand fully what you mean; before have a look to 3rd point of hypotesys that I re-edit.; You say that "a library can do is to to provide another class with the same fully qualified name". If Tritonus has a method with the name equal to one of javax, I see that it is used the tritonus one, while I want to use the javax one. How can I do to use the javax one? – Fausto70 Aug 09 '17 at 09:22
  • I suppose the lib provides a Mixer implementation and you see errors from that. could you post excetion with full stack trace? – thst Aug 09 '17 at 09:57
  • Checked their website. The lib is very old and implements various codecs, mixers, streams - whatever you can plugin into the Java Audio System. If you want to switch it on and off, you dont need inheritance but configuration or parametrization of the Java Audio System. This is a comment, because I don't know JAS enough to be of any help – thst Aug 09 '17 at 10:12
  • @thst; thank you first of all; to be honest I really don't know in the practize how to use configuration or parametrization in the Java Audio System. – Fausto70 Aug 09 '17 at 15:55
  • How about presenting a minimum working code sample, exposing your problem or showing how it works and what you'd like to change. – thst Aug 09 '17 at 16:01

0 Answers0