• Advertisement

Archived

This topic is now archived and is closed to further replies.

Volume of mp3

This topic is 5620 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

Hi! I use the IMediaControl to play a mp3. very basic like this (I don''t know if it is the best way but it is a strip from PlayWnd) but I can''t figure out how to alter the volume. BOOL CMusic::Init(TCHAR *pFileName) { WCHAR wFileName[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, pFileName, -1, wFileName, MAX_PATH); HRESULT hr; hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&m_pGB); if(SUCCEEDED(hr)) { m_pGB->RenderFile(wFileName, NULL); m_pGB->QueryInterface(IID_IMediaControl, (void **)&m_pMC); } return TRUE; } void CMusic:lay() { m_pMC->Run(); } any ideas?

Share this post


Link to post
Share on other sites
Advertisement
You need to take a look at IBasicAudio Interface. It has a function called put_Volume. It also allows for panning through put_Balance.

Share this post


Link to post
Share on other sites

  • Advertisement