//------------------------------------------------------------------------------
// Lamp : Open source game middleware
// Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//------------------------------------------------------------------------------

/** @file
 * ステレオサウンドヘッダ
 * @author Junpee
 */

#ifndef STEREO_SOUND_H_
#define STEREO_SOUND_H_

#include <Sound/System/SoundBuffer.h>

namespace Lamp{

//------------------------------------------------------------------------------
/**
 * ステレオサウンド
 */
class StereoSound : public SoundBuffer{
friend class SoundManager;
public:
	//--------------------------------------------------------------------------
	/**
	 * パンの設定
	 * @param pan パンを-1.f(左)から1.f(右)の間で指定する
	 */
	virtual void setPan(float pan);

	/**
	 * パンの取得
	 * @return パン
	 */
	virtual float getPan() const{ return pan_; }

	//--------------------------------------------------------------------------
	/**
	 * リセット
	 * @param flags リセットフラグ
	 */
	virtual void reset(Reset flags);

	//--------------------------------------------------------------------------
	/**
	 * 文字列への変換
	 * @return 文字列
	 */
	virtual String toString() const;

	//--------------------------------------------------------------------------
	// RTTI
	//--------------------------------------------------------------------------
	/**
	 * ステレオサウンドかどうか
	 * @return ステレオサウンドならtrue
	 */
	virtual bool isStereoSound() const{ return true; }

protected:
	//--------------------------------------------------------------------------
	/**
	 * コンストラクタ
	 * @param soundBuffer サウンドバッファ
	 */
	StereoSound(DirectSoundBuffer* soundBuffer);

	/**
	 * デストラクタ
	 */
	virtual ~StereoSound();

	/**
	 * ステレオサウンドデータのコピー
	 * @param destination コピー先ステレオサウンド
	 */
	virtual void copyStereoSoundData(StereoSound* destination);

private:
	// パン
	float pan_;

};

//------------------------------------------------------------------------------
} // End of namespace Lamp
#endif // End of STEREO_SOUND_H_
//------------------------------------------------------------------------------
