minimodem-mirror/src/simpleaudio.h

50 lines
919 B
C
Raw Normal View History

2011-06-08 23:00:22 +02:00
/*
* simpleaudio.h
*
* Copyright (C) 2011 Kamal Mostafa <kamal@whence.com>
*
* NO LICENSE HAS BEEN SPECIFIED OR GRANTED FOR THIS WORK.
*
*/
#ifndef SIMPLEAUDIO_H
#define SIMPLEAUDIO_H
#include <sys/types.h>
struct simpleaudio;
typedef struct simpleaudio simpleaudio;
/*
* simpleaudio_open_source_XXXX() routines which return a (simpleaudio *)
* are provided by the separate backend modules.
*
*/
simpleaudio *
simpleaudio_open_source_pulseaudio(
// unsigned int rate, unsigned int channels,
char *app_name, char *stream_name );
simpleaudio *
simpleaudio_open_source_sndfile(char *path);
/*
* common simpleaudio_ API routines available to any backend:
*/
unsigned int
simpleaudio_get_rate( simpleaudio *sa );
unsigned int
simpleaudio_get_channels( simpleaudio *sa );
ssize_t
simpleaudio_read( simpleaudio *sa, float *buf, size_t nframes );
void
simpleaudio_close( simpleaudio *sa );
#endif