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

15
LINES

< > BotCompany Repo | #1007046 // wavToMP3 - uses JavaSound / mp3spi - doesn't work?

JavaX fragment (include) [tags: use-pretranspiled]

Uses 455K of libraries. Click here for Pure Java version (2602L/17K).

lib 1001094 // JavaLayer 1.0.1
lib 1003620 // mp3spi1.9.4.jar
lib 1003621 // tritonus_share.jar

svoid wavToMP3(File inputFile, File outputFile) ctex {
  fixContextClassLoader(); // activate mp3spi etc
  audioCopyToMP3(inputFile, outputFile,
    AudioSystem.getAudioFileFormat(inputFile).getFormat());
}

static File wavToMP3(File inputFile) {
  File out = replaceExtension(inputFile, "wav", "mp3");
  wavToMP3(inputFile, out);
  ret out;
}

Author comment

Began life as a copy of #1006991

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: #1007046
Snippet name: wavToMP3 - uses JavaSound / mp3spi - doesn't work?
Eternal ID of this version: #1007046/5
Text MD5: c892d87b83231732e120bdc1fb54c836
Transpilation MD5: 10006de2bbc6de2327203907a3105d34
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-27 17:30:44
Source code size: 454 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 653 / 674
Version history: 4 change(s)
Referenced in: [show references]