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_CPULSESTREAM_SPEC_H__
18 #define __TIZEN_MEDIA_AUDIO_IO_CPULSESTREAM_SPEC_H__
24 #include <pulse/pulseaudio.h>
27 namespace tizen_media_audio {
31 * class CPulseStreamSpec
33 class CPulseStreamSpec {
37 STREAM_LATENCY_INPUT_LOW,
38 STREAM_LATENCY_INPUT_MID,
39 STREAM_LATENCY_INPUT_HIGH,
40 STREAM_LATENCY_INPUT_VOIP,
41 STREAM_LATENCY_OUTPUT_LOW,
42 STREAM_LATENCY_OUTPUT_MID,
43 STREAM_LATENCY_OUTPUT_HIGH,
44 STREAM_LATENCY_OUTPUT_VOIP,
50 EStreamLatency mLatency;
51 CAudioInfo mAudioInfo;
52 pa_sample_spec mSampleSpec;
53 pa_channel_map mChannelMap;
54 const char* mStreamName;
57 void _adjustSpec() throw (CAudioError);
60 /* Constructor & Destructor */
61 CPulseStreamSpec() throw (CAudioError);
62 CPulseStreamSpec(EStreamLatency latency, CAudioInfo& audioInfo) throw (CAudioError);
63 CPulseStreamSpec(EStreamLatency latency, CAudioInfo& audioInfo, int customLatency) throw (CAudioError);
67 EStreamLatency getStreamLatency();
68 const char* getStreamLatencyToString();
69 CAudioInfo getAudioInfo();
70 pa_sample_spec getSampleSpec();
71 pa_channel_map getChannelMap();
72 const char* getStreamName();
76 } /* namespace tizen_media_audio */
79 #endif /* __TIZEN_MEDIA_AUDIO_IO_CPULSESTREAM_SPEC_H__ */