00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KINO_OSS_H
00025 #define KINO_OSS_H
00026
00027 #include <libdv/dv_types.h>
00028 #include <inttypes.h>
00029 #ifdef HAVE_ALSA
00030 #include <alsa/asoundlib.h>
00031 #endif
00032
00033 typedef struct {
00034
00035 int16_t *buffer;
00036 uint8_t *arg_audio_file;
00037 char *arg_audio_device;
00038
00039 int fd;
00040 #ifdef HAVE_ALSA
00041
00042 snd_pcm_t *pcmh;
00043 snd_pcm_hw_params_t *hwparams;
00044 int writefail_noted;
00045 int channels;
00046 #endif
00047 } kino_sound_t;
00048
00049 #ifdef __cplusplus
00050 extern "C"
00051 {
00052 #endif
00053
00054 extern kino_sound_t *kino_sound_new( void );
00055 extern int kino_sound_init( dv_audio_t * audio, kino_sound_t * sound, char const *device );
00056 extern int kino_sound_play( dv_audio_t * audio, kino_sound_t * sound, int16_t **out );
00057 extern int kino_sound_player( kino_sound_t * sound, void * out, int size );
00058 extern void kino_sound_close( kino_sound_t * sound );
00059
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063
00064 #endif