]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/ext/speex/wave_out.h
0c467b1945d7b895b896e0be0630ccb55f6260ed
[16.git] / src / lib / doslib / ext / speex / wave_out.h
1 /* Copyright (c) 2002, John Edwards\r
2 \r
3    Redistribution and use in source and binary forms, with or without\r
4    modification, are permitted provided that the following conditions\r
5    are met:\r
6 \r
7    - Redistributions of source code must retain the above copyright\r
8    notice, this list of conditions and the following disclaimer.\r
9 \r
10    - Redistributions in binary form must reproduce the above copyright\r
11    notice, this list of conditions and the following disclaimer in the\r
12    documentation and/or other materials provided with the distribution.\r
13 \r
14    - Neither the name of the Xiph.org Foundation nor the names of its\r
15    contributors may be used to endorse or promote products derived from\r
16    this software without specific prior written permission.\r
17 \r
18    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
19    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
20    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
21    A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR\r
22    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
23    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
24    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
25    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
26    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
27    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
28    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
29 */\r
30 \r
31 //    WAVE_OUT.H - Necessary stuff for WIN_AUDIO\r
32 \r
33 #ifndef WAVE_OUT_H\r
34 #define WAVE_OUT_H\r
35 \r
36 #include <stdio.h>\r
37 #include <windows.h>\r
38 #ifdef __MINGW32__\r
39 #include <mmsystem.h>\r
40 #endif\r
41 \r
42 #define VERSION_STRING "\n 0.7.0\n"\r
43 \r
44 #define Cdecl               __cdecl\r
45 #define __attribute__(x)\r
46 #define sleep(__sec)        Sleep ((__sec) * 1000)\r
47 #define inline              __inline\r
48 #define restrict\r
49 \r
50 //// constants /////////////////////////////////////////////////////\r
51 \r
52 #define CD_SAMPLE_FREQ         44.1e3\r
53 #define SAMPLE_SIZE            16\r
54 #define SAMPLE_SIZE_STRING     ""\r
55 #define WINAUDIO_FD            ((FILE_T)-128)\r
56 #define FILE_T                 FILE*\r
57 #define INVALID_FILEDESC       NULL\r
58 \r
59 //// Simple types //////////////////////////////////////////////////\r
60 \r
61 typedef signed   int        Int;        // at least -32767...+32767, fast type\r
62 typedef unsigned int        Uint;       // at least 0...65535, fast type\r
63 typedef long double         Ldouble;    // most exact floating point format\r
64 \r
65 //// procedures/functions //////////////////////////////////////////\r
66 // wave_out.c\r
67 Int        Set_WIN_Params             ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels);\r
68 int        WIN_Play_Samples           ( const void* buff, size_t len );\r
69 int        WIN_Audio_close            ( void );\r
70 \r
71 #endif /* WAVE_OUT_H */\r