1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: snd_WaveFileReader.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: 13145 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_SND_WAVE_FILE_READER_H_ 17 #define NW_SND_WAVE_FILE_READER_H_ 18 19 #include <nw/snd/snd_WaveFile.h> 20 21 namespace nw { 22 namespace snd { 23 namespace internal { 24 25 class WaveFileReader 26 { 27 public: 28 static const u32 SIGNATURE_FILE = NW_UT_MAKE_SIGWORD( 'C', 'W', 'A', 'V' ); 29 static SampleFormat GetSampleFormat( u8 encodeMethod ); 30 31 WaveFileReader( const void* waveFile ); 32 // WaveFileReader( const WaveFile::InfoBlockBody* infoBlockBody ); 33 34 bool ReadWaveInfo( WaveInfo* info, const void* waveDataOffsetOrigin = NULL ) const; 35 36 private: 37 const void* GetWaveDataAddress( 38 const WaveFile::ChannelInfo* info, 39 const void* waveDataOffsetOrigin ) const; 40 41 const WaveFile::InfoBlockBody* m_pInfoBlockBody; 42 const void* m_pDataBlockBody; 43 }; 44 45 } // namespace nw::snd::internal 46 } // namespace nw::snd 47 } // namespace nw 48 49 50 #endif /* NW_SND_WAVE_FILE_READER_H_ */ 51 52