# \[SOLVED\] Using HDMI audio for ciWMFvideoplayer

**URL:** <https://discourse.libcinder.org/t/solved-using-hdmi-audio-for-ciwmfvideoplayer/848>\
**Category:** Using Cinder\
**Created:** [September 1, 2017, 8:51pm UTC](https://discourse.libcinder.org/t/solved-using-hdmi-audio-for-ciwmfvideoplayer/848 "2017-09-01T20:51:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craigson](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/craigson/32/43_2.png) [@Craigson](https://discourse.libcinder.org/u/Craigson)\
**Post date:** [September 1, 2017, 8:51pm UTC](https://discourse.libcinder.org/t/solved-using-hdmi-audio-for-ciwmfvideoplayer/848/1 "2017-09-01T20:51:53Z")

</div>

I’m trying to play the audio track that accompanies my video through the built-in speakers in my display. I’m using ciWMFVideoPlayer on msw10

I’ve tried changing the following lines:

```
//mTestVideo.loadMovie(videoPath, "Headphones (High Definition Audio Device)");
mTestVideo.loadMovie(videoPath, "HDMI (High-Definition Multimedia Interface)");

```

but to no avail… There’s no documentation RE the source URL so I took a shot in the dark. Anyone managed to get this to work?

---

<div class="post-metadata">

**Author:** ![ritesh](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/ritesh/32/260_2.png) [@ritesh](https://discourse.libcinder.org/u/ritesh)\
**Post date:** [September 1, 2017, 9:03pm UTC](https://discourse.libcinder.org/t/solved-using-hdmi-audio-for-ciwmfvideoplayer/848/2 "2017-09-01T21:03:55Z")

</div>

Hi @Craigson, it should list out the available audio devices. See [here](https://github.com/stimulant/Cinder-WMFVideo/blob/master/src/ciWMFVideoPlayerUtils.cpp#L1035). You can use that string as audio source. This needs to be cleaned up and made its own method or something.

---

<div class="post-metadata">

**Author:** ![xumo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/xumo/32/75_2.png) [@xumo](https://discourse.libcinder.org/u/xumo)\
**Post date:** [September 1, 2017, 9:07pm UTC](https://discourse.libcinder.org/t/solved-using-hdmi-audio-for-ciwmfvideoplayer/848/3 "2017-09-01T21:07:25Z")

</div>

You can get the audio device names with `ci::audio::Device::getOutputDevices()`. This has worked for me.

```
deviceName = "HDMI";
for (auto audioDevice : ci::audio::Device::getOutputDevices() ) {
	ci::app::console() << "Output device " << audioDevice->getName() << std::endl;
	std::size_t found = audioDevice->getName().find(deviceName);
	if (found != std::string::npos) {
		mAudioOutDevice = audioDevice->getName();
		ci::app::console() << "MAtched device " << audioDevice->getName() << std::endl;
	}
};
//and then
mMoviePlayer.loadMovie("thVideo.mp4", mAudioOutDevice);

```

But be aware that the devices name list might show the same device twice, one time as input and the other as output.

---

<div class="post-metadata">

**Author:** ![Craigson](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/craigson/32/43_2.png) [@Craigson](https://discourse.libcinder.org/u/Craigson)\
**Post date:** [September 1, 2017, 9:58pm UTC](https://discourse.libcinder.org/t/solved-using-hdmi-audio-for-ciwmfvideoplayer/848/4 "2017-09-01T21:58:33Z")

</div>

Thanks that worked a treat. Never worked with the audio API before, should’ve known better and looked there first!j
