|
@@ -8,23 +8,25 @@ public class CSVMassageliege
|
|
|
{
|
|
|
public static void main(String[] args) throws Exception
|
|
|
{
|
|
|
- BufferedReader r = new BufferedReader(new FileReader("D:\\loa\\000028\\004\\pico-tapes\\on_switchoff.csv"));
|
|
|
+ BufferedReader r = new BufferedReader(new FileReader("D:\\loa\\000002\\001\\masseuse\\analog.csv"));
|
|
|
String line = r.readLine();
|
|
|
- RandomAccessFile f = new RandomAccessFile("D:\\loa\\000028\\004\\pico-tapes\\on_switchoff.raw","rw");
|
|
|
+ RandomAccessFile f = new RandomAccessFile("D:\\loa\\000002\\001\\masseuse\\massiert.raw","rw");
|
|
|
line = r.readLine(); //LMAA header
|
|
|
line = r.readLine();
|
|
|
line = r.readLine();
|
|
|
- String firstSampleOffset = line.replace(',','.').split(";")[0];
|
|
|
+ //String firstSampleOffset = line.replace(',','.').split(";")[0];
|
|
|
+ String firstSampleOffset = line.split(",")[0];
|
|
|
String lastSampleoffset = "0.0";
|
|
|
int i=0;
|
|
|
- while(line !=null)
|
|
|
+ while(line !=null&&line.length()>1)
|
|
|
{
|
|
|
- String[] linesplitted = line.replace(',','.').split(";");
|
|
|
+ //tring[] linesplitted = line.replace(',','.').split(";");
|
|
|
+ String[] linesplitted = line.split(",");
|
|
|
String sampleraw = linesplitted[linesplitted.length-1];
|
|
|
if(!sampleraw.equalsIgnoreCase("nan"))
|
|
|
{
|
|
|
sampleraw = sampleraw.replace("∞","1000000.0");
|
|
|
- double sample = Double.valueOf(sampleraw);
|
|
|
+ double sample = Double.valueOf(sampleraw)-1.25;
|
|
|
double sampleCrunch = (sample/1.0)*32768.0;
|
|
|
|
|
|
short intSample = (short)Math.max(-32768,(Math.min(32767,sampleCrunch)));
|
|
@@ -34,7 +36,8 @@ public class CSVMassageliege
|
|
|
{
|
|
|
System.out.println("i="+i);
|
|
|
}
|
|
|
- lastSampleoffset = line.replace(',','.').split(";")[0];
|
|
|
+ //lastSampleoffset = line.replace(',','.').split(";")[0];
|
|
|
+ lastSampleoffset = line.split(",")[0];
|
|
|
}
|
|
|
line=r.readLine();
|
|
|
}
|