DirectMusic is speed insane !
When I play midis with DirectMusic (segments to audiopath to performance), they play at a crazy fast tempo... insane ! But unlike my graphics engine, I don''t need speed like this. I would like my midi to be playing their original speed... how ?
/* Bullmax */
-------------
Reality has many forms : good and evil, black and white, yin and yang.
I do not have this problem.
What is the code you are using? as by default Direct Music plays according to the "written" tempo.
Techlead
www.myran.com/enilno
What is the code you are using? as by default Direct Music plays according to the "written" tempo.
Techlead
www.myran.com/enilno
// INITIALIZATION ////CoInitialize( NULL );//if (FAILED( CoCreateInstance( CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, IID_IDirectMusicLoader8, (VOID**) &m_pLoader ) )) return( Error( "Could not create media loader" ) );//if (FAILED( CoCreateInstance( CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC, IID_IDirectMusicPerformance8, (VOID**) &m_pPerformance ) )) return( Error( "Could not create sound mixer" ) );//if (FAILED( m_pPerformance->InitAudio( NULL, NULL, Window.hWindow(), DMUS_APATH_SHARED_STEREOPLUSREVERB, 64, DMUS_AUDIOF_ALL, NULL ) )) return( Error( "Could not prepare sound mixer" ) );//if (FAILED( m_pPerformance->GetDefaultAudioPath( &m_pAudioPath ) )) return( Error( "Could not get audio path" ) );//if (FAILED( m_pAudioPath->SetVolume( 0, 0 ) )) Error( "Could not set default volume" );//////// LOADING //WCHAR strFilename[256];MltiByteToWideChar( CP_ACP, MB_PRECOMPOSED, _strPath, -1, strFilename, MAX_PATH );//if (FAILED( m_pLoader->LoadObjectFromFile( CLSID_DirectMusicSegment, IID_IDirectMusicSegment8, strFilename, (VOID**) &pSegment ) )) return( Error( "Could not load wave from file" ) );//if (FAILED( pSegment->Download( m_pPerformance ) )) return( Error( "Could not load wave into mixer" ) );// ////// PLAYING //m_pPerformance->PlaySegmentEx( m_lstMidis[_indSound], NULL, NULL, DMUS_SEGF_DEFAULT | DMUS_SEGF_SECONDARY, 0, NULL, NULL, NULL );
[edited by - Bullmax on January 30, 2003 11:44:06 PM]
I am wondering if it is :
that cause the problem. I don''t know if by using the DMUS_SEGF_DEFAULT and DMUS_SEGF_SECONDARY flags, I am soing something wrong...
/* Bullmax */
-------------
Reality has many forms : good and evil, black and white, yin and yang.
m_pPerformance->PlaySegmentEx( m_lstMidis[_indSound], NULL, NULL, DMUS_SEGF_DEFAULT | DMUS_SEGF_SECONDARY, 0, NULL, NULL, NULL );
that cause the problem. I don''t know if by using the DMUS_SEGF_DEFAULT and DMUS_SEGF_SECONDARY flags, I am soing something wrong...
/* Bullmax */
-------------
Reality has many forms : good and evil, black and white, yin and yang.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement