newly added updated FMODStudio plugin for migration
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2024-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "IAudioLink.h"
|
||||
#include "AudioDevice.h"
|
||||
#include "IBufferedAudioOutput.h"
|
||||
#include "FMODAudioLinkInputClient.h"
|
||||
|
||||
//* AudioLink Instance, a container holding shared pointers for lifetime management. */
|
||||
struct FFMODAudioLink : IAudioLink
|
||||
{
|
||||
FSharedBufferedOutputPtr ProducerSP;
|
||||
|
||||
FSharedFMODAudioLinkInputClientPtr ConsumerSP;
|
||||
|
||||
FAudioDevice* AudioDevice;
|
||||
|
||||
FFMODAudioLink(const FSharedBufferedOutputPtr& InProducerSP, const FSharedFMODAudioLinkInputClientPtr& InConsumerSP, FAudioDevice* InAudioDevice = nullptr)
|
||||
: ProducerSP(InProducerSP)
|
||||
, ConsumerSP(InConsumerSP)
|
||||
, AudioDevice(InAudioDevice)
|
||||
{}
|
||||
|
||||
virtual ~FFMODAudioLink() override
|
||||
{
|
||||
if (ConsumerSP.IsValid())
|
||||
{
|
||||
ConsumerSP->Stop();
|
||||
}
|
||||
if (AudioDevice && ProducerSP.IsValid())
|
||||
{
|
||||
ProducerSP->Stop(AudioDevice);
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user