java - How can I pass an AudioInputStream file to a Spectogram(Wave) constructor -


can please me call constructor spectogram() code below

if (ae.getactioncommand().equals("play")) {         try {             ai = audiosystem.getaudioinputstream(file);             c.close();             c = audiosystem.getclip();             c.open(ai);             c.start();              // imagine these types not match.             // how can convert line make workable??              spectogram sp = new spectogram(ai);           } catch (exception e) {             e.printstacktrace();         }     }  

this constructor want call create spectogram , embed in wave player

public spectogram(wave wave) {              this.wave=wave;             buildspectrogram();   } 


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -