Of course. Like many other things in the Windows API, there is more than one way to play .mp3 files. The βeasiestβ way to do this programmatically is to use DirectShow. MSDN docs even have an example of minimal code on a page called "How to play a file" to get started:
// Visual C++ example
Make sure you read the DirectShow documentation to get an idea of ββwhat should happen in the correct DirectShow application.
To "load" multimedia data into a chart, you need to implement IAsyncReader . Fortunately, the Windows SDK contains a sample that implements IAsyncReader called CAsyncReader . The sample reads the media file into the memory buffer, then uses CAsyncReader to stream data to the graph. It may be what you want. On my machine, the sample is located in the folder C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\filters\async .
source share