/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_SoundMemoryAllocatable.h Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. 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. $Revision: 18106 $ *---------------------------------------------------------------------------*/ /** * :include nw/snd/snd_SoundMemoryAllocatable.h * * @file snd_SoundMemoryAllocatable.h */ #ifndef NW_SND_SOUND_MEMORY_ALLOCATABLE_H_ #define NW_SND_SOUND_MEMORY_ALLOCATABLE_H_ namespace nw { namespace snd { //--------------------------------------------------------------------------- //! @brief サウンドデータを配置するためのメモリを確保するためのインターフェイスです。 //! //! @ref SoundHeap クラスがこのクラスを継承しています。 //! //! @see SoundHeap クラス //! //! @date 2010/01/15 初版 //--------------------------------------------------------------------------- class SoundMemoryAllocatable { public: //---------------------------------------- //! @name デストラクタ //@{ //--------------------------------------------------------------------------- //! @brief デストラクタです。 //! //! @date 2010/01/15 初版 //--------------------------------------------------------------------------- virtual ~SoundMemoryAllocatable() {} //@} //---------------------------------------- //! @name ヒープ操作 //@{ //--------------------------------------------------------------------------- //! @brief メモリ上のヒープからメモリ領域を割り当てます。 //! //! 確保するメモリの先頭アドレスは //! 32 バイトアライメントされている必要があります。 //! //! @param[in] size 確保するメモリサイズです。 //! //! @return 確保したメモリブロックの先頭アドレスを返します。 //! 確保に失敗した場合は NULL を返さなくてはなりません。 //! //! @date 2010/01/15 初版 //--------------------------------------------------------------------------- virtual void* Alloc( size_t size ) = 0; //@} }; } // namespace nw::snd } // namespace nw #endif /* NW_SND_SOUND_MEMORY_ALLOCATABLE_H_ */