Download

Unable to add UMediaSoundComponent header

So trying to convert my code for the update and attach a UMediaSoundComponent to an actor to play mediaplayer sounds. However this:


#include "Runtime/MediaAssets/Public/MediaSoundComponent.h"

Causes errors:


Error    C2039    '_InterlockedIncrement': is not a member of 'FWindowsPlatformAtomics'    C:\Program Files\Epic Games\UE_4.18\Engine\Source\Runtime\MediaUtils\Public\MediaSampleQueue.h    150   


Ok I think I figured out my issue. First you do need to create an AActor, place it in the level, and add the MediaSoundComponent. With this I was getting errors trying to include MediaSoundComponent.h however I found it was only in one file.

Tracked down the error to when I include <windows.h>/<stdio.h> which I was using to get drive paths. I’ll now have to find out how to do that.