// Path: src/main/java/com/oxande/wavecleaner/util/Assert.java
// final public class Assert {
// 	public final static void isTrue( boolean value ){
// 		if(!value){
// 			throw new IllegalArgumentException("Expected value is false.");
// 		}
// 	}
// 
// 	public final static void notNull( Object o ){
// 		if(o == null){
// 			throw new IllegalArgumentException("Expected value is null.");
// 		}
// 	}
// 	
// 	public final static void isEventDispatchThread(){
// 		if(!SwingUtilities.isEventDispatchThread()){
// 			throw new IllegalStateException("You must run this in the AWT Thread.");
// 		}
// 	}
// 	
// 	public final static void equals( Object a, Object b){
// 		if(!Objects.equals(a, b)){
// 			throw new IllegalArgumentException("Expected values must be equal.");
// 		}
// 	}
// }


import com.oxande.wavecleaner.util.Assert;
/*****************************************************************************
*   Gnome Wave Cleaner Version 0.19
*   Copyright (C) 2001 Jeffrey J. Welty
*   
*   This program is free software; you can redistribute it and/or
*   modify it under the terms of the GNU General Public License
*   as published by the Free Software Foundation; either version 2
*   of the License, or (at your option) any later version.
*   
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*   
*   You should have received a copy of the GNU General Public License
*   along with this program; if not, write to the Free Software
*   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*******************************************************************************/
package com.oxande.wavecleaner;


/**
 * A basic sample which contains the level and the peak for left and right.
 * 
 * @author wrey
 *
 */
public class RMSSample {
	public float levelL;
	public float levelR;
	public float peakL;
	public float peakR;

	public RMSSample(float levL, float levR, float peakL, float peakR) {
		this.peakR = peakR;
		this.peakL = peakL;
		this.levelR = levR;
		this.levelL = levL;
	}

	/**
	 * Create a wave sample from samples.
	 * 
	 * @param sampL
	 *            the left samples
	 * @param sampR
	 *            the right samples
	 */
	public static RMSSample create(float[] sampL, float[] sampR) {
// Path: src/main/java/com/oxande/wavecleaner/util/Assert.java
// final public class Assert {
// 	public final static void isTrue( boolean value ){
// 		if(!value){
// 			throw new IllegalArgumentException("Expected value is false.");
// 		}
// 	}
// 
// 	public final static void notNull( Object o ){
// 		if(o == null){
// 			throw new IllegalArgumentException("Expected value is null.");
// 		}
// 	}
// 	
// 	public final static void isEventDispatchThread(){
// 		if(!SwingUtilities.isEventDispatchThread()){
// 			throw new IllegalStateException("You must run this in the AWT Thread.");
// 		}
// 	}
// 	
// 	public final static void equals( Object a, Object b){
// 		if(!Objects.equals(a, b)){
// 			throw new IllegalArgumentException("Expected values must be equal.");
// 		}
// 	}
// }


// Path: src/main/java/com/oxande/wavecleaner/RMSSample.java
import com.oxande.wavecleaner.util.Assert;

/*****************************************************************************
*   Gnome Wave Cleaner Version 0.19
*   Copyright (C) 2001 Jeffrey J. Welty
*   
*   This program is free software; you can redistribute it and/or
*   modify it under the terms of the GNU General Public License
*   as published by the Free Software Foundation; either version 2
*   of the License, or (at your option) any later version.
*   
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*   
*   You should have received a copy of the GNU General Public License
*   along with this program; if not, write to the Free Software
*   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*******************************************************************************/
package com.oxande.wavecleaner;


/**
 * A basic sample which contains the level and the peak for left and right.
 * 
 * @author wrey
 *
 */
public class RMSSample {
	public float levelL;
	public float levelR;
	public float peakL;
	public float peakR;

	public RMSSample(float levL, float levR, float peakL, float peakR) {
		this.peakR = peakR;
		this.peakL = peakL;
		this.levelR = levR;
		this.levelL = levL;
	}

	/**
	 * Create a wave sample from samples.
	 * 
	 * @param sampL
	 *            the left samples
	 * @param sampR
	 *            the right samples
	 */
	public static RMSSample create(float[] sampL, float[] sampR) {
		Assert.isTrue(sampL != null);