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