/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_StreamSoundFileLoader.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_STREAM_SOUND_FILE_LOADER_H_ #define NW_SND_STREAM_SOUND_FILE_LOADER_H_ #include #include namespace nw { namespace snd { namespace internal { /* ======================================================================== StreamSoundFileLoader class ======================================================================== */ class StreamSoundFileLoader { public: StreamSoundFileLoader( io::FileStream& stream ) : m_Stream( stream ) {} bool LoadFileHeader( void* buffer, unsigned long size ); bool ReadStreamInfo( StreamSoundFile::StreamSoundInfo* strmInfo ) const; bool ReadStreamTrackInfo( StreamSoundFileReader::TrackInfo* trackInfo, int trackIndex ) const; bool ReadDspAdpcmChannelInfo( DspAdpcmParam* adpcmParam, DspAdpcmLoopParam* adpcmLoopParam, int channelIndex ) const; u32 GetChannelCount() const; u32 GetTrackCount() const; u32 GetDataBlockOffset() const { return m_Reader.GetDataBlockOffset(); } bool ReadAdpcBlockData( u16* yn1, u16* yn2, int blockIndex, int channelCount ); private: io::FileStream& m_Stream; StreamSoundFileReader m_Reader; }; } // namespace nw::snd::internal } // namespace nw::snd } // namespace nw #endif /* NW_SND_STREAM_SOUND_FILE_LOADER_H_ */