153a5a1b3Sopenharmony_ci/*** 253a5a1b3Sopenharmony_ci This file is part of PulseAudio. 353a5a1b3Sopenharmony_ci 453a5a1b3Sopenharmony_ci Copyright 2012 Alexander Kurtz <kurtz.alex@googlemail.com> 553a5a1b3Sopenharmony_ci 653a5a1b3Sopenharmony_ci PulseAudio is free software; you can redistribute it and/or modify 753a5a1b3Sopenharmony_ci it under the terms of the GNU Lesser General Public License as published 853a5a1b3Sopenharmony_ci by the Free Software Foundation; either version 2.1 of the License, 953a5a1b3Sopenharmony_ci or (at your option) any later version. 1053a5a1b3Sopenharmony_ci 1153a5a1b3Sopenharmony_ci PulseAudio is distributed in the hope that it will be useful, but 1253a5a1b3Sopenharmony_ci WITHOUT ANY WARRANTY; without even the implied warranty of 1353a5a1b3Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1453a5a1b3Sopenharmony_ci General Public License for more details. 1553a5a1b3Sopenharmony_ci 1653a5a1b3Sopenharmony_ci You should have received a copy of the GNU Lesser General Public License 1753a5a1b3Sopenharmony_ci along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 1853a5a1b3Sopenharmony_ci***/ 1953a5a1b3Sopenharmony_ci 2053a5a1b3Sopenharmony_cinamespace PulseAudio { 2153a5a1b3Sopenharmony_ci [Compact] 2253a5a1b3Sopenharmony_ci [CCode (cheader_filename="pulse/simple.h", cname="pa_simple", cprefix="pa_simple_")] 2353a5a1b3Sopenharmony_ci class Simple { 2453a5a1b3Sopenharmony_ci public Simple(string? server = null, string? name = null, Stream.Direction dir = Stream.Direction.PLAYBACK, 2553a5a1b3Sopenharmony_ci string? dev = null, string stream_name = "", 2653a5a1b3Sopenharmony_ci SampleSpec ss = SampleSpec(){ format = SampleFormat.S16NE, rate = 44100, channels = 2 }, 2753a5a1b3Sopenharmony_ci ChannelMap? map = null, Stream.BufferAttr? attr = null, out int error = null); 2853a5a1b3Sopenharmony_ci public int write(void* data, size_t bytes, out int error = null); 2953a5a1b3Sopenharmony_ci public int drain(out int error = null); 3053a5a1b3Sopenharmony_ci public int read(void* data, size_t bytes, out int error = null); 3153a5a1b3Sopenharmony_ci public usec get_latency(out int error = null); 3253a5a1b3Sopenharmony_ci public int flush(out int error = null); 3353a5a1b3Sopenharmony_ci } 3453a5a1b3Sopenharmony_ci} 35