git stults online alsa-signals / master transfer.h
master

Tree @master (Download .tar.gz)

transfer.h @masterraw · history · blame

#ifndef TRANSFER_H
#define TRANSFER_H

#ifdef __cplusplus
extern "C" {
#endif

#include <alsa/asoundlib.h>

/* transfer method structure */
typedef struct transfer_method_t 
{
  const char      *name;
  snd_pcm_access_t access;
  int (*transfer)(snd_pcm_t *handle, signed short *samples,
		  snd_pcm_channel_area_t *areas,
		  void (*loopfn)(void *), void *args);
} transfer_method_t;

/* creates a transfer method structure. methods are: write, write_and_poll, async, async_direct, direct_interleaved, direct_noninterleaved, direct_write */
transfer_method_t *transfer_method_create (const char *method);

/* destroys a transfer method structure */
void               transfer_method_destroy (transfer_method_t *tm);

#ifdef __cplusplus
}
#endif

#endif /* TRANSFER_H */