#include <Media.h>
Public Member Functions | |
| CMedia () | |
| Standard constructor. | |
| ~CMedia () | |
| Standard destructor. | |
| bool | Init (HWND hWnd, LPCWSTR filename) |
| Loads music file and creates GraphBuilder. | |
| bool | Play () |
| Plays music file. | |
| bool | Pause () |
| Pause music file. | |
| bool | Stop () |
| Stops music file. | |
| void | SetLoop () |
| Sets loop option for playing file. | |
| void | OnGraphEvent () |
| This function catches graph events. | |
It uses DirectShow GraphBuilder for playing media files. One instance of this class is made for each media file to be played.
| CMedia::CMedia | ( | ) |
Standard constructor.
| CMedia::~CMedia | ( | ) |
Standard destructor.
| bool CMedia::Init | ( | HWND | hWnd, | |
| LPCWSTR | filename | |||
| ) |
Loads music file and creates GraphBuilder.
| filename | - media file |
| bool CMedia::Play | ( | ) |
Plays music file.
| bool CMedia::Pause | ( | ) |
Pause music file.
| bool CMedia::Stop | ( | ) |
Stops music file.
| void CMedia::SetLoop | ( | ) |
Sets loop option for playing file.
| void CMedia::OnGraphEvent | ( | ) |
This function catches graph events.
1.5.3