-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODOLIST.txt
45 lines (38 loc) · 1.18 KB
/
TODOLIST.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
TODO:
PArcours des r�eprtoires finaux
recherche infos par contenu:
R�cup�ration des pistes flac
recherche tags:
artiste: m�me artist ?
oui: m�me album ?
oui: recherche master[0]
nb pistes correspond ?
oui: titres similaires (ignore case) -->%
oui: recherche tags maquants, �crire fichier nfo dans r�pertoire
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file);
AudioFormat format = audioInputStream.getFormat();
long audioFileLength = file.length();
int frameSize = format.getFrameSize();
float frameRate = format.getFrameRate();
float durationInSeconds = (audioFileLength / (frameSize * frameRate));
java file audio
shareedit
edited Jun 15 '10 at 15:32
asked Jun 9 '10 at 21:00
Tom Brito
9,44447130225
Which jar file are you using for this? – Umang Kothari Dec 5 '14 at 12:46
add a comment
1 Answer
active oldest votes
up vote
17
down vote
accepted
Given a File you can write
File file = ...;
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file);
AudioFormat format = audioInputStream.getFormat();
long frames = audioInputStream.getFrameLength();
double durationInSeconds = (frames+0.0) / format.getFrameRate();
shareedit