'SND_PCM_NONBLOCK 0x00000001
;; Async notification
'SND_PCM_ASYNC 0x00000002
+ ;; enum _snd_pcm_format (some)
+ 'SND_PCM_FORMAT_S16_LE 2
+ ;; enum _snd_pcm_access (some)
+ 'SND_PCM_ACCESS_RW_INTERLEAVED 3
+ 'SND_PCM_ACCESS_RW_NONINTERLEAVED 4
)
(import LIB "snd_pcm_open" "int"
"int" ; int mode
)
+(import LIB "snd_pcm_writei" "long" ; snd_pcm_uframes_t
+ "void*" ; snd_pcm_t *pcm
+ "void*" ; const void *buffer
+ "long" ; snd_pcm_uframes_t size
+ )
+
+(import LIB "snd_pcm_prepare" "int" ; int
+ "void*" ; snd_pcm_t *pcm
+ )
+
+(import LIB "snd_pcm_start" "int" ; int
+ "void*" ; snd_pcm_t *pcm
+ )
+
+;;typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t
+# "unsigned" ; unsigned int flags;
+# struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
+# SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
+# struct snd_mask mres[5]; /* reserved masks */
+# struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
+# SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
+# struct snd_interval ires[9]; /* reserved intervals */
+# unsigned int rmask; /* W: requested masks */
+# unsigned int cmask; /* R: changed masks */
+# unsigned int info; /* R: Info flags for returned setup */
+# unsigned int msbits; /* R: used most significant bits */
+# unsigned int rate_num; /* R: rate numerator */
+# unsigned int rate_den; /* R: rate denominator */
+# snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */
+# unsigned char reserved[64]; /* reserved for future */
+
+#(import LIB "snd_pcm_hw_params_current" "int"
+# "void*" ; snd_pcm_t *pcm
+# "void*" ; snd_pcm_hw_params_t *params
+# )
+
+(import LIB "snd_pcm_state" "int" ; snd_pcm_state_t snd_pcm_state
+ "void*" ; snd_pcm_t *pcm
+ )
+
+(import LIB "snd_pcm_start" "int" ; snd_pcm_state_t snd_pcm_start
+ "void*" ; snd_pcm_t *pcm
+ )
+
+(import LIB "snd_pcm_wait" "int"
+ "void*" ; snd_pcm_t *pcm
+ "int" ; int timeout
+ )
+
+(import LIB "snd_pcm_set_params" "int"
+ "void*" ; snd_pcm_t *pcm
+ "int" ; snd_pcm_format_t format
+ "int" ; snd_pcm_access_t access
+ "unsigned int" ; unsigned int channels
+ "unsigned int" ; unsigned int rate
+ "int" ;int soft_resample
+ "unsigned int" ; unsigned int latency
+ )
+
+(import LIB "snd_pcm_drain" "int"
+ "void*" ; snd_pcm_t *pcm
+ )
+
+(import LIB "snd_pcm_close" "int"
+ "void*" ; snd_pcm_t *pcm
+ )