How to play a sound file in a Windows 8 Metro application using WinRT?

The WinRT API surface in Windows 8 seems to have the ability to load and save Playlists , and capture audio . What I'm looking for is somewhat simpler: Does WinRT allow me to play sound from a file? If not, what is the recommended API for native code (C ++) that plays sound from a file in a Windows 8 metro application?

+8
c ++ windows-8 windows-runtime microsoft-metro audio
source share
1 answer

If you are on the WWA, you want to use the HTML tag to play audio. In xaml you want to use MediaElement.

If you are using low-level C ++, you want to use the MediaFoundation API.

+9
source share

All Articles