1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: snd_SoundMemoryAllocatable.h 4 5 Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain proprietary 8 information of Nintendo and/or its licensed developers and are protected by 9 national and international copyright laws. They may not be disclosed to third 10 parties or copied or duplicated in any form, in whole or in part, without the 11 prior written consent of Nintendo. 12 13 The content herein is highly confidential and should be handled accordingly. 14 15 $Revision: 31311 $ 16 *---------------------------------------------------------------------------*/ 17 18 /** 19 * :include nw/snd/snd_SoundMemoryAllocatable.h 20 * 21 * @file snd_SoundMemoryAllocatable.h 22 */ 23 24 #ifndef NW_SND_SOUND_MEMORY_ALLOCATABLE_H_ 25 #define NW_SND_SOUND_MEMORY_ALLOCATABLE_H_ 26 27 namespace nw { 28 namespace snd { 29 30 //--------------------------------------------------------------------------- 31 //! @brief サウンドデータを配置するためのメモリを確保するためのインターフェイスです。 32 //! 33 //! @ref SoundHeap クラスがこのクラスを継承しています。 34 //! 35 //! @see SoundHeap クラス 36 //! 37 //! @date 2010/01/15 初版 38 //--------------------------------------------------------------------------- 39 class SoundMemoryAllocatable 40 { 41 public: 42 //---------------------------------------- 43 //! @name デストラクタ 44 //@{ 45 //--------------------------------------------------------------------------- 46 //! @brief デストラクタです。 47 //! 48 //! @date 2010/01/15 初版 49 //--------------------------------------------------------------------------- ~SoundMemoryAllocatable()50 virtual ~SoundMemoryAllocatable() {} 51 //@} 52 53 //---------------------------------------- 54 //! @name ヒープ操作 55 //@{ 56 //--------------------------------------------------------------------------- 57 //! @brief メモリ上のヒープからメモリ領域を割り当てます。 58 //! 59 //! 確保するメモリの先頭アドレスは 60 //! 32 バイトアライメントされている必要があります。 61 //! 62 //! @param[in] size 確保するメモリサイズです。 63 //! 64 //! @return 確保したメモリブロックの先頭アドレスを返します。 65 //! 確保に失敗した場合は NULL を返さなくてはなりません。 66 //! 67 //! @date 2010/01/15 初版 68 //--------------------------------------------------------------------------- 69 virtual void* Alloc( size_t size ) = 0; 70 //@} 71 }; 72 73 } // namespace nw::snd 74 } // namespace nw 75 76 77 #endif /* NW_SND_SOUND_MEMORY_ALLOCATABLE_H_ */ 78 79