RavEngine
Loading...
Searching...
No Matches
wwise_renderer_fx.h
1/*
2Copyright 2018 Google Inc. All Rights Reserved.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS-IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17#ifndef RESONANCE_AUDIO_PLATFORM_WWISE_WWISE_RENDERER_FX_H_
18#define RESONANCE_AUDIO_PLATFORM_WWISE_WWISE_RENDERER_FX_H_
19
20#include "AK/SoundEngine/Common/AkTypes.h"
21#include "AK/SoundEngine/Common/IAkPlugin.h"
22#include "api/resonance_audio_api.h"
23
24namespace vraudio {
25namespace wwise {
26
27// Class that implements an out of place effect plugin for the binaural renderer
28// plugin of the Wwise integration.
29class WwiseRendererFx : public AK::IAkOutOfPlaceEffectPlugin {
30 public:
32
33 ~WwiseRendererFx() override = default;
34
35 // Initializes the effect plugin.
36 AKRESULT Init(AK::IAkPluginMemAlloc* memory_allocator,
37 AK::IAkEffectPluginContext* plugin_context,
38 AK::IAkPluginParam* plugin_params,
39 AkAudioFormat& audio_format) override;
40
41 // Terminates the effect plugin.
42 AKRESULT Term(AK::IAkPluginMemAlloc* memory_allocator) override;
43
44 // Resets the effect plugin.
45 AKRESULT Reset() override;
46
47 // Returns the plugin info.
48 AKRESULT GetPluginInfo(AkPluginInfo& plugin_info) override;
49
50 // Processes the next audio buffer.
51 void Execute(AkAudioBuffer* input, AkUInt32 frame_offset,
52 AkAudioBuffer* output) override;
53
54 // Processes execution when the voice is virtual.
55 AKRESULT TimeSkip(AkUInt32& num_frames) override;
56
57 private:
58 // Number of input ambisonic channels.
59 size_t num_ambisonic_channels_;
60
61 // Id of ambisonic source to be accumulated by the ambisonic bus.
62 int ambisonic_source_id_;
63
64 // Plugin instance id.
65 int instance_id_;
66};
67
68} // namespace wwise
69} // namespace vraudio
70
71#endif // RESONANCE_AUDIO_PLATFORM_WWISE_WWISE_RENDERER_FX_H_
Definition wwise_renderer_fx.h:29