Original Post
My code works fine up until I try to download the audio band to the performance object. Here is the essential code in my LoadSound function: m_pDMSegment is an array of audio segments, and m_iLoadedSegment is 0, since I can't get any files to load :P When I try to call Download() I get an unhandled exception. Anyone have any ideas? Thanks!
HRESULT LoadSound(LPCTSTR szFilename)
{
WCHAR wszFilename[256];
MultiByteToWideChar(CP_ACP, 0, szFilename, -1, wszFilename, 256);
m_pDMLoader->LoadObjectFromFile(CLSID_DirectMusicSegment, IID_IDirectMusicSegment8, wszFilename, (void **)m_pDMSegment[m_iLoadedSegments]);
m_pDMSegment[m_iLoadedSegments]->Download(m_pDMPerformance); // ERROR
return S_OK;
}