Tag: C++

Play an MP3 with Media Foundation

An under 100 lines of C++ code sample that plays an MP3 file with Microsoft Media Foundation. https://github.com/roman380/MediaFoundationMinimalAudioPlayback Comes from this StackOverflow question, however unlike Microsoft’s sample it does not spread simple code among multiple source code files, gives a quick way to build & run, shows modern C++ practices (including Microsoft Windows Implementation Library…

Read the full article

DirectShow VCam source code

Introducing another popular DirectShow project: Vivek’s source filter which emulates a video capture device. For a long time the code was hosted on P “The March Hare” W’s website, which was eventually taken down. I placed the recovered project, binaries, README and upgrade to Visual Studio 2019 on GitHub: roman380/tmhare.mvps.org-vcam: Original Vivek’s popular sample project…

Read the full article

Windows 10 SDK RTWorkQ.h and C++/WinRT winrt::implements

Interface methods lack pure specifiers. This might be OK for some development but once you try to inherit your handler class from public winrt::implements<AsyncCallback, IRtwqAsyncCallback> you are in trouble! 1>Foo.obj : error LNK2001: unresolved external symbol “public: virtual long __cdecl IRtwqAsyncCallback::GetParameters(unsigned long *,unsigned long *)” (?GetParameters@IRtwqAsyncCallback@@UEAAJPEAK0@Z) 1>Foo.obj : error LNK2001: unresolved external symbol “public: virtual…

Read the full article