Jump to content
  • Advertisement
Sign in to follow this  
akira32

DirectShow can play two music file at the same time?

This topic is 4322 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

DirectShow can play two music file at the same time? If I want to play two music file(mp3,wav) at the same time, whether I must create two instances of (m_pGB,m_pMS,m_pME,m_pBA)? Inidivial instance of (m_pGB,m_pMS,m_pME,m_pBA) plays its music file(mp3,wav). two instances of (m_pGB,m_pMS,m_pME,m_pBA) m_pGB1,m_pMS1,m_pME1,m_pBA1 for play mp3 m_pGB2,m_pMS2,m_pME2,m_pBA2 for play wav //above are original code,come from DirectX SDK IGraphBuilder *m_pGB; IMediaSeeking *m_pMS; IMediaControl *m_pMC; IMediaEventEx *m_pME; IBasicAudio *m_pBA; HRESULT CSoundManagerAdv::InitDirectShow(void) { HRESULT hr = S_OK; hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **)&m_pGB); if (FAILED(hr)) return hr; if (FAILED(hr = m_pGB->QueryInterface(IID_IMediaControl, (void **)&m_pMC))) return hr; if (FAILED(hr = m_pGB->QueryInterface(IID_IMediaSeeking, (void **)&m_pMS))) return hr; if (FAILED(hr = m_pGB->QueryInterface(IID_IMediaEventEx, (void **)&m_pME))) return hr; if (FAILED(hr = m_pGB->QueryInterface(IID_IBasicAudio, (void **)&m_pBA))) return hr; return S_OK; }

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!