1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: Sound3dApp.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: $ 16 *---------------------------------------------------------------------------*/ 17 18 #ifndef NW_SND_DEMO_SOUND_3D_APP_H_ 19 #define NW_SND_DEMO_SOUND_3D_APP_H_ 20 21 #include "demolib.h" 22 #include <nw/snd.h> 23 #include <nw/math.h> 24 25 class Sound3dApp : public nw::snd::demolib::AppBase 26 { 27 protected: 28 virtual void OnInitialize(); 29 virtual void OnFinalize(); 30 virtual void OnDrawUpLCD( nw::font::TextWriter& ); 31 virtual void OnDrawDownLCD( nw::font::TextWriter& ); 32 virtual void OnUpdatePad( nw::demo::Pad& ); 33 virtual void OnUpdate(); 34 35 private: 36 void InitializeSoundSystem(); 37 void CalcListenerMatrix( nw::math::MTX34* mtx ); 38 39 nw::snd::RomSoundArchive m_Archive; 40 nw::snd::SoundArchivePlayer m_ArchivePlayer; 41 nw::snd::SoundDataManager m_DataManager; 42 nw::snd::SoundHeap m_Heap; 43 nw::snd::SoundHandle m_Handle; 44 45 nw::snd::Sound3DManager m_3dManager; 46 nw::snd::Sound3DActor m_3dActor; 47 nw::snd::Sound3DListener m_3dListener; 48 49 nw::math::VEC3 m_ActorPos; 50 nw::math::MTX34 m_ListenerMtx; 51 52 int m_FilterType; 53 54 void* m_pMemoryForSoundSystem; 55 void* m_pMemoryForInfoBlock; 56 void* m_pMemoryForSoundDataManager; 57 void* m_pMemoryForSoundArchivePlayer; 58 void* m_pMemoryForSoundHeap; 59 void* m_pMemoryForStreamBuffer; 60 void* m_pMemoryFor3dManager; 61 }; 62 63 #endif /* NW_SND_DEMO_SOUND_3D_APP_H_ */ 64 65