void CSoundManager::LoadSoundData( LPWSTR filename ) {
CSoundData* SoundData = new CSoundData();
pLoader->LoadObjectFromFile(
CLSID_DirectMusicSegment,
IID_IDirectMusicSegment8,
filename, reinterpret_cast< LPVOID* >( &( SoundData->Segment ) ) );
SoundData->Segment->Download( Performance );
SoundData->Segment->GetAudioPathConfig( &( SoundData->Config ) );
Performance->CreateAudioPath( SoundData->Config, TRUE, &( SoundData->AudioPath ) );
AddDataPointer( SoundData );
}
SoundDataクラスには、
IUnknown* Gonfig;
IDirectMusicAudioPath8* AudioPath;
と宣言して、両方NULLで初期化しています。
どこがいけないのか、教えていただければ幸いです。
情報不足なら、追加でコードをのせさせていただきます。
よろしくお願いします。