1 /* 2 * Copyright 2015 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 package com.google.sample.oboe.manualtest; 18 19 /** 20 * Native synthesizer and audio output. 21 */ 22 public class OboeAudioOutputStream extends OboeAudioStream { 23 24 // WARNING - must match order in strings.xml 25 public static final int TONE_TYPE_SAW_PING = 0; 26 public static final int TONE_TYPE_SINE = 1; 27 public static final int TONE_TYPE_IMPULSE = 2; 28 public static final int TONE_TYPE_SAWTOOTH = 3; 29 30 @Override isInput()31 public boolean isInput() { 32 return false; 33 } 34 setToneEnabled(boolean enabled)35 public native void setToneEnabled(boolean enabled); 36 setToneType(int index)37 public native void setToneType(int index); 38 setChannelEnabled(int channelIndex, boolean enabled)39 public native void setChannelEnabled(int channelIndex, boolean enabled); 40 setSignalType(int type)41 public native void setSignalType(int type); 42 } 43