• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 #ifndef _Included_org_drrickorang_loopback_loopback_sles
18 #define _Included_org_drrickorang_loopback_loopback_sles
19 
20 #include "loopback.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 int slesComputeDefaultSettings(int performanceMode, int *samplingRate,
27              int *playerBufferFrameCount, int *recorderBufferFrameCount);
28 int slesInit(void ** ppCtx, int samplingRate, int frameCount, int micSource,
29              int performanceMode,
30              int testType, double frequency1, char* byteBufferPtr, int byteBufferLength,
31              short* loopbackTone, int maxRecordedLateCallbacks, int ignoreFirstFrames);
32 int slesDestroy(void ** ppCtx);
33 int slesProcessNext(void *pCtx, double *pSamples, long maxSamples);
34 int* slesGetRecorderBufferPeriod(void *pCtx);
35 int slesGetRecorderMaxBufferPeriod(void *pCtx);
36 int64_t slesGetRecorderVarianceBufferPeriod(void *pCtx);
37 int* slesGetPlayerBufferPeriod(void *pCtx);
38 int slesGetPlayerMaxBufferPeriod(void *pCtx);
39 int64_t slesGetPlayerVarianceBufferPeriod(void *pCtx);
40 int slesGetCaptureRank(void *pCtx);
41 int slesGetPlayerTimeStampsAndExpectedBufferPeriod(void *pCtx, callbackTimeStamps **ppTSs);
42 int slesGetRecorderTimeStampsAndExpectedBufferPeriod(void *pCtx, callbackTimeStamps **ppTSs);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif  // _Included_org_drrickorang_loopback_loopback_sles
49