00001 /* Copyright (c) 2002, John Edwards 00002 00003 Redistribution and use in source and binary forms, with or without 00004 modification, are permitted provided that the following conditions 00005 are met: 00006 00007 - Redistributions of source code must retain the above copyright 00008 notice, this list of conditions and the following disclaimer. 00009 00010 - Redistributions in binary form must reproduce the above copyright 00011 notice, this list of conditions and the following disclaimer in the 00012 documentation and/or other materials provided with the distribution. 00013 00014 - Neither the name of the Xiph.org Foundation nor the names of its 00015 contributors may be used to endorse or promote products derived from 00016 this software without specific prior written permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00019 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00020 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00021 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 00022 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00023 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00024 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00026 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00027 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00028 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 */ 00030 00031 // WAVE_OUT.H - Necessary stuff for WIN_AUDIO 00032 00033 #ifndef WAVE_OUT_H 00034 #define WAVE_OUT_H 00035 00036 #include <stdio.h> 00037 #include <windows.h> 00038 #ifdef __MINGW32__ 00039 #include <mmsystem.h> 00040 #endif 00041 00042 #define VERSION_STRING "\n 0.7.0\n" 00043 00044 #define Cdecl __cdecl 00045 #define __attribute__(x) 00046 #define sleep(__sec) Sleep ((__sec) * 1000) 00047 #define inline __inline 00048 #define restrict 00049 00051 00052 #define CD_SAMPLE_FREQ 44.1e3 00053 #define SAMPLE_SIZE 16 00054 #define SAMPLE_SIZE_STRING "" 00055 #define WINAUDIO_FD ((FILE_T)-128) 00056 #define FILE_T FILE* 00057 #define INVALID_FILEDESC NULL 00058 00060 00061 typedef signed int Int; // at least -32767...+32767, fast type 00062 typedef unsigned int Uint; // at least 0...65535, fast type 00063 typedef long double Ldouble; // most exact floating point format 00064 00066 // wave_out.c 00067 Int Set_WIN_Params ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels); 00068 int WIN_Play_Samples ( const void* buff, size_t len ); 00069 int WIN_Audio_close ( void ); 00070 00071 #endif /* WAVE_OUT_H */