Loop .mp3 playback
-
I'm very new to audio. I stumbled across the following code and I'm using the it to play audio .mp3s in my DX9.0 app. ( Nov 08 SDK )
::CoInitialize(NULL);
CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **)&g_pGraphBuilder);
g_pGraphBuilder->QueryInterface(IID_IMediaControl, (void **)&g_pMediaControl);
g_pGraphBuilder->AddSourceFilter(L"../Media/Audio/Music/Artifact_CharMain.mp3", L"../Media/Audio/Music/Artifact_CharMain.mp3", &pSource);
pSource->FindPin(L"Output", &pPin);
g_pGraphBuilder->Render(pPin);
pPin->Release();
g_pMediaControl->Run();How can I make the .mp3 loop? Thanks!
-
I'm very new to audio. I stumbled across the following code and I'm using the it to play audio .mp3s in my DX9.0 app. ( Nov 08 SDK )
::CoInitialize(NULL);
CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **)&g_pGraphBuilder);
g_pGraphBuilder->QueryInterface(IID_IMediaControl, (void **)&g_pMediaControl);
g_pGraphBuilder->AddSourceFilter(L"../Media/Audio/Music/Artifact_CharMain.mp3", L"../Media/Audio/Music/Artifact_CharMain.mp3", &pSource);
pSource->FindPin(L"Output", &pPin);
g_pGraphBuilder->Render(pPin);
pPin->Release();
g_pMediaControl->Run();How can I make the .mp3 loop? Thanks!
Fordfanboi wrote:
How can I make the .mp3 loop?
I've never worked with the media control. That said, if the COM interfaces provide a feature that you can use to have the control loop the resource that would be the best approach. If it does not, then you will have to code a loop yourself, I guess.
-
I'm very new to audio. I stumbled across the following code and I'm using the it to play audio .mp3s in my DX9.0 app. ( Nov 08 SDK )
::CoInitialize(NULL);
CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **)&g_pGraphBuilder);
g_pGraphBuilder->QueryInterface(IID_IMediaControl, (void **)&g_pMediaControl);
g_pGraphBuilder->AddSourceFilter(L"../Media/Audio/Music/Artifact_CharMain.mp3", L"../Media/Audio/Music/Artifact_CharMain.mp3", &pSource);
pSource->FindPin(L"Output", &pPin);
g_pGraphBuilder->Render(pPin);
pPin->Release();
g_pMediaControl->Run();How can I make the .mp3 loop? Thanks!
Fordfanboi wrote:
How can I make the .mp3 loop?
See here, about 3/4 of the way down.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons