1 /* 2 * Copyright (C) 2016 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 package com.android.ndkaudio; 17 18 import android.media.AudioRouting; 19 20 public class AudioPlayer { 21 public AudioPlayer() { 22 Create(); 23 } 24 25 public native void Create(); 26 public native void Destroy(); 27 28 public native void RealizePlayer(); 29 public native void RealizeRoutingProxy(); 30 31 public native void Start(); 32 public native void Stop(); 33 34 public native AudioRouting GetRoutingInterface(); 35 36 public native void ReleaseRoutingInterface(AudioRouting proxyObj); 37 38 public native long GetLastSLResult(); 39 public native void ClearLastSLResult(); 40 } 41