/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_StreamTrack.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: $ *---------------------------------------------------------------------------*/ #ifndef NW_SND_STREAM_TRACK_H_ #define NW_SND_STREAM_TRACK_H_ #include #include #ifdef NW_PLATFORM_CTR #include // nw::snd::Voice::CHANNEL_MAX #include // nw::snd::VOICE_OUT_MAX #endif namespace nw { namespace snd { namespace internal { namespace driver { struct StreamChannel { void* m_pBufferAddress; // ストリームデータバッファ DspAdpcmParam m_AdpcmParam; // 整理したら CTRWIN のみにできそう DspAdpcmLoopParam m_AdpcmLoopParam; #ifdef NW_PLATFORM_CTRWIN u16 m_AdpcmPredScale; #else // CTR_SDK 向けでは「1 StreamChannel = 1 NW Voice = 5 SDK Voice」の関係になる static const int WAVE_BUFFER_MAX = 5; enum AdpcmContextType { ADPCM_CONTEXT_HEAD, // 波形先頭のもの ADPCM_CONTEXT_LOOP, // ループ時のもの ADPCM_CONTEXT_NUM }; Voice* m_pVoice; nn::snd::WaveBuffer m_WaveBuffer[WAVE_BUFFER_MAX]; nn::snd::AdpcmContext m_AdpcmContext[ADPCM_CONTEXT_NUM]; void AppendWaveBuffer( nn::snd::WaveBuffer* pBuffer, bool lastFlag ); #endif }; struct StreamTrack { public: bool m_ActiveFlag; #ifdef NW_PLATFORM_CTRWIN Voice* m_pVoice; #else StreamChannel* m_pChannels[Voice::CHANNEL_MAX]; #endif StreamSoundFileReader::TrackInfo m_TrackInfo; f32 m_Volume; f32 m_Pan; f32 m_SurroundPan; }; } // namespace nw::snd::internal::driver } // namespace nw::snd::internal } // namespace nw::snd } // namespace nw #endif /* NW_SND_STREAM_TRACK_H_ */