Skip to content

Instantly share code, notes, and snippets.

@thereverand
Forked from marek-stoj/gist:3637293
Created November 5, 2012 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thereverand/4019561 to your computer and use it in GitHub Desktop.
Save thereverand/4019561 to your computer and use it in GitHub Desktop.
SharpDX MediaEngine on Win8 Metro
//This works..... (for playing audio)
MediaEngine Media;
MediaManager.Startup();
var attributes = new MediaEngineAttributes
{
AudioCategory = AudioStreamCategory.BackgroundCapableMedia,
AudioEndpointRole = AudioEndpointRole.Multimedia
};
using (var factory = new MediaEngineClassFactory())
{
var mediaEngine = new MediaEngine(factory, attributes, MediaEngineCreateflags.Audioonly);
Media = mediaEngine.QueryInterface<MediaEngineEx>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment