13316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk#!/bin/bash 23316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk 33316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkecho "Use SED to convert typedefs in AAudio API" 43316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk 53316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkecho "Top is ${ANDROID_BUILD_TOP}" 63316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil BurkLIBAAUDIO_DIR=${ANDROID_BUILD_TOP}/frameworks/av/media/libaaudio 73316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkecho "LIBAAUDIO_DIR is ${LIBAAUDIO_DIR}" 83316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil BurkOBOESERVICE_DIR=${ANDROID_BUILD_TOP}/frameworks/av/services/oboeservice 93316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkecho "OBOESERVICE_DIR is ${OBOESERVICE_DIR}" 103316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil BurkOBOETEST_DIR=${ANDROID_BUILD_TOP}/cts/tests/tests/nativemedia/aaudio/src/ 113316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkecho "OBOETEST_DIR is ${OBOETEST_DIR}" 123316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk 133316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkfunction convertPathPattern { 143316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk path=$1 153316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk pattern=$2 163316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk find $path -type f -name $pattern -exec sed -i -f ${LIBAAUDIO_DIR}/scripts/typedefs_to_int32.sed {} \; 173316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk} 183316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk 193316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burkfunction convertPath { 203316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk path=$1 213316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk convertPathPattern $1 '*.cpp' 223316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk convertPathPattern $1 '*.h' 233316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk} 243316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk 253316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil BurkconvertPath ${LIBAAUDIO_DIR} 263316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil BurkconvertPath ${OBOESERVICE_DIR} 273316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil BurkconvertPathPattern ${OBOETEST_DIR} test_aaudio.cpp 283316d5e6d375a4f09c681205e9094d30a0bfc4a2Phil Burk 29