Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

oss.h

Go to the documentation of this file.
00001 /*
00002 *  oss.h
00003 *
00004 *  OSS code Copyright (C) Charles 'Buck' Krasic - January 2001 (from libdv)
00005 *  OSS fragment handling addition by Tomoaki Hayasaka <hayasakas@postman.riken.go.jp>
00006 *  ALSA code Copyright 2005 Troy Rollo
00007 *  Integration code by Dan Dennedy
00008 *
00009 *  This program is free software; you can redistribute it and/or modify it
00010 *  under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2, or (at your
00012 *  option) any later version.
00013 *
00014 *  This program is distributed in the hope that it will be useful, but
00015 *  WITHOUT ANY WARRANTY; without even the implied warranty of
00016 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 *  General Public License for more details.
00018 *
00019 *  You should have received a copy of the GNU General Public License
00020 *  along with GNU Make; see the file COPYING.  If not, write to
00021 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
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   /* common */
00035   int16_t             *buffer;
00036   uint8_t             *arg_audio_file;
00037   char                *arg_audio_device;
00038   /* for OSS */
00039   int                 fd;
00040 #ifdef HAVE_ALSA
00041   /* for ALSA */
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

Generated on Sun Mar 11 22:11:46 2007 for Kino by  doxygen 1.4.2