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.
18 #include <cpp_audio_io.h>
24 #define LOG_TAG "TIZEN_N_AUDIO_IO"
26 int audio_in_create(int sample_rate, audio_channel_e channel, audio_sample_type_e type , audio_in_h* input)
28 return cpp_audio_in_create(sample_rate, channel, type, input);
31 int audio_in_destroy(audio_in_h input)
33 return cpp_audio_in_destroy(input);
36 int audio_in_set_sound_stream_info(audio_in_h input, sound_stream_info_h stream_info)
38 return cpp_audio_in_set_sound_stream_info(input, stream_info);
41 int audio_in_prepare(audio_in_h input)
43 return cpp_audio_in_prepare(input);
46 int audio_in_unprepare(audio_in_h input)
48 return cpp_audio_in_unprepare(input);
51 int audio_in_pause(audio_in_h input)
53 return cpp_audio_in_pause(input);
56 int audio_in_resume(audio_in_h input)
58 return cpp_audio_in_resume(input);
61 int audio_in_flush(audio_in_h input)
63 return cpp_audio_in_flush(input);
66 int audio_in_read(audio_in_h input, void *buffer, unsigned int length)
68 return cpp_audio_in_read(input, buffer, length);
71 int audio_in_get_buffer_size(audio_in_h input, int *size)
73 return cpp_audio_in_get_buffer_size(input, size);
76 int audio_in_get_sample_rate(audio_in_h input, int *sample_rate)
78 return cpp_audio_in_get_sample_rate(input, sample_rate);
81 int audio_in_get_channel(audio_in_h input, audio_channel_e *channel)
83 return cpp_audio_in_get_channel(input, channel);
86 int audio_in_get_sample_type(audio_in_h input, audio_sample_type_e *type)
88 return cpp_audio_in_get_sample_type(input, type);
91 int audio_in_set_stream_cb(audio_in_h input, audio_in_stream_cb callback, void* user_data)
93 return cpp_audio_in_set_stream_cb(input, callback, user_data);
96 int audio_in_unset_stream_cb(audio_in_h input)
98 return cpp_audio_in_unset_stream_cb(input);
101 int audio_in_peek(audio_in_h input, const void **buffer, unsigned int *length)
103 return cpp_audio_in_peek(input, buffer, length);
106 int audio_in_drop(audio_in_h input)
108 return cpp_audio_in_drop(input);
111 int audio_in_set_state_changed_cb(audio_in_h input, audio_in_state_changed_cb callback, void* user_data)
113 return cpp_audio_in_set_state_changed_cb(input, callback, user_data);
116 int audio_in_unset_state_changed_cb(audio_in_h input)
118 return cpp_audio_in_unset_state_changed_cb(input);
122 int audio_out_create_new(int sample_rate, audio_channel_e channel, audio_sample_type_e type, audio_out_h *output)
124 return cpp_audio_out_create_new(sample_rate, channel, type, output);
127 int audio_out_destroy(audio_out_h output)
129 return cpp_audio_out_destroy(output);
132 int audio_out_set_sound_stream_info(audio_out_h output, sound_stream_info_h stream_info)
134 return cpp_audio_out_set_sound_stream_info(output, stream_info);
137 int audio_out_prepare(audio_out_h output)
139 return cpp_audio_out_prepare(output);
142 int audio_out_unprepare(audio_out_h output)
144 return cpp_audio_out_unprepare(output);
147 int audio_out_pause(audio_out_h output)
149 return cpp_audio_out_pause(output);
152 int audio_out_resume(audio_out_h output)
154 return cpp_audio_out_resume(output);
157 int audio_out_drain(audio_out_h output)
159 return cpp_audio_out_drain(output);
162 int audio_out_flush(audio_out_h output)
164 return cpp_audio_out_flush(output);
167 int audio_out_write(audio_out_h output, void* buffer, unsigned int length)
169 return cpp_audio_out_write(output, buffer, length);
172 int audio_out_get_buffer_size(audio_out_h output, int *size)
174 return cpp_audio_out_get_buffer_size(output, size);
177 int audio_out_get_sample_rate(audio_out_h output, int *sample_rate)
179 return cpp_audio_out_get_sample_rate(output, sample_rate);
182 int audio_out_get_channel(audio_out_h output, audio_channel_e *channel)
184 return cpp_audio_out_get_channel(output, channel);
187 int audio_out_get_sample_type(audio_out_h output, audio_sample_type_e *type)
189 return cpp_audio_out_get_sample_type(output, type);
192 int audio_out_get_sound_type(audio_out_h output, sound_type_e *type)
194 return cpp_audio_out_get_sound_type(output, type);
197 int audio_out_set_stream_cb(audio_out_h output, audio_out_stream_cb callback, void* user_data)
199 return cpp_audio_out_set_stream_cb(output, callback, user_data);
202 int audio_out_unset_stream_cb(audio_out_h output)
204 return cpp_audio_out_unset_stream_cb(output);
207 int audio_out_set_state_changed_cb(audio_out_h output, audio_out_state_changed_cb callback, void* user_data)
209 return cpp_audio_out_set_state_changed_cb(output, callback, user_data);
212 int audio_out_unset_state_changed_cb(audio_out_h output)
214 return cpp_audio_out_unset_state_changed_cb(output);