timidity_output.h

Go to the documentation of this file.
00001 /* 
00002 
00003     TiMidity -- Experimental MIDI to WAVE converter
00004     Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 
00020     output.h
00021 
00022 */
00023 
00024 #ifdef USE_TIMIDITY_MIDI
00025 
00026 #ifndef TIMIDITY_OUTPUT_H_INCLUDED
00027 #define TIMIDITY_OUTPUT_H_INCLUDED
00028 
00029 #include "timidity.h"
00030 
00031 #ifdef NS_TIMIDITY
00032 namespace NS_TIMIDITY {
00033 #endif
00034 
00035 struct PlayMode {
00036   sint32 rate, encoding;
00037   char *id_name;
00038 };
00039 
00040 extern PlayMode *play_mode_list[], *play_mode;
00041 extern int init_buffers(int kbytes);
00042 
00043 /* Conversion functions -- These overwrite the sint32 data in *lp with
00044    data in another format */
00045 
00046 /* The size of the output buffers */
00047 extern int AUDIO_BUFFER_SIZE;
00048 
00049 /* Actual copy function */
00050 extern void (*s32tobuf)(void *dp, sint32 *lp, sint32 c);
00051 
00052 /* 8-bit signed and unsigned*/
00053 extern void s32tos8(void *dp, sint32 *lp, sint32 c);
00054 extern void s32tou8(void *dp, sint32 *lp, sint32 c);
00055 
00056 /* 16-bit */
00057 extern void s32tos16(void *dp, sint32 *lp, sint32 c);
00058 extern void s32tou16(void *dp, sint32 *lp, sint32 c);
00059 
00060 /* byte-exchanged 16-bit */
00061 extern void s32tos16x(void *dp, sint32 *lp, sint32 c);
00062 extern void s32tou16x(void *dp, sint32 *lp, sint32 c);
00063 
00064 /* uLaw (8 bits) */
00065 extern void s32toulaw(void *dp, sint32 *lp, sint32 c);
00066 
00067 /* little-endian and big-endian specific */
00068 #ifdef LITTLE_ENDIAN
00069 #define s32tou16l s32tou16
00070 #define s32tou16b s32tou16x
00071 #define s32tos16l s32tos16
00072 #define s32tos16b s32tos16x
00073 #else
00074 #define s32tou16l s32tou16x
00075 #define s32tou16b s32tou16
00076 #define s32tos16l s32tos16x
00077 #define s32tos16b s32tos16
00078 #endif
00079 
00080 #ifdef NS_TIMIDITY
00081 };
00082 #endif
00083 
00084 #endif
00085 
00086 #endif //USE_TIMIDITY_MIDI

Generated on Fri Jul 27 22:27:44 2007 for pentagram by  doxygen 1.4.7