/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/audio/mixchannel.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/audio/audio.hpp"

CMixChannel::CMixChannel()
{
	reset();
}

void
CMixChannel::reset()
{
	m_fVolume = 1.0f;
	m_fPan = 0;
	m_bFadingOut = m_bFadingIn = FALSE;

	m_bMute = FALSE;
	m_bLoop = FALSE;
	m_bStartPaused = FALSE;

	m_fBaseVolume = 1.0f;
	m_fBasePan = 0;
}


void 
CMixChannel::setLoop(tBOOL loop)
{
	m_bLoop = loop;
}

void 
CMixChannel::startFadeIn(tREAL32 DurationSeconds)
{
	m_bFadingIn = TRUE;
	m_fFadeTime = 0;
	m_fFadeDuration = DurationSeconds;
}

void 
CMixChannel::startFadeOut(tREAL32 DurationSeconds)
{
	m_bFadingOut = TRUE;
	m_fFadeTime = 0;
	m_fFadeDuration = DurationSeconds;
}

void 
CMixChannel::set(CMixChannel *pSourceCopy)
{
	*this = *pSourceCopy;
}
