Archived

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

Stardust

Volume of mp3

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