1 /* 2 * Copyright (C) 2022 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 17 #include "oboe/OboeExtensions.h" 18 #include "aaudio/AAudioExtensions.h" 19 20 using namespace oboe; 21 isMMapSupported()22bool OboeExtensions::isMMapSupported(){ 23 return AAudioExtensions::getInstance().isMMapSupported(); 24 } 25 isMMapEnabled()26bool OboeExtensions::isMMapEnabled(){ 27 return AAudioExtensions::getInstance().isMMapEnabled(); 28 } 29 setMMapEnabled(bool enabled)30int32_t OboeExtensions::setMMapEnabled(bool enabled){ 31 return AAudioExtensions::getInstance().setMMapEnabled(enabled); 32 } 33 isMMapUsed(oboe::AudioStream * oboeStream)34bool OboeExtensions::isMMapUsed(oboe::AudioStream *oboeStream){ 35 return AAudioExtensions::getInstance().isMMapUsed(oboeStream); 36 } 37