/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_StreamTrack.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: $ *---------------------------------------------------------------------------*/ #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 { // 定数 static const int WAVE_BUFFER_MULTIPLYING_FACTOR = 4; #ifdef NW_PLATFORM_CTR static const int WAVE_BUFFER_MAX = 5 * WAVE_BUFFER_MULTIPLYING_FACTOR; #endif // 列挙体 #ifdef NW_PLATFORM_CTR enum AdpcmContextType { ADPCM_CONTEXT_HEAD, // 波形先頭のもの ADPCM_CONTEXT_LOOP, // ループ時のもの ADPCM_CONTEXT_NUM }; #endif // 関数 #ifdef NW_PLATFORM_CTR void AppendWaveBuffer( nn::snd::WaveBuffer* pBuffer, bool lastFlag ); #endif // データ void* m_pBufferAddress; // ストリームデータバッファ DspAdpcmParam m_AdpcmParam; // 整理したら CTRWIN のみにできそう DspAdpcmLoopParam m_AdpcmLoopParam; #ifdef NW_PLATFORM_CTRWIN u16 m_AdpcmPredScale; #else Voice* m_pVoice; nn::snd::WaveBuffer m_WaveBuffer[WAVE_BUFFER_MAX]; nn::snd::AdpcmContext m_AdpcmContext[ADPCM_CONTEXT_NUM]; #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_ */