~ubuntu-branches/ubuntu/quantal/linphone/quantal

« back to all changes in this revision

Viewing changes to speex/src/wave_out.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2004-06-30 13:58:16 UTC
  • Revision ID: james.westby@ubuntu.com-20040630135816-wwx75gdlodkqbabb
Tags: upstream-0.12.2
ImportĀ upstreamĀ versionĀ 0.12.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2002, John Edwards
 
2
 
 
3
   Redistribution and use in source and binary forms, with or without
 
4
   modification, are permitted provided that the following conditions
 
5
   are met:
 
6
 
 
7
   - Redistributions of source code must retain the above copyright
 
8
   notice, this list of conditions and the following disclaimer.
 
9
 
 
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.
 
13
 
 
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.
 
17
 
 
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.
 
29
*/
 
30
 
 
31
//    WAVE_OUT.H - Necessary stuff for WIN_AUDIO
 
32
 
 
33
 
 
34
#include <stdio.h>
 
35
#include <windows.h>
 
36
 
 
37
#define VERSION_STRING "\n 0.7.0\n"
 
38
 
 
39
#define Cdecl               __cdecl
 
40
#define __attribute__(x)
 
41
#define sleep(__sec)        Sleep ((__sec) * 1000)
 
42
#define inline              __inline
 
43
#define restrict
 
44
 
 
45
//// constants /////////////////////////////////////////////////////
 
46
 
 
47
#define CD_SAMPLE_FREQ         44.1e3
 
48
#define SAMPLE_SIZE            16
 
49
#define SAMPLE_SIZE_STRING     ""
 
50
#define WINAUDIO_FD            ((FILE_T)-128)
 
51
#define FILE_T                 FILE*
 
52
#define INVALID_FILEDESC       NULL
 
53
 
 
54
//// Simple types //////////////////////////////////////////////////
 
55
 
 
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
 
59
 
 
60
//// procedures/functions //////////////////////////////////////////
 
61
// wave_out.c
 
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 );
 
65