libpulse-simple.vapi 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. /***
  2. This file is part of PulseAudio.
  3. Copyright 2012 Alexander Kurtz <kurtz.alex@googlemail.com>
  4. PulseAudio is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published
  6. by the Free Software Foundation; either version 2.1 of the License,
  7. or (at your option) any later version.
  8. PulseAudio is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License
  13. along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
  14. ***/
  15. namespace PulseAudio {
  16. [Compact]
  17. [CCode (cheader_filename="pulse/simple.h", cname="pa_simple", cprefix="pa_simple_")]
  18. class Simple {
  19. public Simple(string? server = null, string? name = null, Stream.Direction dir = Stream.Direction.PLAYBACK,
  20. string? dev = null, string stream_name = "",
  21. SampleSpec ss = SampleSpec(){ format = SampleFormat.S16NE, rate = 44100, channels = 2 },
  22. ChannelMap? map = null, Stream.BufferAttr? attr = null, out int error = null);
  23. public int write(void* data, size_t bytes, out int error = null);
  24. public int drain(out int error = null);
  25. public int read(void* data, size_t bytes, out int error = null);
  26. public usec get_latency(out int error = null);
  27. public int flush(out int error = null);
  28. }
  29. }