Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1006991 // mp3ToWAV_2 - uses JavaSound / mp3spi

JavaX fragment (include)

1  
lib 1001094 // JavaLayer 1.0.1
2  
lib 1003620 // mp3spi1.9.4.jar
3  
lib 1003621 // tritonus_share.jar
4  
5  
static void mp3ToWAV_2(File inputFile, File outputFile) ctex {
6  
  fixContextClassLoader(); // activate mp3spi etc
7  
8  
  AudioFileFormat inputFileFormat = AudioSystem.getAudioFileFormat(inputFile);
9  
  AudioFormat inputFormat = inputFileFormat.getFormat();
10  
  float freq = inputFormat.getSampleRate();
11  
  int channels = inputFormat.getChannels();
12  
  AudioFormat outputFormat = new AudioFormat(freq, 16, inputFormat.getChannels(), true, false);
13  
14  
  audioCopyToWAV(inputFile, outputFile, outputFormat);
15  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006991
Snippet name: mp3ToWAV_2 - uses JavaSound / mp3spi
Eternal ID of this version: #1006991/3
Text MD5: c017f8946965c1459c27795cfe6424b3
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-26 14:26:07
Source code size: 602 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 391 / 421
Version history: 2 change(s)
Referenced in: [show references]