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

8
LINES

< > BotCompany Repo | #1020116 // decodeAudioFileToStereoSamples

JavaX fragment (include)

1  
static short[] decodeAudioFileToStereoSamples(File file) {
2  
  if (file == null) null;
3  
  if (isMP3File(file))
4  
    ret decodeWAVToStereoSamples(mp3ToTempWAV(file));
5  
  else if (isWAVFile(file))
6  
    ret decodeWAVToStereoSamples(file);
7  
  fail("Unknown audio type: " + file);
8  
}

Author comment

Began life as a copy of #1016685

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020116
Snippet name: decodeAudioFileToStereoSamples
Eternal ID of this version: #1020116/1
Text MD5: acb4e1f5cf305b3b5399afcdaa8aeaab
Author: stefan
Category: javax / sound
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-08 16:36:09
Source code size: 277 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 306 / 337
Referenced in: [show references]