;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "alsa/alsa-config")
(libload "libc/constants")


#? *** pcm

;; dummy function that adds Alsa C header files in C file
(eval `(de dummy_pcm () ,alsa-cpheader-cmd ()))

#? * (dummy_pcm)
#? * (snd_pcm_open <pcm> <name> <stream> <mode>)
#? * (snd_pcm_open_lconf <pcm> <name> <stream> <mode> <lconf>)
#? * (snd_pcm_close <pcm>)
#? * (snd_pcm_name <pcm>)
#? * (snd_pcm_type <pcm>)
#? * (snd_pcm_stream <pcm>)
#? * (snd_pcm_poll_descriptors_count <pcm>)
#? * (snd_pcm_poll_descriptors <pcm> <pfds> <space>)
#? * (snd_pcm_poll_descriptors_revents <pcm> <pfds> <nfds> <revents>)
#? * (snd_pcm_nonblock <pcm> <nonblock>)
#? * (snd_async_add_pcm_handler <handler> <pcm> <callback> <private_data>)
#? * (snd_async_handler_get_pcm <handler>)
#? * (snd_pcm_info <pcm> <info>)
#? * (snd_pcm_hw_params <pcm> <params>)
#? * (snd_pcm_hw_free <pcm>)
#? * (snd_pcm_sw_params <pcm> <params>)
#? * (snd_pcm_prepare <pcm>)
#? * (snd_pcm_reset <pcm>)
#? * (snd_pcm_status <pcm> <status>)
#? * (snd_pcm_start <pcm>)
#? * (snd_pcm_drop <pcm>)
#? * (snd_pcm_drain <pcm>)
#? * (snd_pcm_pause <pcm> <enable>)
#? * (snd_pcm_state <pcm>)
#? * (snd_pcm_delay <pcm> <delayp>)
#? * (snd_pcm_resume <pcm>)
#? * (snd_pcm_avail_update <pcm>)
#? * (snd_pcm_rewind <pcm> <frames>)
#? * (snd_pcm_writei <pcm> <buffer> <size>)
#? * (snd_pcm_readi <pcm> <buffer> <size>)
#? * (snd_pcm_writen <pcm> <bufs> <size>)
#? * (snd_pcm_readn <pcm> <bufs> <size>)
#? * (snd_pcm_wait <pcm> <timeout>)
#? * (snd_pcm_link <pcm1> <pcm2>)
#? * (snd_pcm_unlink <pcm>)
#? * (snd_pcm_info_sizeof)
#? * (snd_pcm_info_alloca <s>)
#? * (snd_pcm_info_malloc <s>)
#? * (snd_pcm_info_free <s>)
#? * (snd_pcm_info_copy <dst> <src>)
#? * (snd_pcm_info_get_device <s>)
#? * (snd_pcm_info_get_subdevice <s>)
#? * (snd_pcm_info_get_stream <s>)
#? * (snd_pcm_info_get_card <s>)
#? * (snd_pcm_info_get_id <s>)
#? * (snd_pcm_info_get_name <s>)
#? * (snd_pcm_info_get_subdevice_name <s>)
#? * (snd_pcm_info_get_class <s>)
#? * (snd_pcm_info_get_subclass <s>)
#? * (snd_pcm_info_get_subdevices_count <s>)
#? * (snd_pcm_info_get_subdevices_avail <s>)
#? * (snd_pcm_info_get_sync <s> <sid>)
#? * (snd_pcm_info_set_device <s> <val>)
#? * (snd_pcm_info_set_subdevice <s> <val>)
#? * (snd_pcm_info_set_stream <s> <val>)
#? * (snd_pcm_hw_params_any <pcm> <params>)
#? * (snd_pcm_hw_params_can_mmap_sample_resolution <params>)
#? * (snd_pcm_hw_params_can_overrange <params>)
#? * (snd_pcm_hw_params_can_pause <params>)
#? * (snd_pcm_hw_params_can_resume <params>)
#? * (snd_pcm_hw_params_can_sync_start <params>)
#? * (snd_pcm_hw_params_is_double <params>)
#? * (snd_pcm_hw_params_is_batch <params>)
#? * (snd_pcm_hw_params_is_block_transfer <params>)
#? * (snd_pcm_hw_params_is_half_duplex <params>)
#? * (snd_pcm_hw_params_is_joint_duplex <params>)
#? * (snd_pcm_hw_params_get_rate_numden <params> <rate_num> <rate_den>)
#? * (snd_pcm_hw_params_get_sbits <params>)
#? * (snd_pcm_hw_params_get_fifo_size <params>)
#? * (snd_pcm_hw_params_strategy <pcm> <params> <strategy> <badness_min> <badness_max>)
#? * (snd_pcm_hw_strategy_free <strategy>)
#? * (snd_pcm_hw_strategy_simple <strategyp> <badness_min> <badness_max>)
#? * (snd_pcm_hw_params_try_explain_failure <pcm> <fail> <success> <depth> <out>)
#? * (snd_pcm_hw_params_sizeof)
#? * (snd_pcm_hw_params_alloca <s>)
#? * (snd_pcm_hw_params_malloc <s>)
#? * (snd_pcm_hw_params_free <s>)
#? * (snd_pcm_hw_params_copy <dst> <src>)
#? * (snd_pcm_hw_params_get_access <s>)
#? * (snd_pcm_hw_params_test_access <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_access <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_access_first <pcm> <params>)
#? * (snd_pcm_hw_params_set_access_last <pcm> <params>)
#? * (snd_pcm_hw_params_set_access_mask <pcm> <params> <mask>)
#? * (snd_pcm_hw_params_get_access_mask <params> <mask>)
#? * (snd_pcm_hw_params_get_format <params>)
#? * (snd_pcm_hw_params_test_format <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_format <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_format_first <pcm> <params>)
#? * (snd_pcm_hw_params_set_format_last <pcm> <params>)
#? * (snd_pcm_hw_params_set_format_mask <pcm> <params> <mask>)
#? * (snd_pcm_hw_params_get_format_mask <params> <mask>)
#? * (snd_pcm_hw_params_get_subformat <params>)
#? * (snd_pcm_hw_params_test_subformat <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_subformat <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_subformat_first <pcm> <params>)
#? * (snd_pcm_hw_params_set_subformat_last <pcm> <params>)
#? * (snd_pcm_hw_params_set_subformat_mask <pcm> <params> <mask>)
#? * (snd_pcm_hw_params_get_subformat_mask <params> <mask>)
#? * (snd_pcm_hw_params_get_channels <params>)
#? * (snd_pcm_hw_params_get_channels_min <params>)
#? * (snd_pcm_hw_params_get_channels_max <params>)
#? * (snd_pcm_hw_params_test_channels <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_channels <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_channels_min <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_channels_max <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_channels_minmax <pcm> <params> <min> <max>)
#? * (snd_pcm_hw_params_set_channels_near <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_channels_first <pcm> <params>)
#? * (snd_pcm_hw_params_set_channels_last <pcm> <params>)
#? * (snd_pcm_hw_params_get_rate <params> <dir>)
#? * (snd_pcm_hw_params_get_rate_min <params> <dir>)
#? * (snd_pcm_hw_params_get_rate_max <params> <dir>)
#? * (snd_pcm_hw_params_test_rate <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_rate <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_rate_min <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_rate_max <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_rate_minmax <pcm> <params> <min> <mindir> <max> <maxdir>)
#? * (snd_pcm_hw_params_set_rate_near <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_rate_first <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_rate_last <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_get_period_time <params> <dir>)
#? * (snd_pcm_hw_params_get_period_time_min <params> <dir>)
#? * (snd_pcm_hw_params_get_period_time_max <params> <dir>)
#? * (snd_pcm_hw_params_test_period_time <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_time <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_time_min <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_time_max <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_time_minmax <pcm> <params> <min> <mindir> <max> <maxdir>)
#? * (snd_pcm_hw_params_set_period_time_near <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_time_first <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_period_time_last <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_get_period_size <params> <dir>)
#? * (snd_pcm_hw_params_get_period_size_min <params> <dir>)
#? * (snd_pcm_hw_params_get_period_size_max <params> <dir>)
#? * (snd_pcm_hw_params_test_period_size <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_size <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_size_min <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_size_max <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_size_minmax <pcm> <params> <min> <mindir> <max> <maxdir>)
#? * (snd_pcm_hw_params_set_period_size_near <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_period_size_first <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_period_size_last <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_period_size_integer <pcm> <params>)
#? * (snd_pcm_hw_params_get_periods <params> <dir>)
#? * (snd_pcm_hw_params_get_periods_min <params> <dir>)
#? * (snd_pcm_hw_params_get_periods_max <params> <dir>)
#? * (snd_pcm_hw_params_test_periods <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_periods <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_periods_min <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_periods_max <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_periods_minmax <pcm> <params> <min> <mindir> <max> <maxdir>)
#? * (snd_pcm_hw_params_set_periods_near <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_periods_first <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_periods_last <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_periods_integer <pcm> <params>)
#? * (snd_pcm_hw_params_get_buffer_time <params> <dir>)
#? * (snd_pcm_hw_params_get_buffer_time_min <params> <dir>)
#? * (snd_pcm_hw_params_get_buffer_time_max <params> <dir>)
#? * (snd_pcm_hw_params_test_buffer_time <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_buffer_time <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_buffer_time_min <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_buffer_time_max <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_buffer_time_minmax <pcm> <params> <min> <mindir> <max> <maxdir>)
#? * (snd_pcm_hw_params_set_buffer_time_near <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_buffer_time_first <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_buffer_time_last <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_get_buffer_size <params>)
#? * (snd_pcm_hw_params_get_buffer_size_min <params>)
#? * (snd_pcm_hw_params_get_buffer_size_max <params>)
#? * (snd_pcm_hw_params_test_buffer_size <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_buffer_size <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_buffer_size_min <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_buffer_size_max <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_buffer_size_minmax <pcm> <params> <min> <max>)
#? * (snd_pcm_hw_params_set_buffer_size_near <pcm> <params> <val>)
#? * (snd_pcm_hw_params_set_buffer_size_first <pcm> <params>)
#? * (snd_pcm_hw_params_set_buffer_size_last <pcm> <params>)
#? * (snd_pcm_hw_params_get_tick_time <params> <dir>)
#? * (snd_pcm_hw_params_get_tick_time_min <params> <dir>)
#? * (snd_pcm_hw_params_get_tick_time_max <params> <dir>)
#? * (snd_pcm_hw_params_test_tick_time <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_tick_time <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_tick_time_min <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_tick_time_max <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_tick_time_minmax <pcm> <params> <min> <mindir> <max> <maxdir>)
#? * (snd_pcm_hw_params_set_tick_time_near <pcm> <params> <val> <dir>)
#? * (snd_pcm_hw_params_set_tick_time_first <pcm> <params> <dir>)
#? * (snd_pcm_hw_params_set_tick_time_last <pcm> <params> <dir>)
#? * (snd_pcm_sw_params_current <pcm> <params>)
#? * (snd_pcm_sw_params_sizeof)
#? * (snd_pcm_sw_params_alloca <s>)
#? * (snd_pcm_sw_params_malloc <s>)
#? * (snd_pcm_sw_params_free <s>)
#? * (snd_pcm_sw_params_copy <dst> <src>)
#? * (snd_pcm_sw_params_set_tstamp_mode <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_tstamp_mode <params>)
#? * (snd_pcm_sw_params_set_period_step <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_period_step <params>)
#? * (snd_pcm_sw_params_set_sleep_min <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_sleep_min <params>)
#? * (snd_pcm_sw_params_set_avail_min <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_avail_min <params>)
#? * (snd_pcm_sw_params_set_xfer_align <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_xfer_align <params>)
#? * (snd_pcm_sw_params_set_start_threshold <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_start_threshold <params>)
#? * (snd_pcm_sw_params_set_stop_threshold <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_stop_threshold <params>)
#? * (snd_pcm_sw_params_set_silence_threshold <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_silence_threshold <params>)
#? * (snd_pcm_sw_params_set_silence_size <pcm> <params> <val>)
#? * (snd_pcm_sw_params_get_silence_size <params>)
#? * (snd_pcm_access_mask_sizeof)
#? * (snd_pcm_access_mask_alloca <s>)
#? * (snd_pcm_access_mask_malloc <s>)
#? * (snd_pcm_access_mask_free <s>)
#? * (snd_pcm_access_mask_copy <dst> <src>)
#? * (snd_pcm_access_mask_none <s>)
#? * (snd_pcm_access_mask_any <s>)
#? * (snd_pcm_access_mask_test <s> <val>)
#? * (snd_pcm_access_mask_empty <s>)
#? * (snd_pcm_access_mask_set <s> <val>)
#? * (snd_pcm_access_mask_reset <s> <val>)
#? * (snd_pcm_format_mask_sizeof)
#? * (snd_pcm_format_mask_alloca <s>)
#? * (snd_pcm_format_mask_malloc <s>)
#? * (snd_pcm_format_mask_free <s>)
#? * (snd_pcm_format_mask_copy <dst> <src>)
#? * (snd_pcm_format_mask_none <s>)
#? * (snd_pcm_format_mask_any <s>)
#? * (snd_pcm_format_mask_test <s> <val>)
#? * (snd_pcm_format_mask_empty <s>)
#? * (snd_pcm_format_mask_set <s> <val>)
#? * (snd_pcm_format_mask_reset <s> <val>)
#? * (snd_pcm_subformat_mask_sizeof)
#? * (snd_pcm_subformat_mask_alloca <s>)
#? * (snd_pcm_subformat_mask_malloc <s>)
#? * (snd_pcm_subformat_mask_free <s>)
#? * (snd_pcm_subformat_mask_copy <dst> <src>)
#? * (snd_pcm_subformat_mask_none <s>)
#? * (snd_pcm_subformat_mask_any <s>)
#? * (snd_pcm_subformat_mask_test <s> <val>)
#? * (snd_pcm_subformat_mask_empty <s>)
#? * (snd_pcm_subformat_mask_set <s> <val>)
#? * (snd_pcm_subformat_mask_reset <s> <val>)
#? * (snd_pcm_status_sizeof)
#? * (snd_pcm_status_alloca <s>)
#? * (snd_pcm_status_malloc <s>)
#? * (snd_pcm_status_free <s>)
#? * (snd_pcm_status_copy <dst> <src>)
#? * (snd_pcm_status_get_state <s>)
#? * (snd_pcm_status_get_trigger_tstamp <s> <v>)
#? * (snd_pcm_status_get_tstamp <s> <v>)
#? * (snd_pcm_status_get_delay <s>)
#? * (snd_pcm_status_get_avail <s>)
#? * (snd_pcm_status_get_avail_max <s>)
#? * (snd_pcm_status_get_overrange <s>)
#? * (snd_pcm_stream_name <s>)
#? * (snd_pcm_access_name <s>)
#? * (snd_pcm_format_name <s>)
#? * (snd_pcm_format_description <s>)
#? * (snd_pcm_subformat_name <s>)
#? * (snd_pcm_subformat_description <s>)
#? * (snd_pcm_format_value <name>)
#? * (snd_pcm_tstamp_mode_name <s>)
#? * (snd_pcm_state_name <s>)
#? * (snd_pcm_dump <pcm> <out>)
#? * (snd_pcm_dump_hw_setup <pcm> <out>)
#? * (snd_pcm_dump_sw_setup <pcm> <out>)
#? * (snd_pcm_dump_setup <pcm> <out>)
#? * (snd_pcm_hw_params_dump <params> <out>)
#? * (snd_pcm_sw_params_dump <params> <out>)
#? * (snd_pcm_status_dump <status> <out>)
#? * (snd_pcm_mmap_begin <pcm> <areas> <offset> <frames>)
#? * (snd_pcm_mmap_commit <pcm> <offset> <frames>)
#? * (snd_pcm_mmap_writei <pcm> <buffer> <size>)
#? * (snd_pcm_mmap_readi <pcm> <buffer> <size>)
#? * (snd_pcm_mmap_writen <pcm> <bufs> <size>)
#? * (snd_pcm_mmap_readn <pcm> <bufs> <size>)
#? * (snd_pcm_format_signed <format>)
#? * (snd_pcm_format_unsigned <format>)
#? * (snd_pcm_format_linear <format>)
#? * (snd_pcm_format_float <format>)
#? * (snd_pcm_format_little_endian <format>)
#? * (snd_pcm_format_big_endian <format>)
#? * (snd_pcm_format_cpu_endian <format>)
#? * (snd_pcm_format_width <format>)
#? * (snd_pcm_format_physical_width <format>)
#? * (snd_pcm_build_linear_format <width> <s> <big_endian>)
#? * (snd_pcm_format_size <format> <samples>)
#? * (snd_pcm_format_silence <format>)
#? * (snd_pcm_format_silence_16 <format>)
#? * (snd_pcm_format_silence_32 <format>)
#? * (snd_pcm_format_silence_64 <format>)
#? * (snd_pcm_format_set_silence <format> <buf> <samples>)
#? * (snd_pcm_bytes_to_frames <pcm> <bytes>)
#? * (snd_pcm_frames_to_bytes <pcm> <frames>)
#? * (snd_pcm_bytes_to_samples <pcm> <bytes>)
#? * (snd_pcm_samples_to_bytes <pcm> <samples>)
#? * (snd_pcm_area_silence <dst_channel> <dst_offset> <samples> <format>)
#? * (snd_pcm_areas_silence <dst_channel> <dst_offset> <channels> <frames> <format>)
#? * (snd_pcm_area_copy <dst_channel> <dst_offset> <src_channel> <src_offset> <samples> <format>)
#? * (snd_pcm_areas_copy <dst_channels> <dst_offset> <src_channels> <src_offset> <channels> <frames> <format>)
#? * (snd_pcm_hook_get_pcm <hook>)
#? * (snd_pcm_hook_get_private <hook>)
#? * (snd_pcm_hook_set_private <hook> <private_data>)
#? * (snd_pcm_hook_add <hookp> <pcm> <type> <func> <private_data>)
#? * (snd_pcm_hook_remove <hook>)
#? * (snd_pcm_meter_get_bufsize <pcm>)
#? * (snd_pcm_meter_get_channels <pcm>)
#? * (snd_pcm_meter_get_rate <pcm>)
#? * (snd_pcm_meter_get_now <pcm>)
#? * (snd_pcm_meter_get_boundary <pcm>)
#? * (snd_pcm_meter_add_scope <pcm> <scope>)
#? * (snd_pcm_meter_search_scope <pcm> <name>)
#? * (snd_pcm_scope_malloc <s>)
#? * (snd_pcm_scope_set_ops <scope> <val>)
#? * (snd_pcm_scope_set_name <scope> <val>)
#? * (snd_pcm_scope_get_name <scope>)
#? * (snd_pcm_scope_get_callback_private <scope>)
#? * (snd_pcm_scope_set_callback_private <scope> <val>)
#? * (snd_pcm_scope_s16_open <pcm> <name> <scopep>)
#? * (snd_pcm_scope_s16_get_channel_buffer <scope> <channel>)

;; ********************************************************

;;/** PCM class */
(defconstant 	"SND_PCM_CLASS_GENERIC"                        0)      ;;/** standard device */
(defconstant 	"SND_PCM_CLASS_MULTI"                          1)      ;;/** multichannel device */
(defconstant 	"SND_PCM_CLASS_MODEM"                          2)      ;;/** software modem device */ 
(defconstant 	"SND_PCM_CLASS_DIGITIZER"                      3)      ;;/** digitizer device */
(defconstant 	"SND_PCM_CLASS_LAST"     3)

;;/** PCM subclass */
(defconstant 	"SND_PCM_SUBCLASS_GENERIC_MIX"                    0)   ;;	/** subdevices are mixed together */
(defconstant 	"SND_PCM_SUBCLASS_MULTI_MIX"                      1)   ;;	/** multichannel subdevices are mixed together */
(defconstant 	"SND_PCM_SUBCLASS_LAST" 1)

;;/** PCM stream (direction) */
(defconstant 	"SND_PCM_STREAM_PLAYBACK"                       0)         ;;/** Playback stream */
(defconstant 	"SND_PCM_STREAM_CAPTURE"                        1)         ;;/** Capture stream */
(defconstant   "SND_PCM_STREAM_LAST"      1)

;;/** PCM access type */
(defconstant 	"SND_PCM_ACCESS_MMAP_INTERLEAVED"                     0)   ;;/** mmap access with simple interleaved channels */
(defconstant 	"SND_PCM_ACCESS_MMAP_NONINTERLEAVED"                  1)   ;;/** mmap access with simple non interleaved channels */
(defconstant 	"SND_PCM_ACCESS_MMAP_COMPLEX"                         2)   ;;/** mmap access with complex placement */
(defconstant 	"SND_PCM_ACCESS_RW_INTERLEAVED"                       3)   ;;/** snd_pcm_readi/snd_pcm_writei access */
(defconstant 	"SND_PCM_ACCESS_RW_NONINTERLEAVED"                    4)   ;;/** snd_pcm_readn/snd_pcm_writen access */
(defconstant 	"SND_PCM_ACCESS_LAST"  4)

;;/** PCM sample format */
(defconstant	"SND_PCM_FORMAT_UNKNOWN"                    -1)   ;;/** Unknown */
(defconstant 	"SND_PCM_FORMAT_S8"                          0)   ;;/** Signed 8 bit */
(defconstant 	"SND_PCM_FORMAT_U8"                          1)   ;;/** Unsigned 8 bit */
(defconstant 	"SND_PCM_FORMAT_S16_LE"                      2)   ;;/** Signed 16 bit Little Endian */
(defconstant 	"SND_PCM_FORMAT_S16_BE"                      3)   ;;/** Signed 16 bit Big Endian */
(defconstant 	"SND_PCM_FORMAT_U16_LE"                      4)   ;;/** Unsigned 16 bit Little Endian */
(defconstant 	"SND_PCM_FORMAT_U16_BE"                      5)   ;;/** Unsigned 16 bit Big Endian */
(defconstant 	"SND_PCM_FORMAT_S24_LE"                      6)   ;;/** Signed 24 bit Little Endian */
(defconstant 	"SND_PCM_FORMAT_S24_BE"                      7)   ;;/** Signed 24 bit Big Endian */
(defconstant 	"SND_PCM_FORMAT_U24_LE"                      8)   ;;/** Unsigned 24 bit Little Endian */
(defconstant 	"SND_PCM_FORMAT_U24_BE"                      9)   ;;/** Unsigned 24 bit Big Endian */
(defconstant 	"SND_PCM_FORMAT_S32_LE"                     10)   ;;/** Signed 32 bit Little Endian */
(defconstant 	"SND_PCM_FORMAT_S32_BE"                     11)   ;;/** Signed 32 bit Big Endian */
(defconstant 	"SND_PCM_FORMAT_U32_LE"                     12)   ;;/** Unsigned 32 bit Little Endian */
(defconstant 	"SND_PCM_FORMAT_U32_BE"                     13)   ;;/** Unsigned 32 bit Big Endian */
(defconstant 	"SND_PCM_FORMAT_FLOAT_LE"                   14)   ;;/** Float 32 bit Little Endian, Range -1.0 to 1.0 */
(defconstant 	"SND_PCM_FORMAT_FLOAT_BE"                   15)   ;;/** Float 32 bit Big Endian, Range -1.0 to 1.0 */
(defconstant 	"SND_PCM_FORMAT_FLOAT64_LE"                 16)   ;;/** Float 64 bit Little Endian, Range -1.0 to 1.0 */
(defconstant 	"SND_PCM_FORMAT_FLOAT64_BE"                 17)   ;;/** Float 64 bit Big Endian, Range -1.0 to 1.0 */
(defconstant 	"SND_PCM_FORMAT_IEC958_SUBFRAME_LE"         18)   ;;/** IEC-958 Little Endian */
(defconstant 	"SND_PCM_FORMAT_IEC958_SUBFRAME_BE"         19)   ;;/** IEC-958 Big Endian */
(defconstant 	"SND_PCM_FORMAT_MU_LAW"                     20)   ;;/** Mu-Law */
(defconstant 	"SND_PCM_FORMAT_A_LAW"                      21)   ;;/** A-Law */
(defconstant 	"SND_PCM_FORMAT_IMA_ADPCM"                  22)   ;;/** Ima-ADPCM */
(defconstant 	"SND_PCM_FORMAT_MPEG"                       23)   ;;/** MPEG */
(defconstant 	"SND_PCM_FORMAT_GSM"                        24)   ;;/** GSM */
(defconstant 	"SND_PCM_FORMAT_SPECIAL"                    31)   ;;/** Special */
(defconstant	"SND_PCM_FORMAT_LAST"   31)

;;#if __BYTE_ORDER == __LITTLE_ENDIAN
;; Intel/DEC
(defconstant 	"SND_PCM_FORMAT_S16"  2 )   ;;/** Signed 16 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_U16"  4 )   ;;/** Unsigned 16 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_S24"  6 )   ;;/** Signed 24 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_U24"  8 )   ;;/** Unsigned 24 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_S32"  10)   ;;/** Signed 32 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_U32"  12)   ;;/** Unsigned 32 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_FLOAT"   14)   ;;/** Float 32 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_FLOAT64" 16)   ;;/** Float 64 bit CPU endian */
(defconstant 	"SND_PCM_FORMAT_IEC958_SUBFRAME"  18 )   ;;/** IEC-958 CPU Endian */

;;#elif __BYTE_ORDER == __BIG_ENDIAN
;; Motorola/IBM
;;(setq 	SND_PCM_FORMAT_S16                          SND_PCM_FORMAT_S16_BE)   ;;/** Signed 16 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_U16                          SND_PCM_FORMAT_U16_BE)   ;;/** Unsigned 16 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_S24                          SND_PCM_FORMAT_S24_BE)   ;;/** Signed 24 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_U24                          SND_PCM_FORMAT_U24_BE)   ;;/** Unsigned 24 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_S32                          SND_PCM_FORMAT_S32_BE)   ;;/** Signed 32 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_U32                          SND_PCM_FORMAT_U32_BE)   ;;/** Unsigned 32 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_FLOAT                      SND_PCM_FORMAT_FLOAT_BE)   ;;/** Float 32 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_FLOAT64                  SND_PCM_FORMAT_FLOAT64_BE)   ;;/** Float 64 bit CPU endian */
;;(setq 	SND_PCM_FORMAT_IEC958_SUBFRAME  SND_PCM_FORMAT_IEC958_SUBFRAME_BE)   ;;/** IEC-958 CPU Endian */


;;/** PCM sample subformat */
(defconstant 	"SND_PCM_SUBFORMAT_STD"                        0)   ;;	/** Standard */
(defconstant 	"SND_PCM_SUBFORMAT_LAST"   0)

;;/** PCM state */
(defconstant 	"SND_PCM_STATE_OPEN"                        0)   ;;/** Open */
(defconstant 	"SND_PCM_STATE_SETUP"                       1)   ;;/** Setup installed */ 
(defconstant 	"SND_PCM_STATE_PREPARED"                    2)   ;;/** Ready to start */
(defconstant 	"SND_PCM_STATE_RUNNING"                     3)   ;;/** Running */
(defconstant 	"SND_PCM_STATE_XRUN"                        4)   ;;/** Stopped: underrun (playback) or overrun (capture) detected */
(defconstant 	"SND_PCM_STATE_DRAINING"                    5)   ;;/** Draining: running (playback) or stopped (capture) */
(defconstant 	"SND_PCM_STATE_PAUSED"                      6)   ;;/** Paused */
(defconstant 	"SND_PCM_STATE_SUSPENDED"                   7)   ;;/** Hardware is suspended */
(defconstant 	"SND_PCM_STATE_LAST"  7)

;;/** PCM start mode */
(defconstant 	"SND_PCM_START_DATA"                       0)   ;;/** Automatic start on data read/write */
(defconstant 	"SND_PCM_START_EXPLICIT"                   1)   ;;/** Explicit start */
(defconstant 	"SND_PCM_START_LAST"  1)

;;/** PCM xrun mode */
(defconstant 	"SND_PCM_XRUN_NONE"                  0)   ;;/** Xrun detection disabled */
(defconstant 	"SND_PCM_XRUN_STOP"                  1)   ;;/** Stop on xrun detection */
(defconstant   "SND_PCM_XRUN_LAST"  1)


;;/** PCM timestamp mode */
(defconstant 	"SND_PCM_TSTAMP_NONE"          0)   ;;/** No timestamp */
(defconstant 	"SND_PCM_TSTAMP_MMAP"          1)   ;;/** Update mmap'ed timestamp */
(defconstant 	"SND_PCM_TSTAMP_LAST"          1)


(defconstant  "SND_PCM_NONBLOCK"		0x0001)   ;;/** Non blocking mode (flag for open mode) \hideinitializer */
(defconstant  "SND_PCM_ASYNC"		0x0002)   ;;/** Async notification (flag for open mode) \hideinitializer */

;;/* PCM type */
(defconstant 	"SND_PCM_TYPE_HW"                  0)   ;;/** Kernel level PCM */
(defconstant 	"SND_PCM_TYPE_HOOKS"               1)   ;;/** Hooked PCM */
(defconstant 	"SND_PCM_TYPE_MULTI"               2)   ;;/** One ore more linked PCM with exclusive access to selected channels */
(defconstant 	"SND_PCM_TYPE_FILE"                3)   ;;/** File writing plugin */
(defconstant 	"SND_PCM_TYPE_NULL"                4)   ;;/** Null endpoint PCM */
(defconstant 	"SND_PCM_TYPE_SHM"                 5)   ;;/** Shared memory client PCM */
(defconstant 	"SND_PCM_TYPE_INET"                6)   ;;/** INET client PCM (not yet implemented) */
(defconstant 	"SND_PCM_TYPE_COPY"                7)   ;;/** Copying plugin */
(defconstant 	"SND_PCM_TYPE_LINEAR"              8)   ;;/** Linear format conversion PCM */
(defconstant 	"SND_PCM_TYPE_ALAW"                9)   ;;/** A-Law format conversion PCM */
(defconstant 	"SND_PCM_TYPE_MULAW"              10)   ;;/** Mu-Law format conversion PCM */
(defconstant 	"SND_PCM_TYPE_ADPCM"              11)   ;;/** IMA-ADPCM format conversion PCM */
(defconstant 	"SND_PCM_TYPE_RATE"               12)   ;;/** Rate conversion PCM */
(defconstant 	"SND_PCM_TYPE_ROUTE"              13)   ;;/** Attenuated static route PCM */
(defconstant 	"SND_PCM_TYPE_PLUG"               14)   ;;/** Format adjusted PCM */
(defconstant 	"SND_PCM_TYPE_SHARE"              15)   ;;/** Sharing PCM */
(defconstant 	"SND_PCM_TYPE_METER"              16)   ;;/** Meter plugin */
(defconstant 	"SND_PCM_TYPE_MIX"                17)   ;;/** Mixing PCM */
(defconstant 	"SND_PCM_TYPE_DROUTE"             18)   ;;/** Attenuated dynamic route PCM (not yet implemented) */
(defconstant 	"SND_PCM_TYPE_LBSERVER"           19)   ;;/** Loopback server plugin (not yet implemented) */
(defconstant 	"SND_PCM_TYPE_LINEAR_FLOAT"       20)   ;;/** Linear Integer <-> Linear Float format conversion PCM */
(defconstant 	"SND_PCM_TYPE_LADSPA"             21)   ;;/** LADSPA integration plugin */


;;************************************************************************************
;;          controlling routines
;;
;;************************************************************************************

(de snd_pcm_open (pcm name stream mode)
    ((-gptr- "snd_pcm_t **") pcm)
    ((-str-) name)
    ((-int-) stream mode)
    (int #{ snd_pcm_open($pcm, $name->data, $stream, $mode) #}))

(de snd_pcm_open_lconf (pcm name stream mode lconf)
    ((-gptr- "snd_pcm_t **") pcm)
    ((-gptr- "const char *") name)
    ((-int-) stream mode)
    ((-gptr- "snd_config_t *") lconf)
    (int #{ snd_pcm_open_lconf($pcm, $name, $stream, $mode, $lconf) #}))

(de snd_pcm_close (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_close($pcm) #}))

(de snd_pcm_name (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (gptr #{ snd_pcm_name($pcm) #}))

(de snd_pcm_type (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (gptr #{ snd_pcm_type($pcm) #}))

(de snd_pcm_stream (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (gptr #{ snd_pcm_stream($pcm) #}))

(de snd_pcm_poll_descriptors_count (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_poll_descriptors_count($pcm) #}))

(de snd_pcm_poll_descriptors (pcm pfds space)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "struct pollfd *") pfds)
    ((-int-) space)                                                    ;; uint
    (int #{ snd_pcm_poll_descriptors($pcm, $pfds, $space) #}))

(de snd_pcm_poll_descriptors_revents (pcm pfds nfds revents)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "struct pollfd *") pfds)
    ((-int-) nfds)			;; uint -> int
    ((-gptr- "unsigned short *") revents)
    (int #{ snd_pcm_poll_descriptors_revents($pcm, $pfds, $nfds, $revents) #}))

(de snd_pcm_nonblock (pcm nonblock)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) nonblock)
    (int #{ snd_pcm_nonblock($pcm, $nonblock) #}))

(de snd_async_add_pcm_handler (handler pcm callback private_data)
    ((-gptr- "snd_async_handler_t **") handler)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr-) callback)			;; function pointer
    ((-gptr-) private_data)
    (int #{  snd_async_add_pcm_handler($handler, $pcm, $callback, $private_data) #}))

(de snd_async_handler_get_pcm (handler)
    ((-gptr- "snd_async_handler_t *") handler)
    (gptr #{ snd_async_handler_get_pcm($handler) #}))

(de snd_pcm_info (pcm info)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_info_t *") info)
    (int #{ snd_pcm_info($pcm, $info) #}))

(de snd_pcm_hw_params (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params($pcm, $params) #}))

(de snd_pcm_hw_free (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_hw_free($pcm) #}))

(de snd_pcm_sw_params (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    (int #{ snd_pcm_sw_params($pcm, $params) #}))

(de snd_pcm_prepare (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_prepare($pcm) #}))

(de snd_pcm_reset (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_reset($pcm) #}))

(de snd_pcm_status (pcm status)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_status_t *") status)
    (int #{ snd_pcm_status($pcm, $status) #}))

(de snd_pcm_start (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_start($pcm) #}))

(de snd_pcm_drop (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_drop($pcm) #}))

(de snd_pcm_drain (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_drain($pcm) #}))

(de snd_pcm_pause (pcm enable)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) enable)
    (int #{ snd_pcm_pause($pcm, $enable) #}))
  
(de snd_pcm_state (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_state($pcm) #}))

(de snd_pcm_delay (pcm delayp)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sframes_t *") delayp)
    (int #{ snd_pcm_delay($pcm, $delayp) #}))

(de snd_pcm_resume (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_resume($pcm) #}))

(de snd_pcm_avail_update (pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_avail_update($pcm) #})) ;; long ->int

(de snd_pcm_rewind (pcm frames)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) frames)			;; long->int
    (int #{ snd_pcm_rewind($pcm, $frames) #}))

(de snd_pcm_writei (pcm buffer size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "const void *") buffer)
    ((-int-) size)			;; long->int
    (int #{ snd_pcm_writei($pcm, $buffer, $size) #}))


(de snd_pcm_readi (pcm buffer size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "void *") buffer)
    ((-int-) size)			;; long->int
    (int #{ snd_pcm_readi($pcm, $buffer, $size) #}))

(de snd_pcm_writen (pcm bufs size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "void **") bufs)
    ((-int-) size)			;; long->int
    (int #{ snd_pcm_writen($pcm, $bufs, $size) #}))


(de snd_pcm_readn (pcm bufs size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "void **") bufs)
    ((-int-) size)			;; long->int
    (int #{ snd_pcm_readn($pcm, $bufs, $size) #}))

(de snd_pcm_wait (pcm timeout)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) timeout)
    (int #{ snd_pcm_wait($pcm, $timeout) #}))

(de snd_pcm_link (pcm1 pcm2)
    ((-gptr- "snd_pcm_t *") pcm1 pcm2)    
    (int #{ snd_pcm_link($pcm1, $pcm2) #}))


(de snd_pcm_unlink (pcm)
    ((-gptr- "snd_pcm_t *") pcm)    
    (int #{ snd_pcm_unlink($pcm) #}))

;;***********************************************************************************
;;
;;       PCM_Info Stream Information
;;
;;***********************************************************************************      
 
(de snd_pcm_info_sizeof ()
    (int #{ snd_pcm_info_sizeof() #}))  ;; size_t -> int

(de snd_pcm_info_alloca ( s )		;; s: double pointer
    ((-gptr- "snd_pcm_info_t **") s)
    #{ snd_pcm_info_alloca( $s ) #}
    ())

(de snd_pcm_info_malloc (s)
    ((-gptr- "snd_pcm_info_t **") s)
    (int #{ snd_pcm_info_malloc($s) #}))

(de snd_pcm_info_free (s)
    ((-gptr- "snd_pcm_info_t *") s)
    #{ snd_pcm_info_free($s); #}
    ())

(de snd_pcm_info_copy (dst src)
    ((-gptr- "snd_pcm_info_t *") dst)
    ((-gptr- "const snd_pcm_info_t *") src)
    #{ snd_pcm_info_copy($dst, $src); #}
    ())

(de snd_pcm_info_get_device (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_device($s) #}))

(de snd_pcm_info_get_subdevice (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_subdevice($s) #}))

(de snd_pcm_info_get_stream (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_stream($s) #}))

(de snd_pcm_info_get_card (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_card($s) #}))

(de snd_pcm_info_get_id (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (gptr #{ snd_pcm_info_get_id($s) #}))

(de snd_pcm_info_get_name (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (gptr #{ snd_pcm_info_get_name($s) #}))


(de snd_pcm_info_get_subdevice_name (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (gptr #{ snd_pcm_info_get_subdevice_name($s) #}))

(de snd_pcm_info_get_class (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_class($s) #}))

(de snd_pcm_info_get_subclass (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_subclass($s) #}))

(de snd_pcm_info_get_subdevices_count (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_subdevices_count($s) #})) ;; uint -> int

(de snd_pcm_info_get_subdevices_avail (s)
    ((-gptr- "const snd_pcm_info_t *") s)
    (int #{ snd_pcm_info_get_subdevices_avail($s) #})) ;; uint -> int

(de snd_pcm_info_get_sync (s sid)
    ((-gptr- "const snd_pcm_info_t *") s)
    ((-gptr- "snd_pcm_sync_id_t *") sid)
    #{ { snd_pcm_sync_id_t tmp;  tmp = snd_pcm_info_get_sync($s);
    memcpy($sid, &tmp, sizeof(snd_pcm_sync_id_t));
    } #}
    ())

(de snd_pcm_info_set_device (s val)
    ((-gptr- "snd_pcm_info_t *") s)
    ((-int-) val)			;; uint -> int
    #{ snd_pcm_info_set_device($s, $val); #}
    ())


(de snd_pcm_info_set_subdevice (s val)
    ((-gptr- "snd_pcm_info_t *") s)
    ((-int-) val)			;; uint -> int
    #{ snd_pcm_info_set_subdevice($s, $val); #}
    ())

(de snd_pcm_info_set_stream (s val)
    ((-gptr- "snd_pcm_info_t *") s)
    ((-int-) val)
    #{ snd_pcm_info_set_stream($s, $val); #}
    ())

;;***********************************************************************************
;;
;;       PCM_HW_Params  Hardware Parameters
;;
;;***********************************************************************************    


;;************************ hardware parameters ********************

(de snd_pcm_hw_params_any (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_any($pcm, $params) #}))
 
(de snd_pcm_hw_params_can_mmap_sample_resolution (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_can_mmap_sample_resolution($params) #}))

(de snd_pcm_hw_params_can_overrange (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_can_overrange($params) #}))

(de snd_pcm_hw_params_can_pause (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_can_pause($params) #}))

(de snd_pcm_hw_params_can_resume (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_can_resume($params) #}))

(de snd_pcm_hw_params_can_sync_start (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_can_sync_start($params) #}))

(de snd_pcm_hw_params_is_double (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_is_double($params) #}))

(de snd_pcm_hw_params_is_batch (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_is_batch($params) #}))

(de snd_pcm_hw_params_is_block_transfer (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_is_block_transfer($params) #}))

(de snd_pcm_hw_params_is_half_duplex (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_is_half_duplex($params) #}))

(de snd_pcm_hw_params_is_joint_duplex (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_is_joint_duplex($params) #}))

(de snd_pcm_hw_params_get_rate_numden (params rate_num rate_den)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") rate_num rate_den)
    (int #{ snd_pcm_hw_params_get_rate_numden($params, $rate_num, $rate_den) #}))

(de snd_pcm_hw_params_get_sbits (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_sbits($params) #}))

(de snd_pcm_hw_params_get_fifo_size (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_fifo_size($params) #}))

(de snd_pcm_hw_params_strategy (pcm params strategy badness_min badness_max)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "const snd_pcm_hw_strategy_t *") strategy)
    ((-int-) badness_min badness_max)	;; uint -> int
    (int #{ snd_pcm_hw_params_strategy($pcm,$params,$strategy,$badness_min,$badness_max) #}))

(de snd_pcm_hw_strategy_free (strategy)
    ((-gptr- "snd_pcm_hw_strategy_t *") strategy)
    #{ snd_pcm_hw_strategy_free($strategy); #}
    ())

(de snd_pcm_hw_strategy_simple (strategyp badness_min badness_max)
    ((-gptr- "const snd_pcm_hw_strategy_t **") strategyp)
    ((-int-) badness_min badness_max)	;; uint -> int
    (int #{ snd_pcm_hw_strategy_simple($strategyp,$badness_min,$badness_max) #}))

(de snd_pcm_hw_params_try_explain_failure (pcm fail success depth out)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") fail success)
    ((-int-) depth)			;; uint -> int
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_hw_params_try_explain_failure($pcm,$fail,$success,$depth,$out) #}))

(de snd_pcm_hw_params_sizeof ()
    (int #{ snd_pcm_hw_params_sizeof() #})) ;; size_t -> int

;;************************ allocate/free/copy *********************
(de snd_pcm_hw_params_alloca (s)
    ((-gptr- "snd_pcm_hw_params_t **") s)
    #{ snd_pcm_hw_params_alloca($s); #}
    ())

(de snd_pcm_hw_params_malloc (s)
    ((-gptr- "snd_pcm_hw_params_t **") s)
    (int #{ snd_pcm_hw_params_malloc($s) #}))

(de snd_pcm_hw_params_free (s)
    ((-gptr- "snd_pcm_hw_params_t *") s)
    #{ snd_pcm_hw_params_free($s) #}
    ())

(de snd_pcm_hw_params_copy (dst src)
    ((-gptr- "snd_pcm_hw_params_t *") dst)
    ((-gptr- "const snd_pcm_hw_params_t *") src)
    #{ snd_pcm_hw_params_copy($dst, $src) #}
    ())

;;********************* access ( ) *********************************
(de snd_pcm_hw_params_get_access (s)
    ((-gptr- "const snd_pcm_hw_params_t *") s)
    (int #{ snd_pcm_hw_params_get_access($s) #}))

(de snd_pcm_hw_params_test_access (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)
    (int #{ snd_pcm_hw_params_test_access($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_access (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)
    (int #{ snd_pcm_hw_params_set_access($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_access_first (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_access_first($pcm, $params) #}))

(de snd_pcm_hw_params_set_access_last (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_access_last($pcm, $params) #}))

(de snd_pcm_hw_params_set_access_mask (pcm params mask)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_access_mask_t *") mask)
    (int #{ snd_pcm_hw_params_set_access_mask($pcm, $params, $mask) #}))

(de snd_pcm_hw_params_get_access_mask (params mask)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_access_mask_t *") mask)
    #{ snd_pcm_hw_params_get_access_mask($params, $mask); #}
    ())

;;************************** format ( ) **********************************
(de snd_pcm_hw_params_get_format (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_format($params) #}))

(de snd_pcm_hw_params_test_format (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)
    (int #{ snd_pcm_hw_params_test_format($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_format (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)
    (int #{ snd_pcm_hw_params_set_format($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_format_first (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_format_first($pcm, $params) #}))

(de snd_pcm_hw_params_set_format_last (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_format_last($pcm, $params) #}))

(de snd_pcm_hw_params_set_format_mask (pcm params mask)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_format_mask_t *") mask)
    (int #{ snd_pcm_hw_params_set_format_mask($pcm, $params, $mask) #}))

(de snd_pcm_hw_params_get_format_mask (params mask)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_format_mask_t *") mask)
    #{ snd_pcm_hw_params_get_format_mask($params, $mask); #}
    ())

;;********* subformat (7)*******************
(de snd_pcm_hw_params_get_subformat (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_subformat($params) #}))

(de snd_pcm_hw_params_test_subformat (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)
    (int #{ snd_pcm_hw_params_test_subformat($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_subformat (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)
    (int #{ snd_pcm_hw_params_set_subformat($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_subformat_first (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_subformat_first($pcm, $params) #}))

(de snd_pcm_hw_params_set_subformat_last (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_subformat_last($pcm, $params) #}))

(de snd_pcm_hw_params_set_subformat_mask (pcm params mask)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_subformat_mask_t *") mask)
    (int #{ snd_pcm_hw_params_set_subformat_mask($pcm, $params, $mask) #}))

(de snd_pcm_hw_params_get_subformat_mask (params mask)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_subformat_mask_t *") mask)
    #{ snd_pcm_hw_params_get_subformat_mask($params, $mask); #}
    ())

;;************** channels (11) ****************
(de snd_pcm_hw_params_get_channels (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_channels($params) #}))

(de snd_pcm_hw_params_get_channels_min (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_channels_min($params) #})) ;; uint -> int

(de snd_pcm_hw_params_get_channels_max (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_channels_max($params) #})) ;uint -> int

(de snd_pcm_hw_params_test_channels (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    (int #{ snd_pcm_hw_params_test_channels($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_channels (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    (int #{ snd_pcm_hw_params_set_channels($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_channels_min (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    (int #{ snd_pcm_hw_params_set_channels_min($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_channels_max (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    (int #{ snd_pcm_hw_params_set_channels_max($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_channels_minmax (pcm params min max)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") min max)
    (int #{ snd_pcm_hw_params_set_channels_minmax($pcm,$params,$min,$max) #}))

(de snd_pcm_hw_params_set_channels_near (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    (int #{ snd_pcm_hw_params_set_channels_near($pcm, $params, $val) #})) ;uint->int

(de snd_pcm_hw_params_set_channels_first (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_channels_first($pcm, $params) #})) ;uint->int

(de snd_pcm_hw_params_set_channels_last (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_channels_last($pcm, $params) #})) ;uint->int

;;******************** rate (11) ********************************
(de snd_pcm_hw_params_get_rate (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_rate($params, $dir) #}))

(de snd_pcm_hw_params_get_rate_min (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_rate_min($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_get_rate_max (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_rate_max($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_test_rate (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_test_rate($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_rate (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_set_rate($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_rate_min (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_rate_min($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_rate_max (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_rate_max($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_rate_minmax (pcm params min mindir max maxdir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") min max)
    ((-gptr- "int *") mindir maxdir)
    (int #{ snd_pcm_hw_params_set_rate_minmax($pcm,$params,$min,$mindir,$max,$maxdir) #}))

(de snd_pcm_hw_params_set_rate_near (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_rate_near($pcm, $params, $val, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_rate_first (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_rate_first($pcm, $params, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_rate_last (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_rate_last($pcm, $params, $dir) #})) ;uint->int

;;*********************** period time (11) *********************************
(de snd_pcm_hw_params_get_period_time (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_period_time($params, $dir) #}))

(de snd_pcm_hw_params_get_period_time_min (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_period_time_min($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_get_period_time_max (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_period_time_max($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_test_period_time (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_test_period_time($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_time (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_set_period_time($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_time_min (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_time_min($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_time_max (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_time_max($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_time_minmax (pcm params min mindir max maxdir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") min max)
    ((-gptr- "int *") mindir maxdir)
    (int #{ snd_pcm_hw_params_set_period_time_minmax($pcm,$params,$min,$mindir,$max,$maxdir) #}))

(de snd_pcm_hw_params_set_period_time_near (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_time_near($pcm, $params, $val, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_period_time_first (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_time_first($pcm, $params, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_period_time_last (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_time_last($pcm, $params, $dir) #})) ;uint->int

;;****************************period size (12)*********************************
(de snd_pcm_hw_params_get_period_size (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_period_size($params, $dir) #}))

(de snd_pcm_hw_params_get_period_size_min (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_period_size_min($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_get_period_size_max (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_period_size_max($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_test_period_size (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; long->int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_test_period_size($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_size (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; long->int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_set_period_size($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_size_min (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_uframes_t *") val)			
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_size_min($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_size_max (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_uframes_t *") val)			
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_size_max($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_period_size_minmax (pcm params min mindir max maxdir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_uframes_t *") min max)
    ((-gptr- "int *") mindir maxdir)
    (int #{ snd_pcm_hw_params_set_period_size_minmax($pcm,$params,$min,$mindir,$max,$maxdir) #}))

(de snd_pcm_hw_params_set_period_size_near (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; long->int
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_size_near($pcm, $params, $val, $dir) #})) ;;long->int

(de snd_pcm_hw_params_set_period_size_first (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_size_first($pcm, $params, $dir) #})) ;;long->int

(de snd_pcm_hw_params_set_period_size_last (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_period_size_last($pcm, $params, $dir) #})) ;;long->int

(de snd_pcm_hw_params_set_period_size_integer (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_period_size_integer($pcm, $params) #})) 

;;*********************** periods (12) ****************************************
(de snd_pcm_hw_params_get_periods (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_periods($params, $dir) #}))

(de snd_pcm_hw_params_get_periods_min (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_periods_min($params, $dir) #})) ;;uint -> int

(de snd_pcm_hw_params_get_periods_max (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_periods_max($params, $dir) #})) ;;uint -> int

(de snd_pcm_hw_params_test_periods (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_test_periods($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_periods (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_set_periods($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_periods_min (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_periods_min($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_periods_max (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_periods_max($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_periods_minmax (pcm params min mindir max maxdir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") min max)
    ((-gptr- "int *") mindir maxdir)
    (int #{ snd_pcm_hw_params_set_periods_minmax($pcm,$params,$min,$mindir,$max,$maxdir) #}))

(de snd_pcm_hw_params_set_periods_near (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_periods_near($pcm, $params, $val, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_periods_first (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_periods_first($pcm, $params, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_periods_last (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_periods_last($pcm, $params, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_periods_integer (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_periods_integer($pcm, $params) #})) ;uint->int

;;************************** buffer time (11) **********************************
(de snd_pcm_hw_params_get_buffer_time (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_buffer_time($params, $dir) #}))

(de snd_pcm_hw_params_get_buffer_time_min (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_buffer_time_min($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_get_buffer_time_max (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_buffer_time_max($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_test_buffer_time (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_test_buffer_time($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_buffer_time (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_set_buffer_time($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_buffer_time_min (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_buffer_time_min($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_buffer_time_max (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_buffer_time_max($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_buffer_time_minmax (pcm params min mindir max maxdir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") min max)
    ((-gptr- "int *") mindir maxdir)
    (int #{ snd_pcm_hw_params_set_buffer_time_minmax($pcm,$params,$min,$mindir,$max,$maxdir) #}))

(de snd_pcm_hw_params_set_buffer_time_near (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint -> int
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_buffer_time_near($pcm, $params, $val, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_buffer_time_first (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_buffer_time_first($pcm, $params, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_buffer_time_last (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_buffer_time_last($pcm, $params, $dir) #})) ;uint->int
 
;;*************************** buffer size (11) ******************************
(de snd_pcm_hw_params_get_buffer_size (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_buffer_size($params) #}))

(de snd_pcm_hw_params_get_buffer_size_min (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_buffer_size_min($params) #})) ;; long->int

(de snd_pcm_hw_params_get_buffer_size_max (params)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_get_buffer_size_max($params) #})) ;; long->int

(de snd_pcm_hw_params_test_buffer_size (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{ snd_pcm_hw_params_test_buffer_size($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_buffer_size (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{ snd_pcm_hw_params_set_buffer_size($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_buffer_size_min (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_uframes_t *") val)			;; long->int
    (int #{ snd_pcm_hw_params_set_buffer_size_min($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_buffer_size_max (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_uframes_t *") val)			
    (int #{ snd_pcm_hw_params_set_buffer_size_max($pcm, $params, $val) #}))

(de snd_pcm_hw_params_set_buffer_size_minmax (pcm params min max)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_pcm_uframes_t *") min max)
    (int #{ snd_pcm_hw_params_set_buffer_size_minmax($pcm,$params,$min,$max) #}))

(de snd_pcm_hw_params_set_buffer_size_near (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{ snd_pcm_hw_params_set_buffer_size_near($pcm, $params, $val) #})) ;;long->int

(de snd_pcm_hw_params_set_buffer_size_first (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_buffer_size_first($pcm, $params) #})) ;;long->int

(de snd_pcm_hw_params_set_buffer_size_last (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    (int #{ snd_pcm_hw_params_set_buffer_size_last($pcm, $params) #})) ;;long->int

;;************************** tick time (11) ************************************
(de snd_pcm_hw_params_get_tick_time (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_tick_time($params, $dir) #}))

(de snd_pcm_hw_params_get_tick_time_min (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_tick_time_min($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_get_tick_time_max (params dir)
    ((-gptr- "const snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_get_tick_time_max($params, $dir) #})) ;uint -> int

(de snd_pcm_hw_params_test_tick_time (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint->int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_test_tick_time($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_tick_time (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint->int
    ((-int-) dir)
    (int #{ snd_pcm_hw_params_set_tick_time($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_tick_time_min (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_tick_time_min($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_tick_time_max (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") val)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_tick_time_max($pcm, $params, $val, $dir) #}))

(de snd_pcm_hw_params_set_tick_time_minmax (pcm params min mindir max maxdir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "unsigned int *") min max)
    ((-gptr- "int *") mindir maxdir)
    (int #{ snd_pcm_hw_params_set_tick_time_minmax($pcm,$params,$min,$mindir,$max,$maxdir) #}))

(de snd_pcm_hw_params_set_tick_time_near (pcm params val dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-int-) val)			;; uint->int
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_tick_time_near($pcm, $params, $val, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_tick_time_first (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_tick_time_first($pcm, $params, $dir) #})) ;uint->int

(de snd_pcm_hw_params_set_tick_time_last (pcm params dir)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "int *") dir)
    (int #{ snd_pcm_hw_params_set_tick_time_last($pcm, $params, $dir) #})) ;uint->int


;;***********************************************************************************
;;
;;       PCM_SW_Params                         Software Parameters
;;
;;***********************************************************************************    

(de snd_pcm_sw_params_current (pcm params)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    (int #{ snd_pcm_sw_params_current($pcm, $params) #}))

(de snd_pcm_sw_params_sizeof ()
    (int #{ snd_pcm_sw_params_sizeof() #}))

(de snd_pcm_sw_params_alloca (s)
    ((-gptr- "snd_pcm_sw_params_t **") s)
    #{ snd_pcm_sw_params_alloca($s) #}
    ())

(de snd_pcm_sw_params_malloc (s)
    ((-gptr- "snd_pcm_sw_params_t **") s)
    (int #{ snd_pcm_sw_params_malloc($s) #}))

(de snd_pcm_sw_params_free (s)
    ((-gptr- "snd_pcm_sw_params_t *") s)
    #{ snd_pcm_sw_params_free($s) #}
    ())

(de snd_pcm_sw_params_copy (dst src)
    ((-gptr- "snd_pcm_sw_params_t *") dst)
    ((-gptr- "const snd_pcm_sw_params_t *") src)
    #{ snd_pcm_sw_params_copy($dst,$src) #}
    ())

(de snd_pcm_sw_params_set_tstamp_mode (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)
    (int #{snd_pcm_sw_params_set_tstamp_mode($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_tstamp_mode (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_tstamp_mode($params) #}))

(de snd_pcm_sw_params_set_period_step (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; uint->int
    (int #{snd_pcm_sw_params_set_period_step($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_period_step (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_period_step($params) #})) ;; uint -> int

(de snd_pcm_sw_params_set_sleep_min (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; uint->int
    (int #{snd_pcm_sw_params_set_sleep_min($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_sleep_min (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_sleep_min($params) #})) ;; uint->int

(de snd_pcm_sw_params_set_avail_min (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{snd_pcm_sw_params_set_avail_min($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_avail_min (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_avail_min($params) #})) ;; long->int

(de snd_pcm_sw_params_set_xfer_align (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{snd_pcm_sw_params_set_xfer_align($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_xfer_align (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_xfer_align($params) #})) ;; long->int

(de snd_pcm_sw_params_set_start_threshold (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{snd_pcm_sw_params_set_start_threshold($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_start_threshold (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_start_threshold($params) #})) ;; long->int

(de snd_pcm_sw_params_set_stop_threshold (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{snd_pcm_sw_params_set_stop_threshold($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_stop_threshold (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_stop_threshold($params) #})) ;; long->int

(de snd_pcm_sw_params_set_silence_threshold (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{snd_pcm_sw_params_set_silence_threshold($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_silence_threshold (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_silence_threshold($params) #})) ;; long->int

(de snd_pcm_sw_params_set_silence_size (pcm params val)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-int-) val)			;; long->int
    (int #{snd_pcm_sw_params_set_silence_size($pcm,$params,$val) #}))

(de snd_pcm_sw_params_get_silence_size (params)
    ((-gptr- "const snd_pcm_sw_params_t *") params)
    (int #{snd_pcm_sw_params_get_silence_size($params) #})) ;; long->int


;;***********************************************************************************
;;
;;       PCM_Access                        Access Mask Functions
;;
;;***********************************************************************************    

(de snd_pcm_access_mask_sizeof ()
    (int #{ snd_pcm_access_mask_sizeof() #})) ;; size_t -> int

(de snd_pcm_access_mask_alloca (s)
    ((-gptr- "snd_pcm_access_mask_t **") s)
    #{ snd_pcm_access_mask_alloca($s) #}
    ())

(de snd_pcm_access_mask_malloc (s)
    ((-gptr- "snd_pcm_access_mask_t **") s)
    (int #{ snd_pcm_access_mask_malloc($s) #}))

(de snd_pcm_access_mask_free (s)
    ((-gptr- "snd_pcm_access_mask_t *") s)
    #{ snd_pcm_access_mask_free($s) #}
    ())

(de snd_pcm_access_mask_copy (dst src)
    ((-gptr- "snd_pcm_access_mask_t *") dst)
    ((-gptr- "const snd_pcm_access_mask_t *") src)
    #{ snd_pcm_access_mask_copy($dst,$src) #}
    ())

(de snd_pcm_access_mask_none (s)
    ((-gptr- "snd_pcm_access_mask_t *") s)
    #{ snd_pcm_access_mask_none($s) #}
    ())

(de snd_pcm_access_mask_any (s)
    ((-gptr- "snd_pcm_access_mask_t *") s)
    #{ snd_pcm_access_mask_any($s) #}
    ())

(de snd_pcm_access_mask_test (s val)
    ((-gptr- "const snd_pcm_access_mask_t *") s)
    ((-int-) val)
    (int #{ snd_pcm_access_mask_test($s,$val) #}))

(de snd_pcm_access_mask_empty (s)
    ((-gptr- "const snd_pcm_access_mask_t *") s)
    (int #{ snd_pcm_access_mask_empty($s) #}))

(de snd_pcm_access_mask_set (s val)
    ((-gptr- "snd_pcm_access_mask_t *") s)
    ((-int-) val)
    #{ snd_pcm_access_mask_set($s,$val) #}
    ())

(de snd_pcm_access_mask_reset (s val)
    ((-gptr- "snd_pcm_access_mask_t *") s)
    ((-int-) val)
    #{ snd_pcm_access_mask_reset($s,$val) #}
    ())


;;***********************************************************************************
;;
;;       PCM_Format                        Format Mask Functions
;;
;;***********************************************************************************    
(de snd_pcm_format_mask_sizeof ()
    (int #{ snd_pcm_format_mask_sizeof() #})) ;; size_t -> int

(de snd_pcm_format_mask_alloca (s)
    ((-gptr- "snd_pcm_format_mask_t **") s)
    #{ snd_pcm_format_mask_alloca($s) #}
    ())

(de snd_pcm_format_mask_malloc (s)
    ((-gptr- "snd_pcm_format_mask_t **") s)
    (int #{ snd_pcm_format_mask_malloc($s) #}))

(de snd_pcm_format_mask_free (s)
    ((-gptr- "snd_pcm_format_mask_t *") s)
    #{ snd_pcm_format_mask_free($s) #}
    ())

(de snd_pcm_format_mask_copy (dst src)
    ((-gptr- "snd_pcm_format_mask_t *") dst)
    ((-gptr- "const snd_pcm_format_mask_t *") src)
    #{ snd_pcm_format_mask_copy($dst,$src) #}
    ())

(de snd_pcm_format_mask_none (s)
    ((-gptr- "snd_pcm_format_mask_t *") s)
    #{ snd_pcm_format_mask_none($s) #}
    ())

(de snd_pcm_format_mask_any (s)
    ((-gptr- "snd_pcm_format_mask_t *") s)
    #{ snd_pcm_format_mask_any($s) #}
    ())

(de snd_pcm_format_mask_test (s val)
    ((-gptr- "const snd_pcm_format_mask_t *") s)
    ((-int-) val)
    (int #{ snd_pcm_format_mask_test($s,$val) #}))

(de snd_pcm_format_mask_empty (s)
    ((-gptr- "const snd_pcm_format_mask_t *") s)
    (int #{ snd_pcm_format_mask_empty($s) #}))

(de snd_pcm_format_mask_set (s val)
    ((-gptr- "snd_pcm_format_mask_t *") s)
    ((-int-) val)
    #{ snd_pcm_format_mask_set($s,$val) #}
    ())

(de snd_pcm_format_mask_reset (s val)
    ((-gptr- "snd_pcm_format_mask_t *") s)
    ((-int-) val)
    #{ snd_pcm_format_mask_reset($s,$val) #}
    ())

;;***********************************************************************************
;;
;;       PCM_SubFormat                        SubFormat Mask Functions
;;
;;***********************************************************************************    
(de snd_pcm_subformat_mask_sizeof ()
    (int #{ snd_pcm_subformat_mask_sizeof() #})) ;; size_t -> int

(de snd_pcm_subformat_mask_alloca (s)
    ((-gptr- "snd_pcm_subformat_mask_t **") s)
    #{ snd_pcm_subformat_mask_alloca($s) #}
    ())

(de snd_pcm_subformat_mask_malloc (s)
    ((-gptr- "snd_pcm_subformat_mask_t **") s)
    (int #{ snd_pcm_subformat_mask_malloc($s) #}))

(de snd_pcm_subformat_mask_free (s)
    ((-gptr- "snd_pcm_subformat_mask_t *") s)
    #{ snd_pcm_subformat_mask_free($s) #}
    ())

(de snd_pcm_subformat_mask_copy (dst src)
    ((-gptr- "snd_pcm_subformat_mask_t *") dst)
    ((-gptr- "const snd_pcm_subformat_mask_t *") src)
    #{ snd_pcm_subformat_mask_copy($dst,$src) #}
    ())

(de snd_pcm_subformat_mask_none (s)
    ((-gptr- "snd_pcm_subformat_mask_t *") s)
    #{ snd_pcm_subformat_mask_none($s) #}
    ())

(de snd_pcm_subformat_mask_any (s)
    ((-gptr- "snd_pcm_subformat_mask_t *") s)
    #{ snd_pcm_subformat_mask_any($s) #}
    ())

(de snd_pcm_subformat_mask_test (s val)
    ((-gptr- "const snd_pcm_subformat_mask_t *") s)
    ((-int-) val)
    (int #{ snd_pcm_subformat_mask_test($s,$val) #}))

(de snd_pcm_subformat_mask_empty (s)
    ((-gptr- "const snd_pcm_subformat_mask_t *") s)
    (int #{ snd_pcm_subformat_mask_empty($s) #}))

(de snd_pcm_subformat_mask_set (s val)
    ((-gptr- "snd_pcm_subformat_mask_t *") s)
    ((-int-) val)
    #{ snd_pcm_subformat_mask_set($s,$val) #}
    ())

(de snd_pcm_subformat_mask_reset (s val)
    ((-gptr- "snd_pcm_subformat_mask_t *") s)
    ((-int-) val)
    #{ snd_pcm_subformat_mask_reset($s,$val) #}
    ())


;;***********************************************************************************
;;
;;       PCM_Status                        Status Functions
;;
;;***********************************************************************************    
(de snd_pcm_status_sizeof ()
    (int #{ snd_pcm_status_sizeof() #})) ;; size_t -> int

(de snd_pcm_status_alloca (s)
    ((-gptr- "snd_pcm_status_t **") s)
    #{ snd_pcm_status_alloca($s) #}
    ())

(de snd_pcm_status_malloc (s)
    ((-gptr- "snd_pcm_status_t **") s)
    (int #{ snd_pcm_status_malloc($s) #}))

(de snd_pcm_status_free (s)
    ((-gptr- "snd_pcm_status_t *") s)
    #{ snd_pcm_status_free($s) #}
    ())

(de snd_pcm_status_copy (dst src)
    ((-gptr- "snd_pcm_status_t *") dst)
    ((-gptr- "const snd_pcm_status_t *") src)
    #{ snd_pcm_status_copy($dst,$src) #}
    ())

(de snd_pcm_status_get_state (s)
    ((-gptr- "const snd_pcm_status_t *") s)
    (int #{ snd_pcm_status_get_state($s) #}))

(de snd_pcm_status_get_trigger_tstamp (s v)
    ((-gptr- "const snd_pcm_status_t *") s)
    ((-gptr- "snd_timestamp_t *") v)
    #{ snd_pcm_status_get_trigger_tstamp($s,$v); #}
    ())

(de snd_pcm_status_get_tstamp (s v)
    ((-gptr- "const snd_pcm_status_t *") s)
    ((-gptr- "snd_timestamp_t *") v)
    #{ snd_pcm_status_get_tstamp($s,$v); #}
    ())

(de snd_pcm_status_get_delay (s)
    ((-gptr- "const snd_pcm_status_t *") s)
    (int #{ snd_pcm_status_get_delay($s) #})) ;; long->int

(de snd_pcm_status_get_avail (s)
    ((-gptr- "const snd_pcm_status_t *") s)
    (int #{ snd_pcm_status_get_avail($s) #})) ;; long->int

(de snd_pcm_status_get_avail_max (s)
    ((-gptr- "const snd_pcm_status_t *") s)
    (int #{ snd_pcm_status_get_avail_max($s) #})) ;; long->int

(de snd_pcm_status_get_overrange (s)
    ((-gptr- "const snd_pcm_status_t *") s)
    (int #{ snd_pcm_status_get_overrange($s) #})) ;; long->int


;;**********************************************************************************
;;
;;     PCM_Description                      Description Functions
;;
;;**********************************************************************************

(de snd_pcm_stream_name (s)
    ((-int-) s)
    (gptr #{ snd_pcm_stream_name($s) #}))

(de snd_pcm_access_name (s)
    ((-int-) s)
    (gptr #{ snd_pcm_access_name($s) #}))

(de snd_pcm_format_name (s)
    ((-int-) s)
    (gptr #{ snd_pcm_format_name($s) #}))

(de snd_pcm_format_description (s)
    ((-int-) s)
    (gptr #{ snd_pcm_format_description($s) #}))

(de snd_pcm_subformat_name (s)
    ((-int-) s)
    (gptr #{ snd_pcm_subformat_name($s) #}))

(de snd_pcm_subformat_description (s)
    ((-int-) s)
    (gptr #{ snd_pcm_subformat_description($s) #}))

(de snd_pcm_format_value (name)
    ((-gptr- "const char *") name)
    (int #{ snd_pcm_format_value($name) #}))

(de snd_pcm_tstamp_mode_name (s)
    ((-int-) s)
    (gptr #{ snd_pcm_tstamp_mode_name($s) #}))

(de snd_pcm_state_name (s)
    ((-int-) s)
    (gptr #{ snd_pcm_state_name($s) #}))

;;**********************************************************************************
;;
;;     PCM_Dump                      Debug Functions
;;
;;**********************************************************************************

(de snd_pcm_dump (pcm out)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_dump($pcm,$out) #}))

(de snd_pcm_dump_hw_setup (pcm out)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_dump_hw_setup($pcm,$out) #}))

(de snd_pcm_dump_sw_setup (pcm out)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_dump_sw_setup($pcm,$out) #}))

(de snd_pcm_dump_setup (pcm out)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_dump_setup($pcm,$out) #}))

(de snd_pcm_hw_params_dump (params out)
    ((-gptr- "snd_pcm_hw_params_t *") params)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_hw_params_dump($params,$out) #}))

(de snd_pcm_sw_params_dump (params out)
    ((-gptr- "snd_pcm_sw_params_t *") params)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_sw_params_dump($params,$out) #}))

(de snd_pcm_status_dump (status out)
    ((-gptr- "snd_pcm_status_t *") status)
    ((-gptr- "snd_output_t *") out)
    (int #{ snd_pcm_status_dump($status,$out) #}))


;;**********************************************************************************
;;
;;     PCM_Direct                      Direct Access (MMAP)  Functions
;;
;;**********************************************************************************
(de snd_pcm_mmap_begin (pcm areas offset frames)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "const snd_pcm_channel_area_t **") areas)
    ((-gptr- "snd_pcm_uframes_t *") offset frames)
    (int #{ snd_pcm_mmap_begin($pcm,$areas,$offset,$frames) #}))

(de snd_pcm_mmap_commit (pcm offset frames)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) offset frames)                 ;; long->int
    (int #{ snd_pcm_mmap_commit($pcm,$offset,$frames) #})) ;; long->int

(de snd_pcm_mmap_writei (pcm buffer size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "const void *") buffer)
    ((-int-) size)                 ;; long->int
    (int #{ snd_pcm_mmap_writei($pcm,$buffer,$size) #})) ;; long->int

(de snd_pcm_mmap_readi (pcm buffer size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "void *") buffer)
    ((-int-) size)                 ;; long->int
    (int #{ snd_pcm_mmap_readi($pcm,$buffer,$size) #})) ;; long->int

(de snd_pcm_mmap_writen (pcm bufs size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "void **") bufs)
    ((-int-) size)                 ;; long->int
    (int #{ snd_pcm_mmap_writen($pcm,$bufs,$size) #})) ;; long->int

(de snd_pcm_mmap_readn (pcm bufs size)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "void **") bufs)
    ((-int-) size)                 ;; long->int
    (int #{ snd_pcm_mmap_readn($pcm,$bufs,$size) #})) ;; long->int


;;**********************************************************************************
;;
;;     PCM_Helpers                      Helper  Functions
;;
;;**********************************************************************************
(de snd_pcm_format_signed ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_signed($format) #}))

(de snd_pcm_format_unsigned ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_unsigned($format) #}))

(de snd_pcm_format_linear ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_linear($format) #}))

(de snd_pcm_format_float ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_float($format) #}))

(de snd_pcm_format_little_endian ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_little_endian($format) #}))

(de snd_pcm_format_big_endian ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_big_endian($format) #}))

(de snd_pcm_format_cpu_endian ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_cpu_endian($format) #}))

(de snd_pcm_format_width ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_width($format) #}))

(de snd_pcm_format_physical_width ( format )
    ((-int-) format)
    (int #{ snd_pcm_format_physical_width($format) #}))


(de snd_pcm_build_linear_format (width pwidth unsignd big_endian)
    ((-int-) width pwidth unsignd big_endian)
    (int #{ snd_pcm_build_linear_format($width,$pwidth,$unsignd,$big_endian) #} ))

;;********* functions with strange return types
(de snd_pcm_format_size ( format samples)
    ((-int-) format)
    ((-int-) samples)
    (int #{ snd_pcm_format_size($format,$samples) #}))

(de snd_pcm_format_silence ( format)
    ((-int-) format)
    (int #{ snd_pcm_format_silence($format) #}))

(de snd_pcm_format_silence_16 ( format)
    ((-int-) format)
    (int #{ snd_pcm_format_silence_16($format) #}))

(de snd_pcm_format_silence_32 ( format)
    ((-int-) format)
    (int #{ snd_pcm_format_silence_32($format) #}))

(de snd_pcm_format_silence_64 ( format)
    ((-int-) format)
    (int #{ snd_pcm_format_silence_64($format) #}))

(de snd_pcm_format_set_silence ( format buf samples)
    ((-int-) format)
    ((-gptr-) buf)
    ((-int-) samples)			;; uint->int
    (int #{ snd_pcm_format_set_silence($format,$buf,$samples) #}))

(de snd_pcm_bytes_to_frames (pcm bytes)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) bytes) 			;; what's ssize_t?
    (int #{ snd_pcm_bytes_to_frames($pcm,$bytes) #})) ;; long -> int

(de snd_pcm_frames_to_bytes (pcm frames)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) frames)			;; long->int
    (int #{ snd_pcm_frames_to_bytes($pcm,$frames) #}))

(de snd_pcm_bytes_to_samples (pcm bytes)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) bytes)
    (int #{ snd_pcm_bytes_to_samples($pcm,$bytes) #})) ;; long->int

(de snd_pcm_samples_to_bytes (pcm samples)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) samples)			;; long->int
    (int #{ snd_pcm_samples_to_bytes($pcm,$samples) #}))

(de snd_pcm_area_silence (dst_channel dst_offset samples format)
    ((-gptr- "const snd_pcm_channel_area_t *") dst_channel)
    ((-int-) dst_offset)		;; long->int
    ((-int-) samples)			;; uint->int
    ((-int-) format)
    (int #{ snd_pcm_area_silence($dst_channel,$dst_offset,$samples,$format) #}))

(de snd_pcm_areas_silence (dst_channel dst_offset channels frames format)
    ((-gptr- "const snd_pcm_channel_area_t *") dst_channel)
    ((-int-) dst_offset)		;; long->int
    ((-int-) channels)			;; uint->int
    ((-int-) frames)			;; long->int
    ((-int-) format)
    (int #{ snd_pcm_areas_silence($dst_channel,$dst_offset,$channels,$frames,$format) #}))

(de snd_pcm_area_copy (dst_channel dst_offset src_channel src_offset samples format)
    ((-gptr- "const snd_pcm_channel_area_t *") dst_channel src_channel)
    ((-int-) dst_offset src_offset)	;; long->int
    ((-int-) samples)			;; uint->int
    ((-int-) format)
    (int #{ snd_pcm_area_copy($dst_channel,$dst_offset,$src_channel,$src_offset,$samples,$format) #}))

(de snd_pcm_areas_copy (dst_channels dst_offset src_channels src_offset channels frames format)
    ((-gptr- "const snd_pcm_channel_area_t *") dst_channels src_channels)
    ((-int-) dst_offset src_offset)	;; long->int
    ((-int-) channels)			;; uint->int
    ((-int-) frames)			;; long->int
    ((-int-) format)
    (int #{ snd_pcm_areas_copy($dst_channels,$dst_offset,$src_channels,$src_offset,$channels,$frames,$format) #}))

;;**********************************************************************************
;;
;;     PCM_Hook                      Hook Extensions
;;
;;**********************************************************************************


(de snd_pcm_hook_get_pcm ( hook)
    ((-gptr- "snd_pcm_hook_t *") hook)
    (gptr #{ snd_pcm_hook_get_pcm($hook) #}))

(de snd_pcm_hook_get_private ( hook)
    ((-gptr- "snd_pcm_hook_t *") hook)
    (gptr #{ snd_pcm_hook_get_private($hook) #} ))

(de snd_pcm_hook_set_private ( hook private_data)
    ((-gptr- "snd_pcm_hook_t *") hook)
    ((-gptr-) private_data)
    #{ snd_pcm_hook_set_private($hook,$private_data) #}
    ())

(de snd_pcm_hook_add ( hookp pcm type func private_data)
    ((-gptr- "snd_pcm_hook_t **") hookp)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-int-) type)
    ((-gptr-) func)
    ((-gptr-) private_data)
    (int #{ snd_pcm_hook_add($hookp,$pcm,$type,$func,$private_data) #}))

(de snd_pcm_hook_remove ( hook)
    ((-gptr- "snd_pcm_hook_t *") hook)
    (int #{ snd_pcm_hook_remove($hook) #}))

;;**********************************************************************************
;;
;;     PCM_Scope                      Scope Plugin  Functions
;;
;;**********************************************************************************

(de snd_pcm_meter_get_bufsize ( pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_meter_get_bufsize($pcm) #})) ;;long->int

(de snd_pcm_meter_get_channels ( pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_meter_get_channels($pcm) #})) ;;uint->int

(de snd_pcm_meter_get_rate ( pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_meter_get_rate($pcm) #})) ;; uint->int

(de snd_pcm_meter_get_now ( pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_meter_get_now($pcm) #})) ;; long->int

(de snd_pcm_meter_get_boundary ( pcm)
    ((-gptr- "snd_pcm_t *") pcm)
    (int #{ snd_pcm_meter_get_boundary($pcm) #})) ;; long->int

(de snd_pcm_meter_add_scope ( pcm scope)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "snd_pcm_scope_t *") scope)
    (int #{ snd_pcm_meter_add_scope($pcm,$scope) #})) 

(de snd_pcm_meter_search_scope ( pcm name)
    ((-gptr- "snd_pcm_t *") pcm)
    ((-gptr- "const char *") name)
    (gptr #{ snd_pcm_meter_search_scope($pcm,$name) #})) 

;;*************** scope (8) **********************************

(de  snd_pcm_scope_malloc ( s)
     ((-gptr- "snd_pcm_scope_t **") s)
     (int #{ snd_pcm_scope_malloc($s) #} ))

(de  snd_pcm_scope_set_ops ( scope val)
     ((-gptr- "snd_pcm_scope_t *") scope)
     ((-gptr- "snd_pcm_scope_ops_t *") val)
     #{ snd_pcm_scope_set_ops($scope,$val) #}
     ())

(de  snd_pcm_scope_set_name ( scope val)
     ((-gptr- "snd_pcm_scope_t *") scope)
     ((-gptr- "const char *") val)
     #{ snd_pcm_scope_set_name($scope,$val) #}
     ())

(de  snd_pcm_scope_get_name ( scope)
     ((-gptr- "snd_pcm_scope_t *") scope)
     (gptr #{ snd_pcm_scope_get_name($scope) #}))

(de  snd_pcm_scope_get_callback_private ( scope)
     ((-gptr- "snd_pcm_scope_t *") scope)
     (gptr #{ snd_pcm_scope_get_callback_private($scope) #} ))

(de  snd_pcm_scope_set_callback_private ( scope val)
     ((-gptr- "snd_pcm_scope_t *") scope)
     ((-gptr-) val)
     #{ snd_pcm_scope_set_callback_private($scope,$val) #}
     ())

(de  snd_pcm_scope_s16_open ( pcm name scopep)
     ((-gptr- "snd_pcm_t *") pcm)
     ((-gptr- "const char *") name)
     ((-gptr- "snd_pcm_scope_t **") scopep)
     (int #{ snd_pcm_scope_s16_open($pcm,$name,$scopep) #}))

(de  snd_pcm_scope_s16_get_channel_buffer ( scope channel)
     ((-gptr- "snd_pcm_scope_t *") scope)
     ((-int-) channel)			;; uint->int
     (gptr #{ snd_pcm_scope_s16_get_channel_buffer($scope, $channel) #})) 


;; ********************************************************

(dhc-make ()
  dummy_pcm
  snd_pcm_open
  snd_pcm_open_lconf
  snd_pcm_close
  snd_pcm_name
  snd_pcm_type
  snd_pcm_stream
  snd_pcm_poll_descriptors_count
  snd_pcm_poll_descriptors
  snd_pcm_poll_descriptors_revents
  snd_pcm_nonblock
  snd_async_add_pcm_handler
  snd_async_handler_get_pcm
  snd_pcm_info
  snd_pcm_hw_params
  snd_pcm_hw_free
  snd_pcm_sw_params
  snd_pcm_prepare
  snd_pcm_reset
  snd_pcm_status
  snd_pcm_start
  snd_pcm_drop
  snd_pcm_drain
  snd_pcm_pause
  snd_pcm_state
  snd_pcm_delay
  snd_pcm_resume
  snd_pcm_avail_update
  snd_pcm_rewind
  snd_pcm_writei
  snd_pcm_readi
  snd_pcm_writen
  snd_pcm_readn
  snd_pcm_wait
  snd_pcm_link
  snd_pcm_unlink
  snd_pcm_info_sizeof
  snd_pcm_info_alloca
  snd_pcm_info_malloc
  snd_pcm_info_free
  snd_pcm_info_copy
  snd_pcm_info_get_device
  snd_pcm_info_get_subdevice
  snd_pcm_info_get_stream
  snd_pcm_info_get_card
  snd_pcm_info_get_id
  snd_pcm_info_get_name
  snd_pcm_info_get_subdevice_name
  snd_pcm_info_get_class
  snd_pcm_info_get_subclass
  snd_pcm_info_get_subdevices_count
  snd_pcm_info_get_subdevices_avail
  snd_pcm_info_get_sync
  snd_pcm_info_set_device
  snd_pcm_info_set_subdevice
  snd_pcm_info_set_stream
  snd_pcm_hw_params_any
  snd_pcm_hw_params_can_mmap_sample_resolution
  snd_pcm_hw_params_can_overrange
  snd_pcm_hw_params_can_pause
  snd_pcm_hw_params_can_resume
  snd_pcm_hw_params_can_sync_start
  snd_pcm_hw_params_is_double
  snd_pcm_hw_params_is_batch
  snd_pcm_hw_params_is_block_transfer
  snd_pcm_hw_params_is_half_duplex
  snd_pcm_hw_params_is_joint_duplex
  snd_pcm_hw_params_get_rate_numden
  snd_pcm_hw_params_get_sbits
  snd_pcm_hw_params_get_fifo_size
  snd_pcm_hw_params_sizeof
  snd_pcm_hw_params_alloca
  snd_pcm_hw_params_malloc
  snd_pcm_hw_params_free
  snd_pcm_hw_params_copy
  snd_pcm_hw_params_get_access
  snd_pcm_hw_params_test_access
  snd_pcm_hw_params_set_access
  snd_pcm_hw_params_set_access_first
  snd_pcm_hw_params_set_access_last
  snd_pcm_hw_params_set_access_mask
  snd_pcm_hw_params_get_access_mask
  snd_pcm_hw_params_get_format
  snd_pcm_hw_params_test_format
  snd_pcm_hw_params_set_format
  snd_pcm_hw_params_set_format_first
  snd_pcm_hw_params_set_format_last
  snd_pcm_hw_params_set_format_mask
  snd_pcm_hw_params_get_format_mask
  snd_pcm_hw_params_get_subformat
  snd_pcm_hw_params_test_subformat
  snd_pcm_hw_params_set_subformat
  snd_pcm_hw_params_set_subformat_first
  snd_pcm_hw_params_set_subformat_last
  snd_pcm_hw_params_set_subformat_mask
  snd_pcm_hw_params_get_subformat_mask
  snd_pcm_hw_params_get_channels
  snd_pcm_hw_params_get_channels_min
  snd_pcm_hw_params_get_channels_max
  snd_pcm_hw_params_test_channels
  snd_pcm_hw_params_set_channels
  snd_pcm_hw_params_set_channels_min
  snd_pcm_hw_params_set_channels_max
  snd_pcm_hw_params_set_channels_minmax
  snd_pcm_hw_params_set_channels_near
  snd_pcm_hw_params_set_channels_first
  snd_pcm_hw_params_set_channels_last
  snd_pcm_hw_params_get_rate
  snd_pcm_hw_params_get_rate_min
  snd_pcm_hw_params_get_rate_max
  snd_pcm_hw_params_test_rate
  snd_pcm_hw_params_set_rate
  snd_pcm_hw_params_set_rate_min
  snd_pcm_hw_params_set_rate_max
  snd_pcm_hw_params_set_rate_minmax
  snd_pcm_hw_params_set_rate_near
  snd_pcm_hw_params_set_rate_first
  snd_pcm_hw_params_set_rate_last
  snd_pcm_hw_params_get_period_time
  snd_pcm_hw_params_get_period_time_min
  snd_pcm_hw_params_get_period_time_max
  snd_pcm_hw_params_test_period_time
  snd_pcm_hw_params_set_period_time
  snd_pcm_hw_params_set_period_time_min
  snd_pcm_hw_params_set_period_time_max
  snd_pcm_hw_params_set_period_time_minmax
  snd_pcm_hw_params_set_period_time_near
  snd_pcm_hw_params_set_period_time_first
  snd_pcm_hw_params_set_period_time_last
  snd_pcm_hw_params_get_period_size
  snd_pcm_hw_params_get_period_size_min
  snd_pcm_hw_params_get_period_size_max
  snd_pcm_hw_params_test_period_size
  snd_pcm_hw_params_set_period_size
  snd_pcm_hw_params_set_period_size_min
  snd_pcm_hw_params_set_period_size_max
  snd_pcm_hw_params_set_period_size_minmax
  snd_pcm_hw_params_set_period_size_near
  snd_pcm_hw_params_set_period_size_first
  snd_pcm_hw_params_set_period_size_last
  snd_pcm_hw_params_set_period_size_integer
  snd_pcm_hw_params_get_periods
  snd_pcm_hw_params_get_periods_min
  snd_pcm_hw_params_get_periods_max
  snd_pcm_hw_params_test_periods
  snd_pcm_hw_params_set_periods
  snd_pcm_hw_params_set_periods_min
  snd_pcm_hw_params_set_periods_max
  snd_pcm_hw_params_set_periods_minmax
  snd_pcm_hw_params_set_periods_near
  snd_pcm_hw_params_set_periods_first
  snd_pcm_hw_params_set_periods_last
  snd_pcm_hw_params_set_periods_integer
  snd_pcm_hw_params_get_buffer_time
  snd_pcm_hw_params_get_buffer_time_min
  snd_pcm_hw_params_get_buffer_time_max
  snd_pcm_hw_params_test_buffer_time
  snd_pcm_hw_params_set_buffer_time
  snd_pcm_hw_params_set_buffer_time_min
  snd_pcm_hw_params_set_buffer_time_max
  snd_pcm_hw_params_set_buffer_time_minmax
  snd_pcm_hw_params_set_buffer_time_near
  snd_pcm_hw_params_set_buffer_time_first
  snd_pcm_hw_params_set_buffer_time_last
  snd_pcm_hw_params_get_buffer_size
  snd_pcm_hw_params_get_buffer_size_min
  snd_pcm_hw_params_get_buffer_size_max
  snd_pcm_hw_params_test_buffer_size
  snd_pcm_hw_params_set_buffer_size
  snd_pcm_hw_params_set_buffer_size_min
  snd_pcm_hw_params_set_buffer_size_max
  snd_pcm_hw_params_set_buffer_size_minmax
  snd_pcm_hw_params_set_buffer_size_near
  snd_pcm_hw_params_set_buffer_size_first
  snd_pcm_hw_params_set_buffer_size_last
  snd_pcm_hw_params_get_tick_time
  snd_pcm_hw_params_get_tick_time_min
  snd_pcm_hw_params_get_tick_time_max
  snd_pcm_hw_params_test_tick_time
  snd_pcm_hw_params_set_tick_time
  snd_pcm_hw_params_set_tick_time_min
  snd_pcm_hw_params_set_tick_time_max
  snd_pcm_hw_params_set_tick_time_minmax
  snd_pcm_hw_params_set_tick_time_near
  snd_pcm_hw_params_set_tick_time_first
  snd_pcm_hw_params_set_tick_time_last
  snd_pcm_sw_params_current
  snd_pcm_sw_params_sizeof
  snd_pcm_sw_params_alloca
  snd_pcm_sw_params_malloc
  snd_pcm_sw_params_free
  snd_pcm_sw_params_copy
  snd_pcm_sw_params_set_tstamp_mode
  snd_pcm_sw_params_get_tstamp_mode
  snd_pcm_sw_params_set_sleep_min
  snd_pcm_sw_params_get_sleep_min
  snd_pcm_sw_params_set_avail_min
  snd_pcm_sw_params_get_avail_min
  snd_pcm_sw_params_set_xfer_align
  snd_pcm_sw_params_get_xfer_align
  snd_pcm_sw_params_set_start_threshold
  snd_pcm_sw_params_get_start_threshold
  snd_pcm_sw_params_set_stop_threshold
  snd_pcm_sw_params_get_stop_threshold
  snd_pcm_sw_params_set_silence_threshold
  snd_pcm_sw_params_get_silence_threshold
  snd_pcm_sw_params_set_silence_size
  snd_pcm_sw_params_get_silence_size
  snd_pcm_access_mask_sizeof
  snd_pcm_access_mask_alloca
  snd_pcm_access_mask_malloc
  snd_pcm_access_mask_free
  snd_pcm_access_mask_copy
  snd_pcm_access_mask_none
  snd_pcm_access_mask_any
  snd_pcm_access_mask_test
  snd_pcm_access_mask_empty
  snd_pcm_access_mask_set
  snd_pcm_access_mask_reset
  snd_pcm_format_mask_sizeof
  snd_pcm_format_mask_alloca
  snd_pcm_format_mask_malloc
  snd_pcm_format_mask_free
  snd_pcm_format_mask_copy
  snd_pcm_format_mask_none
  snd_pcm_format_mask_any
  snd_pcm_format_mask_test
  snd_pcm_format_mask_empty
  snd_pcm_format_mask_set
  snd_pcm_format_mask_reset
  snd_pcm_subformat_mask_sizeof
  snd_pcm_subformat_mask_alloca
  snd_pcm_subformat_mask_malloc
  snd_pcm_subformat_mask_free
  snd_pcm_subformat_mask_copy
  snd_pcm_subformat_mask_none
  snd_pcm_subformat_mask_any
  snd_pcm_subformat_mask_test
  snd_pcm_subformat_mask_empty
  snd_pcm_subformat_mask_set
  snd_pcm_subformat_mask_reset
  snd_pcm_status_sizeof
  snd_pcm_status_alloca
  snd_pcm_status_malloc
  snd_pcm_status_free
  snd_pcm_status_copy
  snd_pcm_status_get_state
  snd_pcm_status_get_trigger_tstamp
  snd_pcm_status_get_tstamp
  snd_pcm_status_get_delay
  snd_pcm_status_get_avail
  snd_pcm_status_get_avail_max
  snd_pcm_status_get_overrange
  snd_pcm_stream_name
  snd_pcm_access_name
  snd_pcm_format_name
  snd_pcm_format_description
  snd_pcm_subformat_name
  snd_pcm_subformat_description
  snd_pcm_format_value
  snd_pcm_tstamp_mode_name
  snd_pcm_state_name
  snd_pcm_dump
  snd_pcm_dump_hw_setup
  snd_pcm_dump_sw_setup
  snd_pcm_dump_setup
  snd_pcm_hw_params_dump
  snd_pcm_sw_params_dump
  snd_pcm_status_dump
  snd_pcm_mmap_begin
  snd_pcm_mmap_commit
  snd_pcm_mmap_writei
  snd_pcm_mmap_readi
  snd_pcm_mmap_writen
  snd_pcm_mmap_readn
  snd_pcm_format_signed
  snd_pcm_format_unsigned
  snd_pcm_format_linear
  snd_pcm_format_float
  snd_pcm_format_little_endian
  snd_pcm_format_big_endian
  snd_pcm_format_cpu_endian
  snd_pcm_format_width
  snd_pcm_format_physical_width
  snd_pcm_build_linear_format
  snd_pcm_format_size
  snd_pcm_format_silence
  snd_pcm_format_silence_16
  snd_pcm_format_silence_32
  snd_pcm_format_silence_64
  snd_pcm_format_set_silence
  snd_pcm_bytes_to_frames
  snd_pcm_frames_to_bytes
  snd_pcm_bytes_to_samples
  snd_pcm_samples_to_bytes
  snd_pcm_area_silence
  snd_pcm_areas_silence
  snd_pcm_area_copy
  snd_pcm_areas_copy
  snd_pcm_hook_get_pcm
  snd_pcm_hook_get_private
  snd_pcm_hook_set_private
  snd_pcm_hook_add
  snd_pcm_hook_remove
  snd_pcm_meter_get_bufsize
  snd_pcm_meter_get_channels
  snd_pcm_meter_get_rate
  snd_pcm_meter_get_now
  snd_pcm_meter_get_boundary
  snd_pcm_meter_add_scope
  snd_pcm_meter_search_scope
  snd_pcm_scope_malloc
  snd_pcm_scope_set_ops
  snd_pcm_scope_set_name
  snd_pcm_scope_get_name
  snd_pcm_scope_get_callback_private
  snd_pcm_scope_set_callback_private
  snd_pcm_scope_s16_open
  snd_pcm_scope_s16_get_channel_buffer
)

;;  snd_pcm_hw_params_strategy
;;  snd_pcm_hw_strategy_free
;;  snd_pcm_hw_strategy_simple
;;  snd_pcm_hw_params_try_explain_failure
;;  snd_pcm_sw_params_set_period_step
;;  snd_pcm_sw_params_get_period_step
