millicast / millicast-player-unreal-engine-plugin

Millicast Player plugin for Unreal Engine
Other
19 stars 15 forks source link

Unable to change used Sound Class for Millicast Streams #44

Closed MaxDorn96 closed 1 year ago

MaxDorn96 commented 1 year ago

Hello.

We ran into the Issue that we have setup custom SoundClasses in Unreal and the MillicastStream used the Default SoundClass of the VoipManager by Default, so even SoundClass Overrides in the MillicastAuioActor in Unreal Engine weren't used/applied.

We now tried to fix this on our own by referencing a SoundClass* Variable in the InitSoundWave Function in the DefaultAudioComponent.cpp but this is just a workaround, so we would like to ask for a default functionality to somewhere have a exposed UPorperty of a SoundClass where we can set the SoundClass to be used by the stream.

rweber89 commented 1 year ago

@MaxDorn96 this has been addressed in https://github.com/millicast/millicast-player-unreal-engine-plugin/pull/45/commits/5155464cbcf7246ec03825cd63a2fd41d7fceca6

If you have specified an override class this will now be respected, otherwise if none is selected it will fallback on the VoIP default class.

MaxDorn96 commented 1 year ago

Oh im sorry that this has been adressed once already.

In UE5.1 we tried overriding the Sound Class of the MillicastAudioActor but It never worked. We were confused since the Attenuation which we Set just below that was used so we looked into the Code and it always went to the Point where he overrides with the VoIP DefaultClass, I will try updating the Plugin with these changes and ensure that it behaves correctly now.

rweber89 commented 1 year ago

Exactly, that part of the code has been changed to respect overrides. The Cpp filename has also been changed to be the same as the header file.

rweber89 commented 1 year ago

@MaxDorn96 this would be on the dev branch by the way. My initial submission had a small bug that did the opposite of what it was supposed to, but the changes are all in the dev branch right now, not in UE5.1 branch.

MaxDorn96 commented 1 year ago

Hey, Ive just tested it in UE 5.1 and it looks like it works, tho there might be just a slight and little Inconvenience since I believe you designed this system to be used a bit different.

We basically have an Blueprint Actor which holds a Child Actor of Type MillicastAudioActor.

Since we are now able to correctly set the MediaSource in the Subsriber and Director we can now have 1 Blueprint which can pull all StreamingInformation based on a name or ID from a DataTable for example.

Now I can change the Soundclass in the Parameters of the ChildActor in the Blueprint but Once I place said Blueprint in the world I can't assign that Instance a different Soundclass since I can't Access the ChildActors MillicastAudioActor AudioComponent in the world.

Since we don't need this at the moment so it wouldn't cause an issue but it would be a nice to have to for example have a Function in the MillicastAudioActor to Set the SoundClass independently but that is like I said just a nice to have based on how we use the MillicastAudioActor.

I believe you designed this System so the AduioActor is placed in the World indepedently and then I could refernce it from the Blueprints through an Actor Variable for example.

rweber89 commented 1 year ago

@MaxDorn96 thank you for your feedback. The original design is a bit like you described. I have been working on making it less reliant on indepdently placed actors. They are supposed to be only glue with the functionality otherwise exposed so that in cases like yours it can easily be accessed.

rweber89 commented 1 year ago

@MaxDorn96 this was recently changed on dev - You are no longer required to use the MillicastAudioActor.

We now have a MillicastAudioComponent. How it is supposed to be used is shown in C++ in the MillicastAudioActor class, but that should now solve your problem.