1 /* 2 * Copyright (C) 2010 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 /************************************************************************************************** 18 * AudioRecorder lifecycle 19 ****************************/ 20 extern SLresult android_audioRecorder_checkSourceSink(CAudioRecorder* ar); 21 22 extern SLresult android_audioRecorder_create(CAudioRecorder* ar); 23 24 /* 25 * Return 26 * SL_RESULT_SUCCESS 27 * SL_RESULT_PARAMETER_INVALID 28 * SL_RESULT_INTERNAL_ERROR 29 * SL_RESULT_PRECONDITIONS_VIOLATED 30 */ 31 extern SLresult android_audioRecorder_setConfig(CAudioRecorder* ar, const SLchar *configKey, 32 const void *pConfigValue, SLuint32 valueSize); 33 34 /* 35 * if pConfigValue is NULL, pValueSize contains the size required for the given key 36 * 37 * Return 38 * SL_RESULT_SUCCESS 39 * SL_RESULT_PARAMETER_INVALID 40 * SL_RESULT_INTERNAL_ERROR 41 * SL_RESULT_PRECONDITIONS_VIOLATED 42 */ 43 extern SLresult android_audioRecorder_getConfig(CAudioRecorder* ar, const SLchar *configKey, 44 SLuint32* pValueSize, void *pConfigValue); 45 46 extern SLresult android_audioRecorder_realize(CAudioRecorder* ar, SLboolean async); 47 48 extern void android_audioRecorder_preDestroy(CAudioRecorder* ar); 49 50 extern void android_audioRecorder_destroy(CAudioRecorder* ar); 51 52 /************************************************************************************************** 53 * AudioRecorder control 54 ****************************/ 55 56 extern void android_audioRecorder_setRecordState(CAudioRecorder* ar, SLuint32 state); 57 58 extern void android_audioRecorder_useRecordEventMask(CAudioRecorder *ar); 59 60 extern void android_audioRecorder_getPosition(CAudioRecorder *ar, SLmillisecond *pPosMsec); 61