/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_StreamSoundFileLoader.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: 14068 $ *---------------------------------------------------------------------------*/ #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_ */