//	PitchFactory.h - Singleton holding all the available pitch sets.
//  ----------------------------------------------------------------------------
//	This file is part of 'GameTemplate', template code for a game.
//	Copyright (C) 2011  Niall Moody
//	
//	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 3 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, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef PITCHFACTORY_H_
#define PITCHFACTORY_H_

#include "c0xHeaders.h"

#include <vector>

///	Singleton holding all the available pitch sets.
class PitchFactory
{
  public:
	///	Returns the sole instance of this factory.
	static PitchFactory& getInstance();

	///	Loads all the pitch sets in the pitches subdir.
	void loadPitches();

	///	Returns a selection of pitches from a random pitch set.
	std::vector<float> getPitches(int numPitches);
  private:
	///	Constructor.
	PitchFactory();
	///	Destructor.
	~PitchFactory();

	///	The available pitch sets.
	std::vector<array<float, 8> > pitchSets;
	///	The pitchSet we last used in getPitches().
	int lastSet;
};

#endif
