-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestFile.java
More file actions
26 lines (24 loc) · 989 Bytes
/
testFile.java
File metadata and controls
26 lines (24 loc) · 989 Bytes
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
public class testFile{
public static void main(String[] args){
long startTime = System.currentTimeMillis();
System.out.println("Loading old wav");
JWave j = new JWave("america.wav");
System.out.println("Retrieving Header Attributes\n\n");
System.out.println(j.getAttributes());
System.out.println("\n\nChanging speed");
for(int i = 0; i < 15; i++){
j.changeSpeed(1.327);
j.changeSpeed(1/1.327);
}
System.out.println(j.getMaxAmplitude());
j.normalize();
System.out.println(j.getMaxAmplitude());
System.out.println("Saving new wav");
j.writeAllData();
System.out.println("Retrieving new Header Attributes\n\n");
System.out.println(j.getAttributes());
long elapsedTime = System.currentTimeMillis() - startTime;
System.out.println("Time elapsed to load, edit, and save new " + j.Subchunk2Size/1000000 + "MB file: ");
System.out.println(elapsedTime +"ms");
}
}