Main Page | Class List | Directories | File List | Class Members | File Members

wave_out.h

Go to the documentation of this file.
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 
00034 #include <stdio.h>
00035 #include <windows.h>
00036 #ifdef __MINGW32__
00037 #include <mmsystem.h>
00038 #endif
00039 
00040 #define VERSION_STRING "\n 0.7.0\n"
00041 
00042 #define Cdecl               __cdecl
00043 #define __attribute__(x)
00044 #define sleep(__sec)        Sleep ((__sec) * 1000)
00045 #define inline              __inline
00046 #define restrict
00047 
00049 
00050 #define CD_SAMPLE_FREQ         44.1e3
00051 #define SAMPLE_SIZE            16
00052 #define SAMPLE_SIZE_STRING     ""
00053 #define WINAUDIO_FD            ((FILE_T)-128)
00054 #define FILE_T                 FILE*
00055 #define INVALID_FILEDESC       NULL
00056 
00058 
00059 typedef signed   int        Int;        // at least -32767...+32767, fast type
00060 typedef unsigned int        Uint;       // at least 0...65535, fast type
00061 typedef long double         Ldouble;    // most exact floating point format
00062 
00064 // wave_out.c
00065 Int        Set_WIN_Params             ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels);
00066 int        WIN_Play_Samples           ( const void* buff, size_t len );
00067 int        WIN_Audio_close            ( void );
00068 

Generated on Tue May 17 12:46:54 2005 for speex by  doxygen 1.4.2