/** 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/logicalchannel.hpp

*/

#ifndef SGX_AUDIO_LOGICAL_CHANNEL_HPP
#define SGX_AUDIO_LOGICAL_CHANNEL_HPP	1

class CLogicalChannel {
public:
	CSampleData *		m_pSampleData;
	CDeviceChannel *	m_pDeviceChannel;
	CMixChannel *		m_pMixChannel;

	sgxVector3			m_vPosition;
	tUINT32				m_iIndex;

	tREAL32				m_fPlayPtr;

	tBOOL				m_bIsPlaying;

	tBOOL				m_bReserved;

	CLogicalChannel(tUINT32 idx);

	// These are not virtual because any device-specifics should
	// be handled by the device channel. This is _logical_ in every
	// sense of the word.
	tBOOL	isPlaying() const;
	tBOOL	hasFinished() const;
	void	update(const tREAL32 telaps);
	void	pause();
	void	resume();
	void	stop();
	
	void	setVolume(const tREAL32 vol);
	void	setPan(const tREAL32 pan);

};

#endif /* SGX_AUDIO_LOGICAL_CHANNEL_HPP */
