/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_MmlSequenceTrackAllocator.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. The content herein is highly confidential and should be handled accordingly. $Revision: 31311 $ *---------------------------------------------------------------------------*/ #ifndef NW_SND_MML_SEQUENCE_TRACK_ALLOCATOR_H_ #define NW_SND_MML_SEQUENCE_TRACK_ALLOCATOR_H_ #include #include #include namespace nw { namespace snd { namespace internal { namespace driver { class MmlParser; /* ======================================================================== class difinition ======================================================================== */ class MmlSequenceTrackAllocator : public SequenceTrackAllocator { typedef InstancePool MmlSequenceTrackPool; public: MmlSequenceTrackAllocator( MmlParser* parser ) : m_pParser( parser ) {} void SetMmlParser( MmlParser* parser ) { m_pParser = parser; } MmlParser* GetMmlParser() { return m_pParser; } virtual SequenceTrack* AllocTrack( SequenceSoundPlayer* player ); virtual void FreeTrack( SequenceTrack* track ); virtual int GetAllocatableTrackCount() const { return m_TrackPool.Count(); } unsigned long Create( void* buffer, unsigned long size ); void Destroy( void* buffer, unsigned long size ); private: MmlParser* m_pParser; MmlSequenceTrackPool m_TrackPool; }; } // namespace nw::snd::internal::driver } // namespace nw::snd::internal } // namespace nw::snd } // namespace nw #endif /* NW_SND_MML_SEQUENCE_TRACK_ALLOCATOR_H_ */