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

13
LINES

< > BotCompany Repo | #1018574 // mp3ToWAV_jave (seems to work)

JavaX fragment (include)

1  
!include once #1017982 // JAVE/ffmpeg
2  
3  
static void mp3ToWAV_jave(File mp3, File wav) ctex {
4  
  new AudioAttributes audio;
5  
  new EncodingAttributes attrs;
6  
  attrs.setFormat("wav");
7  
  attrs.setAudioAttributes(audio);
8  
  File tempWAV = appendToFileName(wav, ".temp");
9  
  print("Converting " + f2s(mp3) + " to " + f2s(wav));
10  
  new Encoder().encode(mp3, tempWAV, attrs);
11  
  forceRenameFile(tempWAV, wav);
12  
  print("  [done]");
13  
}

Author comment

Began life as a copy of #1013801

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018574
Snippet name: mp3ToWAV_jave (seems to work)
Eternal ID of this version: #1018574/7
Text MD5: 70ec3d560a875fd338218e1e100bebd6
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-10 00:10:17
Source code size: 430 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 312 / 369
Version history: 6 change(s)
Referenced in: [show references]