File: wave_out.h

package info (click to toggle)
faad2 2.7-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd, wheezy
  • size: 5,644 kB
  • sloc: ansic: 65,599; sh: 8,851; cpp: 1,324; makefile: 91
file content (50 lines) | stat: -rw-r--r-- 1,254 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * function: Header file for wave_out.c
 *
 * This program is distributed under the GNU General Public License, version 2.
 * A copy of this license is included with this source.
 *
 * Copyright (C) 2002 John Edwards
 */

#ifndef __WAVE_OUT_H__
#define __WAVE_OUT_H__


#include <stdio.h>
#include <windows.h>

#define Cdecl               __cdecl
#define __attribute__(x)
#define sleep(__sec)        Sleep ((__sec) * 1000)
#define inline              __inline
#define restrict

/*
 * constants
 */

#define CD_SAMPLE_FREQ         44.1e3
#define SAMPLE_SIZE            16
#define SAMPLE_SIZE_STRING     ""
#define WINAUDIO_FD            ((FILE_T)-128)
#define FILE_T                 FILE*
#define INVALID_FILEDESC       NULL

/*
 * Simple types
 */

typedef signed   int        Int;        // at least -32767...+32767, fast type
typedef unsigned int        Uint;       // at least 0...65535, fast type
typedef long double         Ldouble;    // most exact floating point format

/*
 * functions for wave_out.c
 */

Int   Set_WIN_Params        ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
int   WIN_Play_Samples      ( const void* buff, size_t len );
int   WIN_Audio_close       ( void );

#endif   /* __WAVE_OUT_H__ */