|
From: Florian B. <fl...@us...> - 2006-11-22 16:00:25
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share/sampled In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5831/tritonus/src/classes/org/tritonus/share/sampled Modified Files: FloatSampleBuffer.java FloatSampleTools.java Log Message: formatted Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/share/sampled/FloatSampleBuffer.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/share/sampled/FloatSampleTools.java Index: FloatSampleBuffer.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share/sampled/FloatSampleBuffer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** FloatSampleBuffer.java 22 Nov 2006 15:50:47 -0000 1.5 --- FloatSampleBuffer.java 22 Nov 2006 16:00:14 -0000 1.6 *************** *** 24,29 **** /* ! |<--- this code is formatted to fit into 80 columns --->| ! */ package org.tritonus.share.sampled; --- 24,29 ---- /* ! |<--- this code is formatted to fit into 80 columns --->| [...1479 lines suppressed...] break; } ! return doDither?ditherBits:0.0f; } } --- 971,984 ---- switch (ditherMode) { case DITHER_MODE_AUTOMATIC: ! doDither = (originalFormatType & FloatSampleTools.F_SAMPLE_WIDTH_MASK) > (newFormatType & FloatSampleTools.F_SAMPLE_WIDTH_MASK); break; case DITHER_MODE_ON: ! doDither = true; break; case DITHER_MODE_OFF: ! doDither = false; break; } ! return doDither ? ditherBits : 0.0f; } } Index: FloatSampleTools.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share/sampled/FloatSampleTools.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** FloatSampleTools.java 22 Nov 2006 15:48:08 -0000 1.4 --- FloatSampleTools.java 22 Nov 2006 16:00:14 -0000 1.5 *************** *** 24,29 **** /* ! |<--- this code is formatted to fit into 80 columns --->| ! */ package org.tritonus.share.sampled; --- 24,29 ---- /* ! |<--- this code is formatted to fit into 80 columns --->| [...1259 lines suppressed...] break; case CT_32SB: ! iSample = quantize32(input[inIndex] * twoPower31, ditherBits); ! output[outIndex] = (byte) (iSample >> 24); ! output[outIndex + 1] = (byte) ((iSample >>> 16) & 0xFF); ! output[outIndex + 2] = (byte) ((iSample >>> 8) & 0xFF); ! output[outIndex + 3] = (byte) (iSample & 0xFF); break; case CT_32SL: ! iSample = quantize32(input[inIndex] * twoPower31, ditherBits); ! output[outIndex + 3] = (byte) (iSample >> 24); ! output[outIndex + 2] = (byte) ((iSample >>> 16) & 0xFF); ! output[outIndex + 1] = (byte) ((iSample >>> 8) & 0xFF); ! output[outIndex] = (byte) (iSample & 0xFF); break; default: ! throw new IllegalArgumentException("unsupported format=" ! + formatType2Str(formatType)); } } |