2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __TIZEN_MEDIA_AUDIO_IO_CAUDIO_INPUT_H__
18 #define __TIZEN_MEDIA_AUDIO_IO_CAUDIO_INPUT_H__
24 namespace tizen_media_audio {
28 * A class CAudioInput that inherited from CAudioIO
30 class CAudioInput : public CAudioIO {
32 /* Constructor & Destructor */
33 CAudioInput(CAudioInfo& info);
35 unsigned int sampleRate,
36 CAudioInfo::EChannel channel,
37 CAudioInfo::ESampleType sampleType,
38 CAudioInfo::EAudioType audioType);
41 /* Overridden Handler */
42 virtual void onStream(CPulseAudioClient* pClient, size_t length);
44 /* Implemented Methods */
45 virtual void initialize();
46 virtual void finalize();
48 virtual void prepare();
49 virtual void unprepare();
52 virtual void resume();
57 virtual int getBufferSize();
59 /* Overridden Methods */
60 virtual void setStreamCallback(SStreamCallback callback);
63 size_t read(void* buffer, size_t length);
64 int peek(const void** buffer, size_t* length);
69 void __setInit(bool flag);
73 bool __mIsUsedSyncRead;
78 } /* namespace tizen_media_audio */
81 #endif /* __TIZEN_MEDIA_AUDIO_IO_CAUDIO_INPUT_H__ */