blob: eeb37581b697e1ae2e030e0d2b7b144708e315dc [file] [log] [blame]
François Gaffie2110e042015-03-24 08:41:51 +01001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Mikhail Naganove13c6792019-05-14 10:32:51 -070017#include <EngineInterface.h>
François Gaffie2110e042015-03-24 08:41:51 +010018#include "Engine.h"
19
Mikhail Naganove13c6792019-05-14 10:32:51 -070020namespace android {
21namespace audio_policy {
François Gaffie2110e042015-03-24 08:41:51 +010022
Mikhail Naganove13c6792019-05-14 10:32:51 -070023extern "C" EngineInterface* createEngineInstance()
François Gaffie2110e042015-03-24 08:41:51 +010024{
Mikhail Naganove13c6792019-05-14 10:32:51 -070025 return new (std::nothrow) Engine();
François Gaffie2110e042015-03-24 08:41:51 +010026}
27
Mikhail Naganove13c6792019-05-14 10:32:51 -070028extern "C" void destroyEngineInstance(EngineInterface *engine)
François Gaffie2110e042015-03-24 08:41:51 +010029{
Mikhail Naganove13c6792019-05-14 10:32:51 -070030 delete static_cast<Engine*>(engine);
François Gaffie2110e042015-03-24 08:41:51 +010031}
32
33} // namespace audio_policy
34} // namespace android