예제 #1
0
 public void actionPerformed(ActionEvent actionEvent)
 {
     if (AudioTool.filename != null && !String.instancehelper_isEmpty(AudioTool.filename))
     {
         try
         {
             Utils.writeRawFile(AudioTool.audio, AudioTool.filename);
             AudioTool.access_000().setEnabled(false);
         }
         catch (IOException ex)
         {
             Throwable.instancehelper_printStackTrace(ex);
         }
     }
 }
예제 #2
0
 public void actionPerformed(ActionEvent actionEvent)
 {
     AudioTool.getFilename("Save As...", 1);
     if (AudioTool.filename == null || String.instancehelper_isEmpty(AudioTool.filename))
     {
         return;
     }
     try
     {
         Utils.writeRawFile(AudioTool.audio, AudioTool.filename);
         AudioTool.access_000().setEnabled(false);
     }
     catch (IOException ex)
     {
         Throwable.instancehelper_printStackTrace(ex);
     }
 }
예제 #3
0
 public void actionPerformed(ActionEvent actionEvent)
 {
     if (!AudioTool.recording)
     {
         AudioTool.recording = true;
         AudioTool.recorder.startRecording();
         AudioTool.access_400().setText("Stop");
         AudioTool.access_000().setEnabled(true);
     }
     else
     {
         AudioTool.recording = false;
         AudioTool.recorder.stopRecording();
         AudioTool.audio.setAudioData(AudioTool.access_500(AudioTool.recorder));
         AudioTool.access_400().setText("Record");
         AudioTool.player.play(AudioTool.audioPanel.getSelectionStart(), AudioTool.audioPanel.getSelectionEnd());
     }
 }