1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2018 The Android Open Source Project 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 5cb93a386Sopenharmony_ci * you may not use this file except in compliance with the License. 6cb93a386Sopenharmony_ci * You may obtain a copy of the License at 7cb93a386Sopenharmony_ci * 8cb93a386Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 9cb93a386Sopenharmony_ci * 10cb93a386Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 11cb93a386Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 12cb93a386Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13cb93a386Sopenharmony_ci * See the License for the specific language governing permissions and 14cb93a386Sopenharmony_ci * limitations under the License. 15cb93a386Sopenharmony_ci */ 16cb93a386Sopenharmony_ci 17cb93a386Sopenharmony_ci#ifndef FLOWGRAPH_SOURCE_I16_H 18cb93a386Sopenharmony_ci#define FLOWGRAPH_SOURCE_I16_H 19cb93a386Sopenharmony_ci 20cb93a386Sopenharmony_ci#include <unistd.h> 21cb93a386Sopenharmony_ci#include <sys/types.h> 22cb93a386Sopenharmony_ci 23cb93a386Sopenharmony_ci#include "FlowGraphNode.h" 24cb93a386Sopenharmony_ci 25cb93a386Sopenharmony_cinamespace FLOWGRAPH_OUTER_NAMESPACE { 26cb93a386Sopenharmony_cinamespace flowgraph { 27cb93a386Sopenharmony_ci/** 28cb93a386Sopenharmony_ci * AudioSource that reads a block of pre-defined 16-bit integer data. 29cb93a386Sopenharmony_ci */ 30cb93a386Sopenharmony_ciclass SourceI16 : public FlowGraphSourceBuffered { 31cb93a386Sopenharmony_cipublic: 32cb93a386Sopenharmony_ci explicit SourceI16(int32_t channelCount); 33cb93a386Sopenharmony_ci 34cb93a386Sopenharmony_ci int32_t onProcess(int32_t numFrames) override; 35cb93a386Sopenharmony_ci 36cb93a386Sopenharmony_ci const char *getName() override { 37cb93a386Sopenharmony_ci return "SourceI16"; 38cb93a386Sopenharmony_ci } 39cb93a386Sopenharmony_ci}; 40cb93a386Sopenharmony_ci 41cb93a386Sopenharmony_ci} /* namespace flowgraph */ 42cb93a386Sopenharmony_ci} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ 43cb93a386Sopenharmony_ci 44cb93a386Sopenharmony_ci#endif //FLOWGRAPH_SOURCE_I16_H 45