Exemplo n.º 1
0
 /** @see com.groovemanager.sampled.AudioPlayerProvider#stopRec() */
 public void stopRec() {
   modified = true;
   canRec = false;
   recording = false;
   try {
     out.close();
     File tempPeak = File.createTempFile("gmtmp_", ".gmpk");
     ((DynamicPeakWaveForm) afWF.getPeakWaveForm()).close(source.lastModified());
     try {
       AudioFileWaveForm aw = new AudioFileWaveForm(source, afWF.getPeakWaveForm(), 32 * 1024, 25);
       fileFormat = AudioSystem.getAudioFileFormat(source);
       cutList.setSource(new AudioFileSource(source, aw));
       waveDisplay.showAll();
     } catch (UnsupportedAudioFileException e1) {
       e1.printStackTrace();
       editor.errorMessage(e1.getMessage());
     }
     this.editor.player.setProvider(this);
   } catch (IOException e) {
     e.printStackTrace();
     editor.errorMessage(e.getMessage());
   }
   editor.zoomWaveDisplay.setSource(this);
 }