/** 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/include/sgx/audio/mixchannel.hpp

*/

#ifndef SGX_AUDIO_MIX_CHANNEL_HPP
#define SGX_AUDIO_MIX_CHANNEL_HPP	1

/**
A mix channel describes how the current sample should
be incorporated into the gameplay mix.

You may change any parameter here, and the settings
will be honoured on the next update() of the audio
engine.

Invalid/insane settings (e.g. setting fade in and out
at the same time) produces undefined results. Consequently,
it is recommended you use the access methods.
*/
class CMixChannel
{
public:
	tREAL32		m_fBaseVolume;
	tREAL32		m_fBasePan;

	tREAL32		m_fVolume;
	tREAL32		m_fPan;

	tBOOL			m_bFadingIn;
	tBOOL			m_bFadingOut;
	tREAL32		m_fFadeTime;
	tREAL32		m_fFadeDuration;

	tBOOL			m_bMute;

	tBOOL			m_bLoop;

	tBOOL			m_bStartPaused;

	CMixChannel();
	void reset();
	void set(CMixChannel *pSourceCopy);
	void setLoop(tBOOL loop);
	void startFadeIn(tREAL32 DurationSeconds);
	void startFadeOut(tREAL32 DurationSeconds);
};


#endif /* SGX_AUDIO_MIX_CHANNEL_HPP */
