mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-05 10:35:54 +00:00
Merge branch 'miami' of github.com:GTAmodding/re3 into miami
This commit is contained in:
commit
0eb5f93e96
9764
libsndfile/ChangeLog
Normal file
9764
libsndfile/ChangeLog
Normal file
File diff suppressed because it is too large
Load diff
199
libsndfile/NEWS
Normal file
199
libsndfile/NEWS
Normal file
|
@ -0,0 +1,199 @@
|
||||||
|
Version 1.0.28 (2017-04-02)
|
||||||
|
* Fix buffer overruns in FLAC and ID3 handling code.
|
||||||
|
* Move to variable length header storage.
|
||||||
|
* Fix detection of Large File Support for 32 bit systems.
|
||||||
|
* Remove large stack allocations in ALAC handling code.
|
||||||
|
* Remove all use of Variable Length Arrays.
|
||||||
|
* Minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.27 (2016-06-19)
|
||||||
|
* Fix an SF_INFO seekable flag regression introduced in 1.0.26.
|
||||||
|
* Fix potential infinite loops on malformed input files.
|
||||||
|
* Add string metadata read/write for CAF and RF64.
|
||||||
|
* Add handling of CUE chunks.
|
||||||
|
* Fix endian-ness issues in PAF files.
|
||||||
|
* Minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.26 (2015-11-22)
|
||||||
|
* Fix for CVE-2014-9496, SD2 buffer read overflow.
|
||||||
|
* Fix for CVE-2014-9756, file_io.c divide by zero.
|
||||||
|
* Fix for CVE-2015-7805, AIFF heap write overflow.
|
||||||
|
* Add support for ALAC encoder in a CAF container.
|
||||||
|
* Add support for Cart chunks in WAV files.
|
||||||
|
* Minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.25 (2011-07-13)
|
||||||
|
* Fix for Secunia Advisory SA45125, heap overflow in PAF file handler.
|
||||||
|
* Accept broken WAV files with blockalign == 0.
|
||||||
|
* Minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.24 (2011-03-23)
|
||||||
|
* WAV files now have an 18 byte u-law and A-law fmt chunk.
|
||||||
|
* Document virtual I/O functionality.
|
||||||
|
* Two new methods rawHandle() and takeOwnership() in sndfile.hh.
|
||||||
|
* AIFF fix for non-zero offset value in SSND chunk.
|
||||||
|
* Minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.23 (2010-10-10)
|
||||||
|
* Add version metadata to Windows DLL.
|
||||||
|
* Add a missing 'inline' to sndfile.hh.
|
||||||
|
* Update docs.
|
||||||
|
* Minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.22 (2010-10-04)
|
||||||
|
* Couple of fixes for SDS file writer.
|
||||||
|
* Fixes arising from static analysis.
|
||||||
|
* Handle FLAC files with ID3 meta data at start of file.
|
||||||
|
* Handle FLAC files which report zero length.
|
||||||
|
* Other minor bug fixes and improvements.
|
||||||
|
|
||||||
|
Version 1.0.21 (2009-12-13)
|
||||||
|
* Add a couple of new binary programs to programs/ dir.
|
||||||
|
* Remove sndfile-jackplay (now in sndfile-tools package).
|
||||||
|
* Add windows only function sf_wchar_open().
|
||||||
|
* Bunch of minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.20 (2009-05-14)
|
||||||
|
* Fix potential heap overflow in VOC file parser (Tobias Klein, http://www.trapkit.de/).
|
||||||
|
|
||||||
|
Version 1.0.19 (2009-03-02)
|
||||||
|
* Fix for CVE-2009-0186 (Alin Rad Pop, Secunia Research).
|
||||||
|
* Huge number of minor bug fixes as a result of static analysis.
|
||||||
|
|
||||||
|
Version 1.0.18 (2009-02-07)
|
||||||
|
* Add Ogg/Vorbis support (thanks to John ffitch).
|
||||||
|
* Remove captive FLAC library.
|
||||||
|
* Many new features and bug fixes.
|
||||||
|
* Generate Win32 and Win64 pre-compiled binaries.
|
||||||
|
|
||||||
|
Version 1.0.17 (2006-08-31)
|
||||||
|
* Add sndfile.hh C++ wrapper.
|
||||||
|
* Update Win32 MinGW build instructions.
|
||||||
|
* Minor bug fixes and cleanups.
|
||||||
|
|
||||||
|
Version 1.0.16 (2006-04-30)
|
||||||
|
* Add support for Broadcast (BEXT) chunks in WAV files.
|
||||||
|
* Implement new commands SFC_GET_SIGNAL_MAX and SFC_GET_MAX_ALL_CHANNELS.
|
||||||
|
* Add support for RIFX (big endian WAV variant).
|
||||||
|
* Fix configure script bugs.
|
||||||
|
* Fix bug in INST and MARK chunk writing for AIFF files.
|
||||||
|
|
||||||
|
Version 1.0.15 (2006-03-16)
|
||||||
|
* Fix some ia64 issues.
|
||||||
|
* Fix precompiled DLL.
|
||||||
|
* Minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.14 (2006-02-19)
|
||||||
|
* Really fix MinGW compile problems.
|
||||||
|
* Minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.13 (2006-01-21)
|
||||||
|
* Fix for MinGW compiler problems.
|
||||||
|
* Allow readin/write of instrument chunks from WAV and AIFF files.
|
||||||
|
* Compile problem fix for Solaris compiler.
|
||||||
|
* Minor cleanups and bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.12 (2005-09-30)
|
||||||
|
* Add support for FLAC and Apple's Core Audio Format (CAF).
|
||||||
|
* Add virtual I/O interface (still needs docs).
|
||||||
|
* Cygwin and other Win32 fixes.
|
||||||
|
* Minor bug fixes and cleanups.
|
||||||
|
|
||||||
|
Version 1.0.11 (2004-11-15)
|
||||||
|
* Add support for SD2 files.
|
||||||
|
* Add read support for loop info in WAV and AIFF files.
|
||||||
|
* Add more tests.
|
||||||
|
* Improve type safety.
|
||||||
|
* Minor optimisations and bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.10 (2004-06-15)
|
||||||
|
* Fix AIFF read/write mode bugs.
|
||||||
|
* Add support for compiling Win32 DLLS using MinGW.
|
||||||
|
* Fix problems resulting in failed compiles with gcc-2.95.
|
||||||
|
* Improve test suite.
|
||||||
|
* Minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.9 (2004-03-30)
|
||||||
|
* Add handling of AVR (Audio Visual Research) files.
|
||||||
|
* Improve handling of WAVEFORMATEXTENSIBLE WAV files.
|
||||||
|
* Fix for using pipes on Win32.
|
||||||
|
|
||||||
|
Version 1.0.8 (2004-03-14)
|
||||||
|
* Correct peak chunk handing for files with > 16 tracks.
|
||||||
|
* Fix for WAV files with huge number of CUE chunks.
|
||||||
|
|
||||||
|
Version 1.0.7 (2004-02-25)
|
||||||
|
* Fix clip mode detection on ia64, MIPS and other CPUs.
|
||||||
|
* Fix two MacOSX build problems.
|
||||||
|
|
||||||
|
Version 1.0.6 (2004-02-08)
|
||||||
|
* Added support for native Win32 file access API (Ross Bencina).
|
||||||
|
* New mode to add clippling then a converting from float/double to integer
|
||||||
|
would otherwise wrap around.
|
||||||
|
* Fixed a bug in reading/writing files > 2Gig on Linux, Solaris and others.
|
||||||
|
* Many minor bug fixes.
|
||||||
|
* Other random fixes for Win32.
|
||||||
|
|
||||||
|
Version 1.0.5 (2003-05-03)
|
||||||
|
* Added support for HTK files.
|
||||||
|
* Added new function sf_open_fd() to allow for secure opening of temporary
|
||||||
|
files as well as reading/writing sound files embedded within larger
|
||||||
|
container files.
|
||||||
|
* Added string support for AIFF files.
|
||||||
|
* Minor bug fixes and code cleanups.
|
||||||
|
|
||||||
|
Version 1.0.4 (2003-02-02)
|
||||||
|
* Added suport of PVF and XI files.
|
||||||
|
* Added functionality for setting and retreiving strings from sound files.
|
||||||
|
* Minor code cleanups and bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.3 (2002-12-09)
|
||||||
|
* Minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.2 (2002-11-24)
|
||||||
|
* Added support for VOX ADPCM.
|
||||||
|
* Improved error reporting.
|
||||||
|
* Added version scripting on Linux and Solaris.
|
||||||
|
* Minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.1 (2002-09-14)
|
||||||
|
* Added MAT and MAT5 file formats.
|
||||||
|
* Minor bug fixes.
|
||||||
|
|
||||||
|
Version 1.0.0 (2002-08-16)
|
||||||
|
* Final release for 1.0.0.
|
||||||
|
|
||||||
|
Version 1.0.0rc6 (2002-08-14)
|
||||||
|
* Release candidate 6 for the 1.0.0 series.
|
||||||
|
* MacOS9 fixes.
|
||||||
|
|
||||||
|
Version 1.0.0rc5 (2002-08-10)
|
||||||
|
* Release candidate 5 for the 1.0.0 series.
|
||||||
|
* Changed the definition of sf_count_t which was causing problems when
|
||||||
|
libsndfile was compiled with other libraries (ie WxWindows).
|
||||||
|
* Minor bug fixes.
|
||||||
|
* Documentation cleanup.
|
||||||
|
|
||||||
|
Version 1.0.0rc4 (2002-08-03)
|
||||||
|
* Release candidate 4 for the 1.0.0 series.
|
||||||
|
* Minor bug fixes.
|
||||||
|
* Fix broken Win32 "make check".
|
||||||
|
|
||||||
|
Version 1.0.0rc3 (2002-08-02)
|
||||||
|
* Release candidate 3 for the 1.0.0 series.
|
||||||
|
* Fix bug where libsndfile was reading beyond the end of the data chunk.
|
||||||
|
* Added on-the-fly header updates on write.
|
||||||
|
* Fix a couple of documentation issues.
|
||||||
|
|
||||||
|
Version 1.0.0rc2 (2002-06-24)
|
||||||
|
* Release candidate 2 for the 1.0.0 series.
|
||||||
|
* Fix compile problem for Win32.
|
||||||
|
|
||||||
|
Version 1.0.0rc1 (2002-06-24)
|
||||||
|
* Release candidate 1 for the 1.0.0 series.
|
||||||
|
|
||||||
|
Version 0.0.28 (2002-04-27)
|
||||||
|
* Last offical release of 0.0.X series of the library.
|
||||||
|
|
||||||
|
Version 0.0.8 (1999-02-16)
|
||||||
|
* First offical release.
|
BIN
libsndfile/dist/libsndfile-1.dll
vendored
Normal file
BIN
libsndfile/dist/libsndfile-1.dll
vendored
Normal file
Binary file not shown.
857
libsndfile/include/sndfile.h
Normal file
857
libsndfile/include/sndfile.h
Normal file
|
@ -0,0 +1,857 @@
|
||||||
|
/*
|
||||||
|
** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||||
|
**
|
||||||
|
** This program is free software; you can redistribute it and/or modify
|
||||||
|
** it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
** the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
** (at your option) any later version.
|
||||||
|
**
|
||||||
|
** This program is distributed in the hope that it will be useful,
|
||||||
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
** GNU Lesser General Public License for more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU Lesser General Public License
|
||||||
|
** along with this program; if not, write to the Free Software
|
||||||
|
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** sndfile.h -- system-wide definitions
|
||||||
|
**
|
||||||
|
** API documentation is in the doc/ directory of the source code tarball
|
||||||
|
** and at http://www.mega-nerd.com/libsndfile/api.html.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SNDFILE_H
|
||||||
|
#define SNDFILE_H
|
||||||
|
|
||||||
|
/* This is the version 1.0.X header file. */
|
||||||
|
#define SNDFILE_1
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* The following file types can be read and written.
|
||||||
|
** A file type would consist of a major type (ie SF_FORMAT_WAV) bitwise
|
||||||
|
** ORed with a minor type (ie SF_FORMAT_PCM). SF_FORMAT_TYPEMASK and
|
||||||
|
** SF_FORMAT_SUBMASK can be used to separate the major and minor file
|
||||||
|
** types.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ /* Major formats. */
|
||||||
|
SF_FORMAT_WAV = 0x010000, /* Microsoft WAV format (little endian default). */
|
||||||
|
SF_FORMAT_AIFF = 0x020000, /* Apple/SGI AIFF format (big endian). */
|
||||||
|
SF_FORMAT_AU = 0x030000, /* Sun/NeXT AU format (big endian). */
|
||||||
|
SF_FORMAT_RAW = 0x040000, /* RAW PCM data. */
|
||||||
|
SF_FORMAT_PAF = 0x050000, /* Ensoniq PARIS file format. */
|
||||||
|
SF_FORMAT_SVX = 0x060000, /* Amiga IFF / SVX8 / SV16 format. */
|
||||||
|
SF_FORMAT_NIST = 0x070000, /* Sphere NIST format. */
|
||||||
|
SF_FORMAT_VOC = 0x080000, /* VOC files. */
|
||||||
|
SF_FORMAT_IRCAM = 0x0A0000, /* Berkeley/IRCAM/CARL */
|
||||||
|
SF_FORMAT_W64 = 0x0B0000, /* Sonic Foundry's 64 bit RIFF/WAV */
|
||||||
|
SF_FORMAT_MAT4 = 0x0C0000, /* Matlab (tm) V4.2 / GNU Octave 2.0 */
|
||||||
|
SF_FORMAT_MAT5 = 0x0D0000, /* Matlab (tm) V5.0 / GNU Octave 2.1 */
|
||||||
|
SF_FORMAT_PVF = 0x0E0000, /* Portable Voice Format */
|
||||||
|
SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */
|
||||||
|
SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */
|
||||||
|
SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
|
||||||
|
SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */
|
||||||
|
SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */
|
||||||
|
SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */
|
||||||
|
SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */
|
||||||
|
SF_FORMAT_CAF = 0x180000, /* Core Audio File format */
|
||||||
|
SF_FORMAT_WVE = 0x190000, /* Psion WVE format */
|
||||||
|
SF_FORMAT_OGG = 0x200000, /* Xiph OGG container */
|
||||||
|
SF_FORMAT_MPC2K = 0x210000, /* Akai MPC 2000 sampler */
|
||||||
|
SF_FORMAT_RF64 = 0x220000, /* RF64 WAV file */
|
||||||
|
|
||||||
|
/* Subtypes from here on. */
|
||||||
|
|
||||||
|
SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */
|
||||||
|
SF_FORMAT_PCM_16 = 0x0002, /* Signed 16 bit data */
|
||||||
|
SF_FORMAT_PCM_24 = 0x0003, /* Signed 24 bit data */
|
||||||
|
SF_FORMAT_PCM_32 = 0x0004, /* Signed 32 bit data */
|
||||||
|
|
||||||
|
SF_FORMAT_PCM_U8 = 0x0005, /* Unsigned 8 bit data (WAV and RAW only) */
|
||||||
|
|
||||||
|
SF_FORMAT_FLOAT = 0x0006, /* 32 bit float data */
|
||||||
|
SF_FORMAT_DOUBLE = 0x0007, /* 64 bit float data */
|
||||||
|
|
||||||
|
SF_FORMAT_ULAW = 0x0010, /* U-Law encoded. */
|
||||||
|
SF_FORMAT_ALAW = 0x0011, /* A-Law encoded. */
|
||||||
|
SF_FORMAT_IMA_ADPCM = 0x0012, /* IMA ADPCM. */
|
||||||
|
SF_FORMAT_MS_ADPCM = 0x0013, /* Microsoft ADPCM. */
|
||||||
|
|
||||||
|
SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */
|
||||||
|
SF_FORMAT_VOX_ADPCM = 0x0021, /* OKI / Dialogix ADPCM */
|
||||||
|
|
||||||
|
SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */
|
||||||
|
SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */
|
||||||
|
SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */
|
||||||
|
|
||||||
|
SF_FORMAT_DWVW_12 = 0x0040, /* 12 bit Delta Width Variable Word encoding. */
|
||||||
|
SF_FORMAT_DWVW_16 = 0x0041, /* 16 bit Delta Width Variable Word encoding. */
|
||||||
|
SF_FORMAT_DWVW_24 = 0x0042, /* 24 bit Delta Width Variable Word encoding. */
|
||||||
|
SF_FORMAT_DWVW_N = 0x0043, /* N bit Delta Width Variable Word encoding. */
|
||||||
|
|
||||||
|
SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
|
||||||
|
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
|
||||||
|
|
||||||
|
SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
|
||||||
|
|
||||||
|
SF_FORMAT_ALAC_16 = 0x0070, /* Apple Lossless Audio Codec (16 bit). */
|
||||||
|
SF_FORMAT_ALAC_20 = 0x0071, /* Apple Lossless Audio Codec (20 bit). */
|
||||||
|
SF_FORMAT_ALAC_24 = 0x0072, /* Apple Lossless Audio Codec (24 bit). */
|
||||||
|
SF_FORMAT_ALAC_32 = 0x0073, /* Apple Lossless Audio Codec (32 bit). */
|
||||||
|
|
||||||
|
/* Endian-ness options. */
|
||||||
|
|
||||||
|
SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */
|
||||||
|
SF_ENDIAN_LITTLE = 0x10000000, /* Force little endian-ness. */
|
||||||
|
SF_ENDIAN_BIG = 0x20000000, /* Force big endian-ness. */
|
||||||
|
SF_ENDIAN_CPU = 0x30000000, /* Force CPU endian-ness. */
|
||||||
|
|
||||||
|
SF_FORMAT_SUBMASK = 0x0000FFFF,
|
||||||
|
SF_FORMAT_TYPEMASK = 0x0FFF0000,
|
||||||
|
SF_FORMAT_ENDMASK = 0x30000000
|
||||||
|
} ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The following are the valid command numbers for the sf_command()
|
||||||
|
** interface. The use of these commands is documented in the file
|
||||||
|
** command.html in the doc directory of the source code distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ SFC_GET_LIB_VERSION = 0x1000,
|
||||||
|
SFC_GET_LOG_INFO = 0x1001,
|
||||||
|
SFC_GET_CURRENT_SF_INFO = 0x1002,
|
||||||
|
|
||||||
|
|
||||||
|
SFC_GET_NORM_DOUBLE = 0x1010,
|
||||||
|
SFC_GET_NORM_FLOAT = 0x1011,
|
||||||
|
SFC_SET_NORM_DOUBLE = 0x1012,
|
||||||
|
SFC_SET_NORM_FLOAT = 0x1013,
|
||||||
|
SFC_SET_SCALE_FLOAT_INT_READ = 0x1014,
|
||||||
|
SFC_SET_SCALE_INT_FLOAT_WRITE = 0x1015,
|
||||||
|
|
||||||
|
SFC_GET_SIMPLE_FORMAT_COUNT = 0x1020,
|
||||||
|
SFC_GET_SIMPLE_FORMAT = 0x1021,
|
||||||
|
|
||||||
|
SFC_GET_FORMAT_INFO = 0x1028,
|
||||||
|
|
||||||
|
SFC_GET_FORMAT_MAJOR_COUNT = 0x1030,
|
||||||
|
SFC_GET_FORMAT_MAJOR = 0x1031,
|
||||||
|
SFC_GET_FORMAT_SUBTYPE_COUNT = 0x1032,
|
||||||
|
SFC_GET_FORMAT_SUBTYPE = 0x1033,
|
||||||
|
|
||||||
|
SFC_CALC_SIGNAL_MAX = 0x1040,
|
||||||
|
SFC_CALC_NORM_SIGNAL_MAX = 0x1041,
|
||||||
|
SFC_CALC_MAX_ALL_CHANNELS = 0x1042,
|
||||||
|
SFC_CALC_NORM_MAX_ALL_CHANNELS = 0x1043,
|
||||||
|
SFC_GET_SIGNAL_MAX = 0x1044,
|
||||||
|
SFC_GET_MAX_ALL_CHANNELS = 0x1045,
|
||||||
|
|
||||||
|
SFC_SET_ADD_PEAK_CHUNK = 0x1050,
|
||||||
|
SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,
|
||||||
|
|
||||||
|
SFC_UPDATE_HEADER_NOW = 0x1060,
|
||||||
|
SFC_SET_UPDATE_HEADER_AUTO = 0x1061,
|
||||||
|
|
||||||
|
SFC_FILE_TRUNCATE = 0x1080,
|
||||||
|
|
||||||
|
SFC_SET_RAW_START_OFFSET = 0x1090,
|
||||||
|
|
||||||
|
SFC_SET_DITHER_ON_WRITE = 0x10A0,
|
||||||
|
SFC_SET_DITHER_ON_READ = 0x10A1,
|
||||||
|
|
||||||
|
SFC_GET_DITHER_INFO_COUNT = 0x10A2,
|
||||||
|
SFC_GET_DITHER_INFO = 0x10A3,
|
||||||
|
|
||||||
|
SFC_GET_EMBED_FILE_INFO = 0x10B0,
|
||||||
|
|
||||||
|
SFC_SET_CLIPPING = 0x10C0,
|
||||||
|
SFC_GET_CLIPPING = 0x10C1,
|
||||||
|
|
||||||
|
SFC_GET_CUE_COUNT = 0x10CD,
|
||||||
|
SFC_GET_CUE = 0x10CE,
|
||||||
|
SFC_SET_CUE = 0x10CF,
|
||||||
|
|
||||||
|
SFC_GET_INSTRUMENT = 0x10D0,
|
||||||
|
SFC_SET_INSTRUMENT = 0x10D1,
|
||||||
|
|
||||||
|
SFC_GET_LOOP_INFO = 0x10E0,
|
||||||
|
|
||||||
|
SFC_GET_BROADCAST_INFO = 0x10F0,
|
||||||
|
SFC_SET_BROADCAST_INFO = 0x10F1,
|
||||||
|
|
||||||
|
SFC_GET_CHANNEL_MAP_INFO = 0x1100,
|
||||||
|
SFC_SET_CHANNEL_MAP_INFO = 0x1101,
|
||||||
|
|
||||||
|
SFC_RAW_DATA_NEEDS_ENDSWAP = 0x1110,
|
||||||
|
|
||||||
|
/* Support for Wavex Ambisonics Format */
|
||||||
|
SFC_WAVEX_SET_AMBISONIC = 0x1200,
|
||||||
|
SFC_WAVEX_GET_AMBISONIC = 0x1201,
|
||||||
|
|
||||||
|
/*
|
||||||
|
** RF64 files can be set so that on-close, writable files that have less
|
||||||
|
** than 4GB of data in them are converted to RIFF/WAV, as per EBU
|
||||||
|
** recommendations.
|
||||||
|
*/
|
||||||
|
SFC_RF64_AUTO_DOWNGRADE = 0x1210,
|
||||||
|
|
||||||
|
SFC_SET_VBR_ENCODING_QUALITY = 0x1300,
|
||||||
|
SFC_SET_COMPRESSION_LEVEL = 0x1301,
|
||||||
|
|
||||||
|
/* Cart Chunk support */
|
||||||
|
SFC_SET_CART_INFO = 0x1400,
|
||||||
|
SFC_GET_CART_INFO = 0x1401,
|
||||||
|
|
||||||
|
/* Following commands for testing only. */
|
||||||
|
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
|
||||||
|
|
||||||
|
/*
|
||||||
|
** SFC_SET_ADD_* values are deprecated and will disappear at some
|
||||||
|
** time in the future. They are guaranteed to be here up to and
|
||||||
|
** including version 1.0.8 to avoid breakage of existing software.
|
||||||
|
** They currently do nothing and will continue to do nothing.
|
||||||
|
*/
|
||||||
|
SFC_SET_ADD_DITHER_ON_WRITE = 0x1070,
|
||||||
|
SFC_SET_ADD_DITHER_ON_READ = 0x1071
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** String types that can be set and read from files. Not all file types
|
||||||
|
** support this and even the file types which support one, may not support
|
||||||
|
** all string types.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ SF_STR_TITLE = 0x01,
|
||||||
|
SF_STR_COPYRIGHT = 0x02,
|
||||||
|
SF_STR_SOFTWARE = 0x03,
|
||||||
|
SF_STR_ARTIST = 0x04,
|
||||||
|
SF_STR_COMMENT = 0x05,
|
||||||
|
SF_STR_DATE = 0x06,
|
||||||
|
SF_STR_ALBUM = 0x07,
|
||||||
|
SF_STR_LICENSE = 0x08,
|
||||||
|
SF_STR_TRACKNUMBER = 0x09,
|
||||||
|
SF_STR_GENRE = 0x10
|
||||||
|
} ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Use the following as the start and end index when doing metadata
|
||||||
|
** transcoding.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define SF_STR_FIRST SF_STR_TITLE
|
||||||
|
#define SF_STR_LAST SF_STR_GENRE
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ /* True and false */
|
||||||
|
SF_FALSE = 0,
|
||||||
|
SF_TRUE = 1,
|
||||||
|
|
||||||
|
/* Modes for opening files. */
|
||||||
|
SFM_READ = 0x10,
|
||||||
|
SFM_WRITE = 0x20,
|
||||||
|
SFM_RDWR = 0x30,
|
||||||
|
|
||||||
|
SF_AMBISONIC_NONE = 0x40,
|
||||||
|
SF_AMBISONIC_B_FORMAT = 0x41
|
||||||
|
} ;
|
||||||
|
|
||||||
|
/* Public error values. These are guaranteed to remain unchanged for the duration
|
||||||
|
** of the library major version number.
|
||||||
|
** There are also a large number of private error numbers which are internal to
|
||||||
|
** the library which can change at any time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ SF_ERR_NO_ERROR = 0,
|
||||||
|
SF_ERR_UNRECOGNISED_FORMAT = 1,
|
||||||
|
SF_ERR_SYSTEM = 2,
|
||||||
|
SF_ERR_MALFORMED_FILE = 3,
|
||||||
|
SF_ERR_UNSUPPORTED_ENCODING = 4
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Channel map values (used with SFC_SET/GET_CHANNEL_MAP).
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ SF_CHANNEL_MAP_INVALID = 0,
|
||||||
|
SF_CHANNEL_MAP_MONO = 1,
|
||||||
|
SF_CHANNEL_MAP_LEFT, /* Apple calls this 'Left' */
|
||||||
|
SF_CHANNEL_MAP_RIGHT, /* Apple calls this 'Right' */
|
||||||
|
SF_CHANNEL_MAP_CENTER, /* Apple calls this 'Center' */
|
||||||
|
SF_CHANNEL_MAP_FRONT_LEFT,
|
||||||
|
SF_CHANNEL_MAP_FRONT_RIGHT,
|
||||||
|
SF_CHANNEL_MAP_FRONT_CENTER,
|
||||||
|
SF_CHANNEL_MAP_REAR_CENTER, /* Apple calls this 'Center Surround', Msft calls this 'Back Center' */
|
||||||
|
SF_CHANNEL_MAP_REAR_LEFT, /* Apple calls this 'Left Surround', Msft calls this 'Back Left' */
|
||||||
|
SF_CHANNEL_MAP_REAR_RIGHT, /* Apple calls this 'Right Surround', Msft calls this 'Back Right' */
|
||||||
|
SF_CHANNEL_MAP_LFE, /* Apple calls this 'LFEScreen', Msft calls this 'Low Frequency' */
|
||||||
|
SF_CHANNEL_MAP_FRONT_LEFT_OF_CENTER, /* Apple calls this 'Left Center' */
|
||||||
|
SF_CHANNEL_MAP_FRONT_RIGHT_OF_CENTER, /* Apple calls this 'Right Center */
|
||||||
|
SF_CHANNEL_MAP_SIDE_LEFT, /* Apple calls this 'Left Surround Direct' */
|
||||||
|
SF_CHANNEL_MAP_SIDE_RIGHT, /* Apple calls this 'Right Surround Direct' */
|
||||||
|
SF_CHANNEL_MAP_TOP_CENTER, /* Apple calls this 'Top Center Surround' */
|
||||||
|
SF_CHANNEL_MAP_TOP_FRONT_LEFT, /* Apple calls this 'Vertical Height Left' */
|
||||||
|
SF_CHANNEL_MAP_TOP_FRONT_RIGHT, /* Apple calls this 'Vertical Height Right' */
|
||||||
|
SF_CHANNEL_MAP_TOP_FRONT_CENTER, /* Apple calls this 'Vertical Height Center' */
|
||||||
|
SF_CHANNEL_MAP_TOP_REAR_LEFT, /* Apple and MS call this 'Top Back Left' */
|
||||||
|
SF_CHANNEL_MAP_TOP_REAR_RIGHT, /* Apple and MS call this 'Top Back Right' */
|
||||||
|
SF_CHANNEL_MAP_TOP_REAR_CENTER, /* Apple and MS call this 'Top Back Center' */
|
||||||
|
|
||||||
|
SF_CHANNEL_MAP_AMBISONIC_B_W,
|
||||||
|
SF_CHANNEL_MAP_AMBISONIC_B_X,
|
||||||
|
SF_CHANNEL_MAP_AMBISONIC_B_Y,
|
||||||
|
SF_CHANNEL_MAP_AMBISONIC_B_Z,
|
||||||
|
|
||||||
|
SF_CHANNEL_MAP_MAX
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
/* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
|
||||||
|
|
||||||
|
typedef struct SNDFILE_tag SNDFILE ;
|
||||||
|
|
||||||
|
/* The following typedef is system specific and is defined when libsndfile is
|
||||||
|
** compiled. sf_count_t will be a 64 bit value when the underlying OS allows
|
||||||
|
** 64 bit file offsets.
|
||||||
|
** On windows, we need to allow the same header file to be compiler by both GCC
|
||||||
|
** and the Microsoft compiler.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if (defined (_MSCVER) || defined (_MSC_VER) && (_MSC_VER < 1310))
|
||||||
|
typedef __int64 sf_count_t ;
|
||||||
|
#define SF_COUNT_MAX 0x7fffffffffffffffi64
|
||||||
|
#else
|
||||||
|
typedef __int64 sf_count_t ;
|
||||||
|
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* A pointer to a SF_INFO structure is passed to sf_open () and filled in.
|
||||||
|
** On write, the SF_INFO structure is filled in by the user and passed into
|
||||||
|
** sf_open ().
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct SF_INFO
|
||||||
|
{ sf_count_t frames ; /* Used to be called samples. Changed to avoid confusion. */
|
||||||
|
int samplerate ;
|
||||||
|
int channels ;
|
||||||
|
int format ;
|
||||||
|
int sections ;
|
||||||
|
int seekable ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct SF_INFO SF_INFO ;
|
||||||
|
|
||||||
|
/* The SF_FORMAT_INFO struct is used to retrieve information about the sound
|
||||||
|
** file formats libsndfile supports using the sf_command () interface.
|
||||||
|
**
|
||||||
|
** Using this interface will allow applications to support new file formats
|
||||||
|
** and encoding types when libsndfile is upgraded, without requiring
|
||||||
|
** re-compilation of the application.
|
||||||
|
**
|
||||||
|
** Please consult the libsndfile documentation (particularly the information
|
||||||
|
** on the sf_command () interface) for examples of its use.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ int format ;
|
||||||
|
const char *name ;
|
||||||
|
const char *extension ;
|
||||||
|
} SF_FORMAT_INFO ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Enums and typedefs for adding dither on read and write.
|
||||||
|
** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE
|
||||||
|
** and SFC_SET_DITHER_ON_READ.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ SFD_DEFAULT_LEVEL = 0,
|
||||||
|
SFD_CUSTOM_LEVEL = 0x40000000,
|
||||||
|
|
||||||
|
SFD_NO_DITHER = 500,
|
||||||
|
SFD_WHITE = 501,
|
||||||
|
SFD_TRIANGULAR_PDF = 502
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ int type ;
|
||||||
|
double level ;
|
||||||
|
const char *name ;
|
||||||
|
} SF_DITHER_INFO ;
|
||||||
|
|
||||||
|
/* Struct used to retrieve information about a file embedded within a
|
||||||
|
** larger file. See SFC_GET_EMBED_FILE_INFO.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ sf_count_t offset ;
|
||||||
|
sf_count_t length ;
|
||||||
|
} SF_EMBED_FILE_INFO ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Struct used to retrieve cue marker information from a file
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ int32_t indx ;
|
||||||
|
uint32_t position ;
|
||||||
|
int32_t fcc_chunk ;
|
||||||
|
int32_t chunk_start ;
|
||||||
|
int32_t block_start ;
|
||||||
|
uint32_t sample_offset ;
|
||||||
|
char name [256] ;
|
||||||
|
} SF_CUE_POINT ;
|
||||||
|
|
||||||
|
#define SF_CUES_VAR(count) \
|
||||||
|
struct \
|
||||||
|
{ uint32_t cue_count ; \
|
||||||
|
SF_CUE_POINT cue_points [count] ; \
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef SF_CUES_VAR (100) SF_CUES ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Structs used to retrieve music sample information from a file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ /*
|
||||||
|
** The loop mode field in SF_INSTRUMENT will be one of the following.
|
||||||
|
*/
|
||||||
|
SF_LOOP_NONE = 800,
|
||||||
|
SF_LOOP_FORWARD,
|
||||||
|
SF_LOOP_BACKWARD,
|
||||||
|
SF_LOOP_ALTERNATING
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ int gain ;
|
||||||
|
char basenote, detune ;
|
||||||
|
char velocity_lo, velocity_hi ;
|
||||||
|
char key_lo, key_hi ;
|
||||||
|
int loop_count ;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{ int mode ;
|
||||||
|
uint32_t start ;
|
||||||
|
uint32_t end ;
|
||||||
|
uint32_t count ;
|
||||||
|
} loops [16] ; /* make variable in a sensible way */
|
||||||
|
} SF_INSTRUMENT ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Struct used to retrieve loop information from a file.*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
short time_sig_num ; /* any positive integer > 0 */
|
||||||
|
short time_sig_den ; /* any positive power of 2 > 0 */
|
||||||
|
int loop_mode ; /* see SF_LOOP enum */
|
||||||
|
|
||||||
|
int num_beats ; /* this is NOT the amount of quarter notes !!!*/
|
||||||
|
/* a full bar of 4/4 is 4 beats */
|
||||||
|
/* a full bar of 7/8 is 7 beats */
|
||||||
|
|
||||||
|
float bpm ; /* suggestion, as it can be calculated using other fields:*/
|
||||||
|
/* file's length, file's sampleRate and our time_sig_den*/
|
||||||
|
/* -> bpms are always the amount of _quarter notes_ per minute */
|
||||||
|
|
||||||
|
int root_key ; /* MIDI note, or -1 for None */
|
||||||
|
int future [6] ;
|
||||||
|
} SF_LOOP_INFO ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Struct used to retrieve broadcast (EBU) information from a file.
|
||||||
|
** Strongly (!) based on EBU "bext" chunk format used in Broadcast WAVE.
|
||||||
|
*/
|
||||||
|
#define SF_BROADCAST_INFO_VAR(coding_hist_size) \
|
||||||
|
struct \
|
||||||
|
{ char description [256] ; \
|
||||||
|
char originator [32] ; \
|
||||||
|
char originator_reference [32] ; \
|
||||||
|
char origination_date [10] ; \
|
||||||
|
char origination_time [8] ; \
|
||||||
|
uint32_t time_reference_low ; \
|
||||||
|
uint32_t time_reference_high ; \
|
||||||
|
short version ; \
|
||||||
|
char umid [64] ; \
|
||||||
|
char reserved [190] ; \
|
||||||
|
uint32_t coding_history_size ; \
|
||||||
|
char coding_history [coding_hist_size] ; \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SF_BROADCAST_INFO is the above struct with coding_history field of 256 bytes. */
|
||||||
|
typedef SF_BROADCAST_INFO_VAR (256) SF_BROADCAST_INFO ;
|
||||||
|
|
||||||
|
struct SF_CART_TIMER
|
||||||
|
{ char usage [4] ;
|
||||||
|
int32_t value ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct SF_CART_TIMER SF_CART_TIMER ;
|
||||||
|
|
||||||
|
#define SF_CART_INFO_VAR(p_tag_text_size) \
|
||||||
|
struct \
|
||||||
|
{ char version [4] ; \
|
||||||
|
char title [64] ; \
|
||||||
|
char artist [64] ; \
|
||||||
|
char cut_id [64] ; \
|
||||||
|
char client_id [64] ; \
|
||||||
|
char category [64] ; \
|
||||||
|
char classification [64] ; \
|
||||||
|
char out_cue [64] ; \
|
||||||
|
char start_date [10] ; \
|
||||||
|
char start_time [8] ; \
|
||||||
|
char end_date [10] ; \
|
||||||
|
char end_time [8] ; \
|
||||||
|
char producer_app_id [64] ; \
|
||||||
|
char producer_app_version [64] ; \
|
||||||
|
char user_def [64] ; \
|
||||||
|
int32_t level_reference ; \
|
||||||
|
SF_CART_TIMER post_timers [8] ; \
|
||||||
|
char reserved [276] ; \
|
||||||
|
char url [1024] ; \
|
||||||
|
uint32_t tag_text_size ; \
|
||||||
|
char tag_text [p_tag_text_size] ; \
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef SF_CART_INFO_VAR (256) SF_CART_INFO ;
|
||||||
|
|
||||||
|
/* Virtual I/O functionality. */
|
||||||
|
|
||||||
|
typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
|
||||||
|
typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
|
||||||
|
typedef sf_count_t (*sf_vio_read) (void *ptr, sf_count_t count, void *user_data) ;
|
||||||
|
typedef sf_count_t (*sf_vio_write) (const void *ptr, sf_count_t count, void *user_data) ;
|
||||||
|
typedef sf_count_t (*sf_vio_tell) (void *user_data) ;
|
||||||
|
|
||||||
|
struct SF_VIRTUAL_IO
|
||||||
|
{ sf_vio_get_filelen get_filelen ;
|
||||||
|
sf_vio_seek seek ;
|
||||||
|
sf_vio_read read ;
|
||||||
|
sf_vio_write write ;
|
||||||
|
sf_vio_tell tell ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct SF_VIRTUAL_IO SF_VIRTUAL_IO ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Open the specified file for read, write or both. On error, this will
|
||||||
|
** return a NULL pointer. To find the error number, pass a NULL SNDFILE
|
||||||
|
** to sf_strerror ().
|
||||||
|
** All calls to sf_open() should be matched with a call to sf_close().
|
||||||
|
*/
|
||||||
|
|
||||||
|
SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Use the existing file descriptor to create a SNDFILE object. If close_desc
|
||||||
|
** is TRUE, the file descriptor will be closed when sf_close() is called. If
|
||||||
|
** it is FALSE, the descriptor will not be closed.
|
||||||
|
** When passed a descriptor like this, the library will assume that the start
|
||||||
|
** of file header is at the current file offset. This allows sound files within
|
||||||
|
** larger container files to be read and/or written.
|
||||||
|
** On error, this will return a NULL pointer. To find the error number, pass a
|
||||||
|
** NULL SNDFILE to sf_strerror ().
|
||||||
|
** All calls to sf_open_fd() should be matched with a call to sf_close().
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
|
||||||
|
|
||||||
|
SNDFILE* sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* sf_error () returns a error number which can be translated to a text
|
||||||
|
** string using sf_error_number().
|
||||||
|
*/
|
||||||
|
|
||||||
|
int sf_error (SNDFILE *sndfile) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* sf_strerror () returns to the caller a pointer to the current error message for
|
||||||
|
** the given SNDFILE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char* sf_strerror (SNDFILE *sndfile) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* sf_error_number () allows the retrieval of the error string for each internal
|
||||||
|
** error number.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char* sf_error_number (int errnum) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* The following two error functions are deprecated but they will remain in the
|
||||||
|
** library for the foreseeable future. The function sf_strerror() should be used
|
||||||
|
** in their place.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int sf_perror (SNDFILE *sndfile) ;
|
||||||
|
int sf_error_str (SNDFILE *sndfile, char* str, size_t len) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
|
||||||
|
|
||||||
|
int sf_command (SNDFILE *sndfile, int command, void *data, int datasize) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
|
||||||
|
|
||||||
|
int sf_format_check (const SF_INFO *info) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Seek within the waveform data chunk of the SNDFILE. sf_seek () uses
|
||||||
|
** the same values for whence (SEEK_SET, SEEK_CUR and SEEK_END) as
|
||||||
|
** stdio.h function fseek ().
|
||||||
|
** An offset of zero with whence set to SEEK_SET will position the
|
||||||
|
** read / write pointer to the first data sample.
|
||||||
|
** On success sf_seek returns the current position in (multi-channel)
|
||||||
|
** samples from the start of the file.
|
||||||
|
** Please see the libsndfile documentation for moving the read pointer
|
||||||
|
** separately from the write pointer on files open in mode SFM_RDWR.
|
||||||
|
** On error all of these functions return -1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
|
{ SF_SEEK_SET = SEEK_SET,
|
||||||
|
SF_SEEK_CUR = SEEK_CUR,
|
||||||
|
SF_SEEK_END = SEEK_END
|
||||||
|
} ;
|
||||||
|
|
||||||
|
sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Functions for retrieving and setting string data within sound files.
|
||||||
|
** Not all file types support this features; AIFF and WAV do. For both
|
||||||
|
** functions, the str_type parameter must be one of the SF_STR_* values
|
||||||
|
** defined above.
|
||||||
|
** On error, sf_set_string() returns non-zero while sf_get_string()
|
||||||
|
** returns NULL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int sf_set_string (SNDFILE *sndfile, int str_type, const char* str) ;
|
||||||
|
|
||||||
|
const char* sf_get_string (SNDFILE *sndfile, int str_type) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Return the library version string. */
|
||||||
|
|
||||||
|
const char * sf_version_string (void) ;
|
||||||
|
|
||||||
|
/* Return the current byterate at this point in the file. The byte rate in this
|
||||||
|
** case is the number of bytes per second of audio data. For instance, for a
|
||||||
|
** stereo, 18 bit PCM encoded file with an 16kHz sample rate, the byte rate
|
||||||
|
** would be 2 (stereo) * 2 (two bytes per sample) * 16000 => 64000 bytes/sec.
|
||||||
|
** For some file formats the returned value will be accurate and exact, for some
|
||||||
|
** it will be a close approximation, for some it will be the average bitrate for
|
||||||
|
** the whole file and for some it will be a time varying value that was accurate
|
||||||
|
** when the file was most recently read or written.
|
||||||
|
** To get the bitrate, multiple this value by 8.
|
||||||
|
** Returns -1 for unknown.
|
||||||
|
*/
|
||||||
|
int sf_current_byterate (SNDFILE *sndfile) ;
|
||||||
|
|
||||||
|
/* Functions for reading/writing the waveform data of a sound file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sf_count_t sf_read_raw (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
|
||||||
|
sf_count_t sf_write_raw (SNDFILE *sndfile, const void *ptr, sf_count_t bytes) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Functions for reading and writing the data chunk in terms of frames.
|
||||||
|
** The number of items actually read/written = frames * number of channels.
|
||||||
|
** sf_xxxx_raw read/writes the raw data bytes from/to the file
|
||||||
|
** sf_xxxx_short passes data in the native short format
|
||||||
|
** sf_xxxx_int passes data in the native int format
|
||||||
|
** sf_xxxx_float passes data in the native float format
|
||||||
|
** sf_xxxx_double passes data in the native double format
|
||||||
|
** All of these read/write function return number of frames read/written.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sf_count_t sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames) ;
|
||||||
|
|
||||||
|
sf_count_t sf_readf_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t sf_writef_int (SNDFILE *sndfile, const int *ptr, sf_count_t frames) ;
|
||||||
|
|
||||||
|
sf_count_t sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t sf_writef_float (SNDFILE *sndfile, const float *ptr, sf_count_t frames) ;
|
||||||
|
|
||||||
|
sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t sf_writef_double (SNDFILE *sndfile, const double *ptr, sf_count_t frames) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Functions for reading and writing the data chunk in terms of items.
|
||||||
|
** Otherwise similar to above.
|
||||||
|
** All of these read/write function return number of items read/written.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sf_count_t sf_read_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t sf_write_short (SNDFILE *sndfile, const short *ptr, sf_count_t items) ;
|
||||||
|
|
||||||
|
sf_count_t sf_read_int (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t sf_write_int (SNDFILE *sndfile, const int *ptr, sf_count_t items) ;
|
||||||
|
|
||||||
|
sf_count_t sf_read_float (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t sf_write_float (SNDFILE *sndfile, const float *ptr, sf_count_t items) ;
|
||||||
|
|
||||||
|
sf_count_t sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t sf_write_double (SNDFILE *sndfile, const double *ptr, sf_count_t items) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Close the SNDFILE and clean up all memory allocations associated with this
|
||||||
|
** file.
|
||||||
|
** Returns 0 on success, or an error number.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int sf_close (SNDFILE *sndfile) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* If the file is opened SFM_WRITE or SFM_RDWR, call fsync() on the file
|
||||||
|
** to force the writing of data to disk. If the file is opened SFM_READ
|
||||||
|
** no action is taken.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void sf_write_sync (SNDFILE *sndfile) ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* The function sf_wchar_open() is Windows Only!
|
||||||
|
** Open a file passing in a Windows Unicode filename. Otherwise, this is
|
||||||
|
** the same as sf_open().
|
||||||
|
**
|
||||||
|
** In order for this to work, you need to do the following:
|
||||||
|
**
|
||||||
|
** #include <windows.h>
|
||||||
|
** #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
|
||||||
|
** #including <sndfile.h>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if (defined (ENABLE_SNDFILE_WINDOWS_PROTOTYPES) && ENABLE_SNDFILE_WINDOWS_PROTOTYPES)
|
||||||
|
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Getting and setting of chunks from within a sound file.
|
||||||
|
**
|
||||||
|
** These functions allow the getting and setting of chunks within a sound file
|
||||||
|
** (for those formats which allow it).
|
||||||
|
**
|
||||||
|
** These functions fail safely. Specifically, they will not allow you to overwrite
|
||||||
|
** existing chunks or add extra versions of format specific reserved chunks but
|
||||||
|
** should allow you to retrieve any and all chunks (may not be implemented for
|
||||||
|
** all chunks or all file formats).
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct SF_CHUNK_INFO
|
||||||
|
{ char id [64] ; /* The chunk identifier. */
|
||||||
|
unsigned id_size ; /* The size of the chunk identifier. */
|
||||||
|
unsigned datalen ; /* The size of that data. */
|
||||||
|
void *data ; /* Pointer to the data. */
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct SF_CHUNK_INFO SF_CHUNK_INFO ;
|
||||||
|
|
||||||
|
/* Set the specified chunk info (must be done before any audio data is written
|
||||||
|
** to the file). This will fail for format specific reserved chunks.
|
||||||
|
** The chunk_info->data pointer must be valid until the file is closed.
|
||||||
|
** Returns SF_ERR_NO_ERROR on success or non-zero on failure.
|
||||||
|
*/
|
||||||
|
int sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** An opaque structure to an iterator over the all chunks of a given id
|
||||||
|
*/
|
||||||
|
typedef struct SF_CHUNK_ITERATOR SF_CHUNK_ITERATOR ;
|
||||||
|
|
||||||
|
/* Get an iterator for all chunks matching chunk_info.
|
||||||
|
** The iterator will point to the first chunk matching chunk_info.
|
||||||
|
** Chunks are matching, if (chunk_info->id) matches the first
|
||||||
|
** (chunk_info->id_size) bytes of a chunk found in the SNDFILE* handle.
|
||||||
|
** If chunk_info is NULL, an iterator to all chunks in the SNDFILE* handle
|
||||||
|
** is returned.
|
||||||
|
** The values of chunk_info->datalen and chunk_info->data are ignored.
|
||||||
|
** If no matching chunks are found in the sndfile, NULL is returned.
|
||||||
|
** The returned iterator will stay valid until one of the following occurs:
|
||||||
|
** a) The sndfile is closed.
|
||||||
|
** b) A new chunk is added using sf_set_chunk().
|
||||||
|
** c) Another chunk iterator function is called on the same SNDFILE* handle
|
||||||
|
** that causes the iterator to be modified.
|
||||||
|
** The memory for the iterator belongs to the SNDFILE* handle and is freed when
|
||||||
|
** sf_close() is called.
|
||||||
|
*/
|
||||||
|
SF_CHUNK_ITERATOR *
|
||||||
|
sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
|
||||||
|
|
||||||
|
/* Iterate through chunks by incrementing the iterator.
|
||||||
|
** Increments the iterator and returns a handle to the new one.
|
||||||
|
** After this call, iterator will no longer be valid, and you must use the
|
||||||
|
** newly returned handle from now on.
|
||||||
|
** The returned handle can be used to access the next chunk matching
|
||||||
|
** the criteria as defined in sf_get_chunk_iterator().
|
||||||
|
** If iterator points to the last chunk, this will free all resources
|
||||||
|
** associated with iterator and return NULL.
|
||||||
|
** The returned iterator will stay valid until sf_get_chunk_iterator_next
|
||||||
|
** is called again, the sndfile is closed or a new chunk us added.
|
||||||
|
*/
|
||||||
|
SF_CHUNK_ITERATOR *
|
||||||
|
sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator) ;
|
||||||
|
|
||||||
|
|
||||||
|
/* Get the size of the specified chunk.
|
||||||
|
** If the specified chunk exists, the size will be returned in the
|
||||||
|
** datalen field of the SF_CHUNK_INFO struct.
|
||||||
|
** Additionally, the id of the chunk will be copied to the id
|
||||||
|
** field of the SF_CHUNK_INFO struct and it's id_size field will
|
||||||
|
** be updated accordingly.
|
||||||
|
** If the chunk doesn't exist chunk_info->datalen will be zero, and the
|
||||||
|
** id and id_size fields will be undefined.
|
||||||
|
** The function will return SF_ERR_NO_ERROR on success or non-zero on
|
||||||
|
** failure.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
sf_get_chunk_size (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
|
||||||
|
|
||||||
|
/* Get the specified chunk data.
|
||||||
|
** If the specified chunk exists, up to chunk_info->datalen bytes of
|
||||||
|
** the chunk data will be copied into the chunk_info->data buffer
|
||||||
|
** (allocated by the caller) and the chunk_info->datalen field
|
||||||
|
** updated to reflect the size of the data. The id and id_size
|
||||||
|
** field will be updated according to the retrieved chunk
|
||||||
|
** If the chunk doesn't exist chunk_info->datalen will be zero, and the
|
||||||
|
** id and id_size fields will be undefined.
|
||||||
|
** The function will return SF_ERR_NO_ERROR on success or non-zero on
|
||||||
|
** failure.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
sf_get_chunk_data (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* SNDFILE_H */
|
||||||
|
|
446
libsndfile/include/sndfile.hh
Normal file
446
libsndfile/include/sndfile.hh
Normal file
|
@ -0,0 +1,446 @@
|
||||||
|
/*
|
||||||
|
** Copyright (C) 2005-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||||
|
**
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are
|
||||||
|
** met:
|
||||||
|
**
|
||||||
|
** * Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in
|
||||||
|
** the documentation and/or other materials provided with the
|
||||||
|
** distribution.
|
||||||
|
** * Neither the author nor the names of any contributors may be used
|
||||||
|
** to endorse or promote products derived from this software without
|
||||||
|
** specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The above modified BSD style license (GPL and LGPL compatible) applies to
|
||||||
|
** this file. It does not apply to libsndfile itself which is released under
|
||||||
|
** the GNU LGPL or the libsndfile test suite which is released under the GNU
|
||||||
|
** GPL.
|
||||||
|
** This means that this header file can be used under this modified BSD style
|
||||||
|
** license, but the LGPL still holds for the libsndfile library itself.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** sndfile.hh -- A lightweight C++ wrapper for the libsndfile API.
|
||||||
|
**
|
||||||
|
** All the methods are inlines and all functionality is contained in this
|
||||||
|
** file. There is no separate implementation file.
|
||||||
|
**
|
||||||
|
** API documentation is in the doc/ directory of the source code tarball
|
||||||
|
** and at http://www.mega-nerd.com/libsndfile/api.html.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SNDFILE_HH
|
||||||
|
#define SNDFILE_HH
|
||||||
|
|
||||||
|
#include <sndfile.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <new> // for std::nothrow
|
||||||
|
|
||||||
|
class SndfileHandle
|
||||||
|
{ private :
|
||||||
|
struct SNDFILE_ref
|
||||||
|
{ SNDFILE_ref (void) ;
|
||||||
|
~SNDFILE_ref (void) ;
|
||||||
|
|
||||||
|
SNDFILE *sf ;
|
||||||
|
SF_INFO sfinfo ;
|
||||||
|
int ref ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SNDFILE_ref *p ;
|
||||||
|
|
||||||
|
public :
|
||||||
|
/* Default constructor */
|
||||||
|
SndfileHandle (void) : p (NULL) {} ;
|
||||||
|
SndfileHandle (const char *path, int mode = SFM_READ,
|
||||||
|
int format = 0, int channels = 0, int samplerate = 0) ;
|
||||||
|
SndfileHandle (std::string const & path, int mode = SFM_READ,
|
||||||
|
int format = 0, int channels = 0, int samplerate = 0) ;
|
||||||
|
SndfileHandle (int fd, bool close_desc, int mode = SFM_READ,
|
||||||
|
int format = 0, int channels = 0, int samplerate = 0) ;
|
||||||
|
SndfileHandle (SF_VIRTUAL_IO &sfvirtual, void *user_data, int mode = SFM_READ,
|
||||||
|
int format = 0, int channels = 0, int samplerate = 0) ;
|
||||||
|
|
||||||
|
#ifdef ENABLE_SNDFILE_WINDOWS_PROTOTYPES
|
||||||
|
SndfileHandle (LPCWSTR wpath, int mode = SFM_READ,
|
||||||
|
int format = 0, int channels = 0, int samplerate = 0) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
~SndfileHandle (void) ;
|
||||||
|
|
||||||
|
SndfileHandle (const SndfileHandle &orig) ;
|
||||||
|
SndfileHandle & operator = (const SndfileHandle &rhs) ;
|
||||||
|
|
||||||
|
/* Mainly for debugging/testing. */
|
||||||
|
int refCount (void) const { return (p == NULL) ? 0 : p->ref ; }
|
||||||
|
|
||||||
|
operator bool () const { return (p != NULL) ; }
|
||||||
|
|
||||||
|
bool operator == (const SndfileHandle &rhs) const { return (p == rhs.p) ; }
|
||||||
|
|
||||||
|
sf_count_t frames (void) const { return p ? p->sfinfo.frames : 0 ; }
|
||||||
|
int format (void) const { return p ? p->sfinfo.format : 0 ; }
|
||||||
|
int channels (void) const { return p ? p->sfinfo.channels : 0 ; }
|
||||||
|
int samplerate (void) const { return p ? p->sfinfo.samplerate : 0 ; }
|
||||||
|
|
||||||
|
int error (void) const ;
|
||||||
|
const char * strError (void) const ;
|
||||||
|
|
||||||
|
int command (int cmd, void *data, int datasize) ;
|
||||||
|
|
||||||
|
sf_count_t seek (sf_count_t frames, int whence) ;
|
||||||
|
|
||||||
|
void writeSync (void) ;
|
||||||
|
|
||||||
|
int setString (int str_type, const char* str) ;
|
||||||
|
|
||||||
|
const char* getString (int str_type) const ;
|
||||||
|
|
||||||
|
static int formatCheck (int format, int channels, int samplerate) ;
|
||||||
|
|
||||||
|
sf_count_t read (short *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t read (int *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t read (float *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t read (double *ptr, sf_count_t items) ;
|
||||||
|
|
||||||
|
sf_count_t write (const short *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t write (const int *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t write (const float *ptr, sf_count_t items) ;
|
||||||
|
sf_count_t write (const double *ptr, sf_count_t items) ;
|
||||||
|
|
||||||
|
sf_count_t readf (short *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t readf (int *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t readf (float *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t readf (double *ptr, sf_count_t frames) ;
|
||||||
|
|
||||||
|
sf_count_t writef (const short *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t writef (const int *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t writef (const float *ptr, sf_count_t frames) ;
|
||||||
|
sf_count_t writef (const double *ptr, sf_count_t frames) ;
|
||||||
|
|
||||||
|
sf_count_t readRaw (void *ptr, sf_count_t bytes) ;
|
||||||
|
sf_count_t writeRaw (const void *ptr, sf_count_t bytes) ;
|
||||||
|
|
||||||
|
/**< Raw access to the handle. SndfileHandle keeps ownership. */
|
||||||
|
SNDFILE * rawHandle (void) ;
|
||||||
|
|
||||||
|
/**< Take ownership of handle, if reference count is 1. */
|
||||||
|
SNDFILE * takeOwnership (void) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
/*==============================================================================
|
||||||
|
** Nothing but implementation below.
|
||||||
|
*/
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SNDFILE_ref::SNDFILE_ref (void)
|
||||||
|
: sf (NULL), sfinfo (), ref (1)
|
||||||
|
{}
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SNDFILE_ref::~SNDFILE_ref (void)
|
||||||
|
{ if (sf != NULL) sf_close (sf) ; }
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SndfileHandle (const char *path, int mode, int fmt, int chans, int srate)
|
||||||
|
: p (NULL)
|
||||||
|
{
|
||||||
|
p = new (std::nothrow) SNDFILE_ref () ;
|
||||||
|
|
||||||
|
if (p != NULL)
|
||||||
|
{ p->ref = 1 ;
|
||||||
|
|
||||||
|
p->sfinfo.frames = 0 ;
|
||||||
|
p->sfinfo.channels = chans ;
|
||||||
|
p->sfinfo.format = fmt ;
|
||||||
|
p->sfinfo.samplerate = srate ;
|
||||||
|
p->sfinfo.sections = 0 ;
|
||||||
|
p->sfinfo.seekable = 0 ;
|
||||||
|
|
||||||
|
p->sf = sf_open (path, mode, &p->sfinfo) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return ;
|
||||||
|
} /* SndfileHandle const char * constructor */
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SndfileHandle (std::string const & path, int mode, int fmt, int chans, int srate)
|
||||||
|
: p (NULL)
|
||||||
|
{
|
||||||
|
p = new (std::nothrow) SNDFILE_ref () ;
|
||||||
|
|
||||||
|
if (p != NULL)
|
||||||
|
{ p->ref = 1 ;
|
||||||
|
|
||||||
|
p->sfinfo.frames = 0 ;
|
||||||
|
p->sfinfo.channels = chans ;
|
||||||
|
p->sfinfo.format = fmt ;
|
||||||
|
p->sfinfo.samplerate = srate ;
|
||||||
|
p->sfinfo.sections = 0 ;
|
||||||
|
p->sfinfo.seekable = 0 ;
|
||||||
|
|
||||||
|
p->sf = sf_open (path.c_str (), mode, &p->sfinfo) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return ;
|
||||||
|
} /* SndfileHandle std::string constructor */
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SndfileHandle (int fd, bool close_desc, int mode, int fmt, int chans, int srate)
|
||||||
|
: p (NULL)
|
||||||
|
{
|
||||||
|
if (fd < 0)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
p = new (std::nothrow) SNDFILE_ref () ;
|
||||||
|
|
||||||
|
if (p != NULL)
|
||||||
|
{ p->ref = 1 ;
|
||||||
|
|
||||||
|
p->sfinfo.frames = 0 ;
|
||||||
|
p->sfinfo.channels = chans ;
|
||||||
|
p->sfinfo.format = fmt ;
|
||||||
|
p->sfinfo.samplerate = srate ;
|
||||||
|
p->sfinfo.sections = 0 ;
|
||||||
|
p->sfinfo.seekable = 0 ;
|
||||||
|
|
||||||
|
p->sf = sf_open_fd (fd, mode, &p->sfinfo, close_desc) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return ;
|
||||||
|
} /* SndfileHandle fd constructor */
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SndfileHandle (SF_VIRTUAL_IO &sfvirtual, void *user_data, int mode, int fmt, int chans, int srate)
|
||||||
|
: p (NULL)
|
||||||
|
{
|
||||||
|
p = new (std::nothrow) SNDFILE_ref () ;
|
||||||
|
|
||||||
|
if (p != NULL)
|
||||||
|
{ p->ref = 1 ;
|
||||||
|
|
||||||
|
p->sfinfo.frames = 0 ;
|
||||||
|
p->sfinfo.channels = chans ;
|
||||||
|
p->sfinfo.format = fmt ;
|
||||||
|
p->sfinfo.samplerate = srate ;
|
||||||
|
p->sfinfo.sections = 0 ;
|
||||||
|
p->sfinfo.seekable = 0 ;
|
||||||
|
|
||||||
|
p->sf = sf_open_virtual (&sfvirtual, mode, &p->sfinfo, user_data) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return ;
|
||||||
|
} /* SndfileHandle std::string constructor */
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::~SndfileHandle (void)
|
||||||
|
{ if (p != NULL && --p->ref == 0)
|
||||||
|
delete p ;
|
||||||
|
} /* SndfileHandle destructor */
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SndfileHandle (const SndfileHandle &orig)
|
||||||
|
: p (orig.p)
|
||||||
|
{ if (p != NULL)
|
||||||
|
++p->ref ;
|
||||||
|
} /* SndfileHandle copy constructor */
|
||||||
|
|
||||||
|
inline SndfileHandle &
|
||||||
|
SndfileHandle::operator = (const SndfileHandle &rhs)
|
||||||
|
{
|
||||||
|
if (&rhs == this)
|
||||||
|
return *this ;
|
||||||
|
if (p != NULL && --p->ref == 0)
|
||||||
|
delete p ;
|
||||||
|
|
||||||
|
p = rhs.p ;
|
||||||
|
if (p != NULL)
|
||||||
|
++p->ref ;
|
||||||
|
|
||||||
|
return *this ;
|
||||||
|
} /* SndfileHandle assignment operator */
|
||||||
|
|
||||||
|
inline int
|
||||||
|
SndfileHandle::error (void) const
|
||||||
|
{ return sf_error (p->sf) ; }
|
||||||
|
|
||||||
|
inline const char *
|
||||||
|
SndfileHandle::strError (void) const
|
||||||
|
{ return sf_strerror (p->sf) ; }
|
||||||
|
|
||||||
|
inline int
|
||||||
|
SndfileHandle::command (int cmd, void *data, int datasize)
|
||||||
|
{ return sf_command (p->sf, cmd, data, datasize) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::seek (sf_count_t frame_count, int whence)
|
||||||
|
{ return sf_seek (p->sf, frame_count, whence) ; }
|
||||||
|
|
||||||
|
inline void
|
||||||
|
SndfileHandle::writeSync (void)
|
||||||
|
{ sf_write_sync (p->sf) ; }
|
||||||
|
|
||||||
|
inline int
|
||||||
|
SndfileHandle::setString (int str_type, const char* str)
|
||||||
|
{ return sf_set_string (p->sf, str_type, str) ; }
|
||||||
|
|
||||||
|
inline const char*
|
||||||
|
SndfileHandle::getString (int str_type) const
|
||||||
|
{ return sf_get_string (p->sf, str_type) ; }
|
||||||
|
|
||||||
|
inline int
|
||||||
|
SndfileHandle::formatCheck (int fmt, int chans, int srate)
|
||||||
|
{
|
||||||
|
SF_INFO sfinfo ;
|
||||||
|
|
||||||
|
sfinfo.frames = 0 ;
|
||||||
|
sfinfo.channels = chans ;
|
||||||
|
sfinfo.format = fmt ;
|
||||||
|
sfinfo.samplerate = srate ;
|
||||||
|
sfinfo.sections = 0 ;
|
||||||
|
sfinfo.seekable = 0 ;
|
||||||
|
|
||||||
|
return sf_format_check (&sfinfo) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::read (short *ptr, sf_count_t items)
|
||||||
|
{ return sf_read_short (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::read (int *ptr, sf_count_t items)
|
||||||
|
{ return sf_read_int (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::read (float *ptr, sf_count_t items)
|
||||||
|
{ return sf_read_float (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::read (double *ptr, sf_count_t items)
|
||||||
|
{ return sf_read_double (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::write (const short *ptr, sf_count_t items)
|
||||||
|
{ return sf_write_short (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::write (const int *ptr, sf_count_t items)
|
||||||
|
{ return sf_write_int (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::write (const float *ptr, sf_count_t items)
|
||||||
|
{ return sf_write_float (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::write (const double *ptr, sf_count_t items)
|
||||||
|
{ return sf_write_double (p->sf, ptr, items) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::readf (short *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_readf_short (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::readf (int *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_readf_int (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::readf (float *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_readf_float (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::readf (double *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_readf_double (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::writef (const short *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_writef_short (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::writef (const int *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_writef_int (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::writef (const float *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_writef_float (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::writef (const double *ptr, sf_count_t frame_count)
|
||||||
|
{ return sf_writef_double (p->sf, ptr, frame_count) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::readRaw (void *ptr, sf_count_t bytes)
|
||||||
|
{ return sf_read_raw (p->sf, ptr, bytes) ; }
|
||||||
|
|
||||||
|
inline sf_count_t
|
||||||
|
SndfileHandle::writeRaw (const void *ptr, sf_count_t bytes)
|
||||||
|
{ return sf_write_raw (p->sf, ptr, bytes) ; }
|
||||||
|
|
||||||
|
inline SNDFILE *
|
||||||
|
SndfileHandle::rawHandle (void)
|
||||||
|
{ return (p ? p->sf : NULL) ; }
|
||||||
|
|
||||||
|
inline SNDFILE *
|
||||||
|
SndfileHandle::takeOwnership (void)
|
||||||
|
{
|
||||||
|
if (p == NULL || (p->ref != 1))
|
||||||
|
return NULL ;
|
||||||
|
|
||||||
|
SNDFILE * sf = p->sf ;
|
||||||
|
p->sf = NULL ;
|
||||||
|
delete p ;
|
||||||
|
p = NULL ;
|
||||||
|
return sf ;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_SNDFILE_WINDOWS_PROTOTYPES
|
||||||
|
|
||||||
|
inline
|
||||||
|
SndfileHandle::SndfileHandle (LPCWSTR wpath, int mode, int fmt, int chans, int srate)
|
||||||
|
: p (NULL)
|
||||||
|
{
|
||||||
|
p = new (std::nothrow) SNDFILE_ref () ;
|
||||||
|
|
||||||
|
if (p != NULL)
|
||||||
|
{ p->ref = 1 ;
|
||||||
|
|
||||||
|
p->sfinfo.frames = 0 ;
|
||||||
|
p->sfinfo.channels = chans ;
|
||||||
|
p->sfinfo.format = fmt ;
|
||||||
|
p->sfinfo.samplerate = srate ;
|
||||||
|
p->sfinfo.sections = 0 ;
|
||||||
|
p->sfinfo.seekable = 0 ;
|
||||||
|
|
||||||
|
p->sf = sf_wchar_open (wpath, mode, &p->sfinfo) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return ;
|
||||||
|
} /* SndfileHandle const wchar_t * constructor */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SNDFILE_HH */
|
||||||
|
|
47
libsndfile/lib/libsndfile-1.def
Normal file
47
libsndfile/lib/libsndfile-1.def
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
; Auto-generated by create_symbols_file.py
|
||||||
|
|
||||||
|
LIBRARY libsndfile-1.dll
|
||||||
|
EXPORTS
|
||||||
|
|
||||||
|
sf_command @1
|
||||||
|
sf_open @2
|
||||||
|
sf_close @3
|
||||||
|
sf_seek @4
|
||||||
|
sf_error @7
|
||||||
|
sf_perror @8
|
||||||
|
sf_error_str @9
|
||||||
|
sf_error_number @10
|
||||||
|
sf_format_check @11
|
||||||
|
sf_read_raw @16
|
||||||
|
sf_readf_short @17
|
||||||
|
sf_readf_int @18
|
||||||
|
sf_readf_float @19
|
||||||
|
sf_readf_double @20
|
||||||
|
sf_read_short @21
|
||||||
|
sf_read_int @22
|
||||||
|
sf_read_float @23
|
||||||
|
sf_read_double @24
|
||||||
|
sf_write_raw @32
|
||||||
|
sf_writef_short @33
|
||||||
|
sf_writef_int @34
|
||||||
|
sf_writef_float @35
|
||||||
|
sf_writef_double @36
|
||||||
|
sf_write_short @37
|
||||||
|
sf_write_int @38
|
||||||
|
sf_write_float @39
|
||||||
|
sf_write_double @40
|
||||||
|
sf_strerror @50
|
||||||
|
sf_get_string @60
|
||||||
|
sf_set_string @61
|
||||||
|
sf_version_string @68
|
||||||
|
sf_open_fd @70
|
||||||
|
sf_wchar_open @71
|
||||||
|
sf_open_virtual @80
|
||||||
|
sf_write_sync @90
|
||||||
|
sf_set_chunk @100
|
||||||
|
sf_get_chunk_size @101
|
||||||
|
sf_get_chunk_data @102
|
||||||
|
sf_get_chunk_iterator @103
|
||||||
|
sf_next_chunk_iterator @104
|
||||||
|
sf_current_byterate @110
|
||||||
|
|
BIN
libsndfile/lib/libsndfile-1.lib
Normal file
BIN
libsndfile/lib/libsndfile-1.lib
Normal file
Binary file not shown.
12
libsndfile/lib/pkgconfig/sndfile.pc
Normal file
12
libsndfile/lib/pkgconfig/sndfile.pc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
prefix=c:/devel/target/libsndfile
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: sndfile
|
||||||
|
Description: A library for reading and writing audio files
|
||||||
|
Requires:
|
||||||
|
Version: 1.0.28
|
||||||
|
Libs: -L${libdir} -lsndfile
|
||||||
|
Libs.private: Ext/libflac.la Ext/libvorbis.la Ext/libogg.la
|
||||||
|
Cflags: -I${includedir}
|
BIN
mpg123/dist/libmpg123.dll
vendored
Normal file
BIN
mpg123/dist/libmpg123.dll
vendored
Normal file
Binary file not shown.
1034
mpg123/include/mpg123.h
Normal file
1034
mpg123/include/mpg123.h
Normal file
File diff suppressed because it is too large
Load diff
BIN
mpg123/lib/libmpg123.lib
Normal file
BIN
mpg123/lib/libmpg123.lib
Normal file
Binary file not shown.
437
openal-soft/COPYING
Normal file
437
openal-soft/COPYING
Normal file
|
@ -0,0 +1,437 @@
|
||||||
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the library GPL. It is
|
||||||
|
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Library General Public License, applies to some
|
||||||
|
specially designated Free Software Foundation software, and to any
|
||||||
|
other libraries whose authors decide to use it. You can use it for
|
||||||
|
your libraries, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if
|
||||||
|
you distribute copies of the library, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link a program with the library, you must provide
|
||||||
|
complete object files to the recipients so that they can relink them
|
||||||
|
with the library, after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
Our method of protecting your rights has two steps: (1) copyright
|
||||||
|
the library, and (2) offer you this license which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
Also, for each distributor's protection, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
library. If the library is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original
|
||||||
|
version, so that any problems introduced by others will not reflect on
|
||||||
|
the original authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that companies distributing free
|
||||||
|
software will individually obtain patent licenses, thus in effect
|
||||||
|
transforming the program into proprietary software. To prevent this,
|
||||||
|
we have made it clear that any patent must be licensed for everyone's
|
||||||
|
free use or not licensed at all.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the ordinary
|
||||||
|
GNU General Public License, which was designed for utility programs. This
|
||||||
|
license, the GNU Library General Public License, applies to certain
|
||||||
|
designated libraries. This license is quite different from the ordinary
|
||||||
|
one; be sure to read it in full, and don't assume that anything in it is
|
||||||
|
the same as in the ordinary license.
|
||||||
|
|
||||||
|
The reason we have a separate public license for some libraries is that
|
||||||
|
they blur the distinction we usually make between modifying or adding to a
|
||||||
|
program and simply using it. Linking a program with a library, without
|
||||||
|
changing the library, is in some sense simply using the library, and is
|
||||||
|
analogous to running a utility program or application program. However, in
|
||||||
|
a textual and legal sense, the linked executable is a combined work, a
|
||||||
|
derivative of the original library, and the ordinary General Public License
|
||||||
|
treats it as such.
|
||||||
|
|
||||||
|
Because of this blurred distinction, using the ordinary General
|
||||||
|
Public License for libraries did not effectively promote software
|
||||||
|
sharing, because most developers did not use the libraries. We
|
||||||
|
concluded that weaker conditions might promote sharing better.
|
||||||
|
|
||||||
|
However, unrestricted linking of non-free programs would deprive the
|
||||||
|
users of those programs of all benefit from the free status of the
|
||||||
|
libraries themselves. This Library General Public License is intended to
|
||||||
|
permit developers of non-free programs to use free libraries, while
|
||||||
|
preserving your freedom as a user of such programs to change the free
|
||||||
|
libraries that are incorporated in them. (We have not seen how to achieve
|
||||||
|
this as regards changes in header files, but we have achieved it as regards
|
||||||
|
changes in the actual functions of the Library.) The hope is that this
|
||||||
|
will lead to faster development of free libraries.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, while the latter only
|
||||||
|
works together with the library.
|
||||||
|
|
||||||
|
Note that it is possible for a library to be covered by the ordinary
|
||||||
|
General Public License rather than by this special one.
|
||||||
|
|
||||||
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library which
|
||||||
|
contains a notice placed by the copyright holder or other authorized
|
||||||
|
party saying it may be distributed under the terms of this Library
|
||||||
|
General Public License (also called "this License"). Each licensee is
|
||||||
|
addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also compile or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
c) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
d) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the source code distributed need not include anything that is normally
|
||||||
|
distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Library General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
BIN
openal-soft/dist/Win32/OpenAL32.dll
vendored
Normal file
BIN
openal-soft/dist/Win32/OpenAL32.dll
vendored
Normal file
Binary file not shown.
BIN
openal-soft/dist/Win64/OpenAL32.dll
vendored
Normal file
BIN
openal-soft/dist/Win64/OpenAL32.dll
vendored
Normal file
Binary file not shown.
656
openal-soft/include/AL/al.h
Normal file
656
openal-soft/include/AL/al.h
Normal file
|
@ -0,0 +1,656 @@
|
||||||
|
#ifndef AL_AL_H
|
||||||
|
#define AL_AL_H
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_API
|
||||||
|
#if defined(AL_LIBTYPE_STATIC)
|
||||||
|
#define AL_API
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define AL_API __declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define AL_API extern
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#define AL_APIENTRY __cdecl
|
||||||
|
#else
|
||||||
|
#define AL_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** Deprecated macro. */
|
||||||
|
#define OPENAL
|
||||||
|
#define ALAPI AL_API
|
||||||
|
#define ALAPIENTRY AL_APIENTRY
|
||||||
|
#define AL_INVALID (-1)
|
||||||
|
#define AL_ILLEGAL_ENUM AL_INVALID_ENUM
|
||||||
|
#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
|
||||||
|
|
||||||
|
/** Supported AL version. */
|
||||||
|
#define AL_VERSION_1_0
|
||||||
|
#define AL_VERSION_1_1
|
||||||
|
|
||||||
|
/** 8-bit boolean */
|
||||||
|
typedef char ALboolean;
|
||||||
|
|
||||||
|
/** character */
|
||||||
|
typedef char ALchar;
|
||||||
|
|
||||||
|
/** signed 8-bit 2's complement integer */
|
||||||
|
typedef signed char ALbyte;
|
||||||
|
|
||||||
|
/** unsigned 8-bit integer */
|
||||||
|
typedef unsigned char ALubyte;
|
||||||
|
|
||||||
|
/** signed 16-bit 2's complement integer */
|
||||||
|
typedef short ALshort;
|
||||||
|
|
||||||
|
/** unsigned 16-bit integer */
|
||||||
|
typedef unsigned short ALushort;
|
||||||
|
|
||||||
|
/** signed 32-bit 2's complement integer */
|
||||||
|
typedef int ALint;
|
||||||
|
|
||||||
|
/** unsigned 32-bit integer */
|
||||||
|
typedef unsigned int ALuint;
|
||||||
|
|
||||||
|
/** non-negative 32-bit binary integer size */
|
||||||
|
typedef int ALsizei;
|
||||||
|
|
||||||
|
/** enumerated 32-bit value */
|
||||||
|
typedef int ALenum;
|
||||||
|
|
||||||
|
/** 32-bit IEEE754 floating-point */
|
||||||
|
typedef float ALfloat;
|
||||||
|
|
||||||
|
/** 64-bit IEEE754 floating-point */
|
||||||
|
typedef double ALdouble;
|
||||||
|
|
||||||
|
/** void type (for opaque pointers only) */
|
||||||
|
typedef void ALvoid;
|
||||||
|
|
||||||
|
|
||||||
|
/* Enumerant values begin at column 50. No tabs. */
|
||||||
|
|
||||||
|
/** "no distance model" or "no buffer" */
|
||||||
|
#define AL_NONE 0
|
||||||
|
|
||||||
|
/** Boolean False. */
|
||||||
|
#define AL_FALSE 0
|
||||||
|
|
||||||
|
/** Boolean True. */
|
||||||
|
#define AL_TRUE 1
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Relative source.
|
||||||
|
* Type: ALboolean
|
||||||
|
* Range: [AL_TRUE, AL_FALSE]
|
||||||
|
* Default: AL_FALSE
|
||||||
|
*
|
||||||
|
* Specifies if the Source has relative coordinates.
|
||||||
|
*/
|
||||||
|
#define AL_SOURCE_RELATIVE 0x202
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inner cone angle, in degrees.
|
||||||
|
* Type: ALint, ALfloat
|
||||||
|
* Range: [0 - 360]
|
||||||
|
* Default: 360
|
||||||
|
*
|
||||||
|
* The angle covered by the inner cone, where the source will not attenuate.
|
||||||
|
*/
|
||||||
|
#define AL_CONE_INNER_ANGLE 0x1001
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outer cone angle, in degrees.
|
||||||
|
* Range: [0 - 360]
|
||||||
|
* Default: 360
|
||||||
|
*
|
||||||
|
* The angle covered by the outer cone, where the source will be fully
|
||||||
|
* attenuated.
|
||||||
|
*/
|
||||||
|
#define AL_CONE_OUTER_ANGLE 0x1002
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source pitch.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.5 - 2.0]
|
||||||
|
* Default: 1.0
|
||||||
|
*
|
||||||
|
* A multiplier for the frequency (sample rate) of the source's buffer.
|
||||||
|
*/
|
||||||
|
#define AL_PITCH 0x1003
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source or listener position.
|
||||||
|
* Type: ALfloat[3], ALint[3]
|
||||||
|
* Default: {0, 0, 0}
|
||||||
|
*
|
||||||
|
* The source or listener location in three dimensional space.
|
||||||
|
*
|
||||||
|
* OpenAL, like OpenGL, uses a right handed coordinate system, where in a
|
||||||
|
* frontal default view X (thumb) points right, Y points up (index finger), and
|
||||||
|
* Z points towards the viewer/camera (middle finger).
|
||||||
|
*
|
||||||
|
* To switch from a left handed coordinate system, flip the sign on the Z
|
||||||
|
* coordinate.
|
||||||
|
*/
|
||||||
|
#define AL_POSITION 0x1004
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source direction.
|
||||||
|
* Type: ALfloat[3], ALint[3]
|
||||||
|
* Default: {0, 0, 0}
|
||||||
|
*
|
||||||
|
* Specifies the current direction in local space.
|
||||||
|
* A zero-length vector specifies an omni-directional source (cone is ignored).
|
||||||
|
*/
|
||||||
|
#define AL_DIRECTION 0x1005
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source or listener velocity.
|
||||||
|
* Type: ALfloat[3], ALint[3]
|
||||||
|
* Default: {0, 0, 0}
|
||||||
|
*
|
||||||
|
* Specifies the current velocity in local space.
|
||||||
|
*/
|
||||||
|
#define AL_VELOCITY 0x1006
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source looping.
|
||||||
|
* Type: ALboolean
|
||||||
|
* Range: [AL_TRUE, AL_FALSE]
|
||||||
|
* Default: AL_FALSE
|
||||||
|
*
|
||||||
|
* Specifies whether source is looping.
|
||||||
|
*/
|
||||||
|
#define AL_LOOPING 0x1007
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source buffer.
|
||||||
|
* Type: ALuint
|
||||||
|
* Range: any valid Buffer.
|
||||||
|
*
|
||||||
|
* Specifies the buffer to provide sound samples.
|
||||||
|
*/
|
||||||
|
#define AL_BUFFER 0x1009
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source or listener gain.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - ]
|
||||||
|
*
|
||||||
|
* A value of 1.0 means unattenuated. Each division by 2 equals an attenuation
|
||||||
|
* of about -6dB. Each multiplicaton by 2 equals an amplification of about
|
||||||
|
* +6dB.
|
||||||
|
*
|
||||||
|
* A value of 0.0 is meaningless with respect to a logarithmic scale; it is
|
||||||
|
* silent.
|
||||||
|
*/
|
||||||
|
#define AL_GAIN 0x100A
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum source gain.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - 1.0]
|
||||||
|
*
|
||||||
|
* The minimum gain allowed for a source, after distance and cone attenation is
|
||||||
|
* applied (if applicable).
|
||||||
|
*/
|
||||||
|
#define AL_MIN_GAIN 0x100D
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum source gain.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - 1.0]
|
||||||
|
*
|
||||||
|
* The maximum gain allowed for a source, after distance and cone attenation is
|
||||||
|
* applied (if applicable).
|
||||||
|
*/
|
||||||
|
#define AL_MAX_GAIN 0x100E
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listener orientation.
|
||||||
|
* Type: ALfloat[6]
|
||||||
|
* Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0}
|
||||||
|
*
|
||||||
|
* Effectively two three dimensional vectors. The first vector is the front (or
|
||||||
|
* "at") and the second is the top (or "up").
|
||||||
|
*
|
||||||
|
* Both vectors are in local space.
|
||||||
|
*/
|
||||||
|
#define AL_ORIENTATION 0x100F
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source state (query only).
|
||||||
|
* Type: ALint
|
||||||
|
* Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED]
|
||||||
|
*/
|
||||||
|
#define AL_SOURCE_STATE 0x1010
|
||||||
|
|
||||||
|
/** Source state value. */
|
||||||
|
#define AL_INITIAL 0x1011
|
||||||
|
#define AL_PLAYING 0x1012
|
||||||
|
#define AL_PAUSED 0x1013
|
||||||
|
#define AL_STOPPED 0x1014
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source Buffer Queue size (query only).
|
||||||
|
* Type: ALint
|
||||||
|
*
|
||||||
|
* The number of buffers queued using alSourceQueueBuffers, minus the buffers
|
||||||
|
* removed with alSourceUnqueueBuffers.
|
||||||
|
*/
|
||||||
|
#define AL_BUFFERS_QUEUED 0x1015
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source Buffer Queue processed count (query only).
|
||||||
|
* Type: ALint
|
||||||
|
*
|
||||||
|
* The number of queued buffers that have been fully processed, and can be
|
||||||
|
* removed with alSourceUnqueueBuffers.
|
||||||
|
*
|
||||||
|
* Looping sources will never fully process buffers because they will be set to
|
||||||
|
* play again for when the source loops.
|
||||||
|
*/
|
||||||
|
#define AL_BUFFERS_PROCESSED 0x1016
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source reference distance.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - ]
|
||||||
|
* Default: 1.0
|
||||||
|
*
|
||||||
|
* The distance in units that no attenuation occurs.
|
||||||
|
*
|
||||||
|
* At 0.0, no distance attenuation ever occurs on non-linear attenuation models.
|
||||||
|
*/
|
||||||
|
#define AL_REFERENCE_DISTANCE 0x1020
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source rolloff factor.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - ]
|
||||||
|
* Default: 1.0
|
||||||
|
*
|
||||||
|
* Multiplier to exaggerate or diminish distance attenuation.
|
||||||
|
*
|
||||||
|
* At 0.0, no distance attenuation ever occurs.
|
||||||
|
*/
|
||||||
|
#define AL_ROLLOFF_FACTOR 0x1021
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outer cone gain.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - 1.0]
|
||||||
|
* Default: 0.0
|
||||||
|
*
|
||||||
|
* The gain attenuation applied when the listener is outside of the source's
|
||||||
|
* outer cone.
|
||||||
|
*/
|
||||||
|
#define AL_CONE_OUTER_GAIN 0x1022
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source maximum distance.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - ]
|
||||||
|
* Default: +inf
|
||||||
|
*
|
||||||
|
* The distance above which the source is not attenuated any further with a
|
||||||
|
* clamped distance model, or where attenuation reaches 0.0 gain for linear
|
||||||
|
* distance models with a default rolloff factor.
|
||||||
|
*/
|
||||||
|
#define AL_MAX_DISTANCE 0x1023
|
||||||
|
|
||||||
|
/** Source buffer position, in seconds */
|
||||||
|
#define AL_SEC_OFFSET 0x1024
|
||||||
|
/** Source buffer position, in sample frames */
|
||||||
|
#define AL_SAMPLE_OFFSET 0x1025
|
||||||
|
/** Source buffer position, in bytes */
|
||||||
|
#define AL_BYTE_OFFSET 0x1026
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source type (query only).
|
||||||
|
* Type: ALint
|
||||||
|
* Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED]
|
||||||
|
*
|
||||||
|
* A Source is Static if a Buffer has been attached using AL_BUFFER.
|
||||||
|
*
|
||||||
|
* A Source is Streaming if one or more Buffers have been attached using
|
||||||
|
* alSourceQueueBuffers.
|
||||||
|
*
|
||||||
|
* A Source is Undetermined when it has the NULL buffer attached using
|
||||||
|
* AL_BUFFER.
|
||||||
|
*/
|
||||||
|
#define AL_SOURCE_TYPE 0x1027
|
||||||
|
|
||||||
|
/** Source type value. */
|
||||||
|
#define AL_STATIC 0x1028
|
||||||
|
#define AL_STREAMING 0x1029
|
||||||
|
#define AL_UNDETERMINED 0x1030
|
||||||
|
|
||||||
|
/** Buffer format specifier. */
|
||||||
|
#define AL_FORMAT_MONO8 0x1100
|
||||||
|
#define AL_FORMAT_MONO16 0x1101
|
||||||
|
#define AL_FORMAT_STEREO8 0x1102
|
||||||
|
#define AL_FORMAT_STEREO16 0x1103
|
||||||
|
|
||||||
|
/** Buffer frequency (query only). */
|
||||||
|
#define AL_FREQUENCY 0x2001
|
||||||
|
/** Buffer bits per sample (query only). */
|
||||||
|
#define AL_BITS 0x2002
|
||||||
|
/** Buffer channel count (query only). */
|
||||||
|
#define AL_CHANNELS 0x2003
|
||||||
|
/** Buffer data size (query only). */
|
||||||
|
#define AL_SIZE 0x2004
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Buffer state.
|
||||||
|
*
|
||||||
|
* Not for public use.
|
||||||
|
*/
|
||||||
|
#define AL_UNUSED 0x2010
|
||||||
|
#define AL_PENDING 0x2011
|
||||||
|
#define AL_PROCESSED 0x2012
|
||||||
|
|
||||||
|
|
||||||
|
/** No error. */
|
||||||
|
#define AL_NO_ERROR 0
|
||||||
|
|
||||||
|
/** Invalid name paramater passed to AL call. */
|
||||||
|
#define AL_INVALID_NAME 0xA001
|
||||||
|
|
||||||
|
/** Invalid enum parameter passed to AL call. */
|
||||||
|
#define AL_INVALID_ENUM 0xA002
|
||||||
|
|
||||||
|
/** Invalid value parameter passed to AL call. */
|
||||||
|
#define AL_INVALID_VALUE 0xA003
|
||||||
|
|
||||||
|
/** Illegal AL call. */
|
||||||
|
#define AL_INVALID_OPERATION 0xA004
|
||||||
|
|
||||||
|
/** Not enough memory. */
|
||||||
|
#define AL_OUT_OF_MEMORY 0xA005
|
||||||
|
|
||||||
|
|
||||||
|
/** Context string: Vendor ID. */
|
||||||
|
#define AL_VENDOR 0xB001
|
||||||
|
/** Context string: Version. */
|
||||||
|
#define AL_VERSION 0xB002
|
||||||
|
/** Context string: Renderer ID. */
|
||||||
|
#define AL_RENDERER 0xB003
|
||||||
|
/** Context string: Space-separated extension list. */
|
||||||
|
#define AL_EXTENSIONS 0xB004
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Doppler scale.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0 - ]
|
||||||
|
* Default: 1.0
|
||||||
|
*
|
||||||
|
* Scale for source and listener velocities.
|
||||||
|
*/
|
||||||
|
#define AL_DOPPLER_FACTOR 0xC000
|
||||||
|
AL_API void AL_APIENTRY alDopplerFactor(ALfloat value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Doppler velocity (deprecated).
|
||||||
|
*
|
||||||
|
* A multiplier applied to the Speed of Sound.
|
||||||
|
*/
|
||||||
|
#define AL_DOPPLER_VELOCITY 0xC001
|
||||||
|
AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Speed of Sound, in units per second.
|
||||||
|
* Type: ALfloat
|
||||||
|
* Range: [0.0001 - ]
|
||||||
|
* Default: 343.3
|
||||||
|
*
|
||||||
|
* The speed at which sound waves are assumed to travel, when calculating the
|
||||||
|
* doppler effect.
|
||||||
|
*/
|
||||||
|
#define AL_SPEED_OF_SOUND 0xC003
|
||||||
|
AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Distance attenuation model.
|
||||||
|
* Type: ALint
|
||||||
|
* Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED,
|
||||||
|
* AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED,
|
||||||
|
* AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED]
|
||||||
|
* Default: AL_INVERSE_DISTANCE_CLAMPED
|
||||||
|
*
|
||||||
|
* The model by which sources attenuate with distance.
|
||||||
|
*
|
||||||
|
* None - No distance attenuation.
|
||||||
|
* Inverse - Doubling the distance halves the source gain.
|
||||||
|
* Linear - Linear gain scaling between the reference and max distances.
|
||||||
|
* Exponent - Exponential gain dropoff.
|
||||||
|
*
|
||||||
|
* Clamped variations work like the non-clamped counterparts, except the
|
||||||
|
* distance calculated is clamped between the reference and max distances.
|
||||||
|
*/
|
||||||
|
#define AL_DISTANCE_MODEL 0xD000
|
||||||
|
AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel);
|
||||||
|
|
||||||
|
/** Distance model value. */
|
||||||
|
#define AL_INVERSE_DISTANCE 0xD001
|
||||||
|
#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
|
||||||
|
#define AL_LINEAR_DISTANCE 0xD003
|
||||||
|
#define AL_LINEAR_DISTANCE_CLAMPED 0xD004
|
||||||
|
#define AL_EXPONENT_DISTANCE 0xD005
|
||||||
|
#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
|
||||||
|
|
||||||
|
/** Renderer State management. */
|
||||||
|
AL_API void AL_APIENTRY alEnable(ALenum capability);
|
||||||
|
AL_API void AL_APIENTRY alDisable(ALenum capability);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability);
|
||||||
|
|
||||||
|
/** State retrieval. */
|
||||||
|
AL_API const ALchar* AL_APIENTRY alGetString(ALenum param);
|
||||||
|
AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values);
|
||||||
|
AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values);
|
||||||
|
AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values);
|
||||||
|
AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param);
|
||||||
|
AL_API ALint AL_APIENTRY alGetInteger(ALenum param);
|
||||||
|
AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param);
|
||||||
|
AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error retrieval.
|
||||||
|
*
|
||||||
|
* Obtain the first error generated in the AL context since the last check.
|
||||||
|
*/
|
||||||
|
AL_API ALenum AL_APIENTRY alGetError(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extension support.
|
||||||
|
*
|
||||||
|
* Query for the presence of an extension, and obtain any appropriate function
|
||||||
|
* pointers and enum values.
|
||||||
|
*/
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname);
|
||||||
|
AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname);
|
||||||
|
AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename);
|
||||||
|
|
||||||
|
|
||||||
|
/** Set Listener parameters */
|
||||||
|
AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value);
|
||||||
|
AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||||
|
AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value);
|
||||||
|
AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3);
|
||||||
|
AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values);
|
||||||
|
|
||||||
|
/** Get Listener parameters */
|
||||||
|
AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value);
|
||||||
|
AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value);
|
||||||
|
AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values);
|
||||||
|
|
||||||
|
|
||||||
|
/** Create Source objects. */
|
||||||
|
AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources);
|
||||||
|
/** Delete Source objects. */
|
||||||
|
AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources);
|
||||||
|
/** Verify a handle is a valid Source. */
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsSource(ALuint source);
|
||||||
|
|
||||||
|
/** Set Source parameters. */
|
||||||
|
AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value);
|
||||||
|
AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||||
|
AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value);
|
||||||
|
AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||||
|
AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values);
|
||||||
|
|
||||||
|
/** Get Source parameters. */
|
||||||
|
AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value);
|
||||||
|
AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value);
|
||||||
|
AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values);
|
||||||
|
|
||||||
|
|
||||||
|
/** Play, replay, or resume (if paused) a list of Sources */
|
||||||
|
AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources);
|
||||||
|
/** Stop a list of Sources */
|
||||||
|
AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources);
|
||||||
|
/** Rewind a list of Sources */
|
||||||
|
AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources);
|
||||||
|
/** Pause a list of Sources */
|
||||||
|
AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources);
|
||||||
|
|
||||||
|
/** Play, replay, or resume a Source */
|
||||||
|
AL_API void AL_APIENTRY alSourcePlay(ALuint source);
|
||||||
|
/** Stop a Source */
|
||||||
|
AL_API void AL_APIENTRY alSourceStop(ALuint source);
|
||||||
|
/** Rewind a Source (set playback postiton to beginning) */
|
||||||
|
AL_API void AL_APIENTRY alSourceRewind(ALuint source);
|
||||||
|
/** Pause a Source */
|
||||||
|
AL_API void AL_APIENTRY alSourcePause(ALuint source);
|
||||||
|
|
||||||
|
/** Queue buffers onto a source */
|
||||||
|
AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers);
|
||||||
|
/** Unqueue processed buffers from a source */
|
||||||
|
AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers);
|
||||||
|
|
||||||
|
|
||||||
|
/** Create Buffer objects */
|
||||||
|
AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers);
|
||||||
|
/** Delete Buffer objects */
|
||||||
|
AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers);
|
||||||
|
/** Verify a handle is a valid Buffer */
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer);
|
||||||
|
|
||||||
|
/** Specifies the data to be copied into a buffer */
|
||||||
|
AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq);
|
||||||
|
|
||||||
|
/** Set Buffer parameters, */
|
||||||
|
AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value);
|
||||||
|
AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||||
|
AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value);
|
||||||
|
AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||||
|
AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values);
|
||||||
|
|
||||||
|
/** Get Buffer parameters. */
|
||||||
|
AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value);
|
||||||
|
AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values);
|
||||||
|
AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value);
|
||||||
|
AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values);
|
||||||
|
|
||||||
|
/** Pointer-to-function type, useful for dynamically getting AL entry points. */
|
||||||
|
typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability);
|
||||||
|
typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability);
|
||||||
|
typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param);
|
||||||
|
typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param);
|
||||||
|
typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param);
|
||||||
|
typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param);
|
||||||
|
typedef ALenum (AL_APIENTRY *LPALGETERROR)(void);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname);
|
||||||
|
typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname);
|
||||||
|
typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename);
|
||||||
|
typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value);
|
||||||
|
typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value);
|
||||||
|
typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers);
|
||||||
|
typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers);
|
||||||
|
typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values);
|
||||||
|
typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value);
|
||||||
|
typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value);
|
||||||
|
typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value);
|
||||||
|
typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel);
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* AL_AL_H */
|
237
openal-soft/include/AL/alc.h
Normal file
237
openal-soft/include/AL/alc.h
Normal file
|
@ -0,0 +1,237 @@
|
||||||
|
#ifndef AL_ALC_H
|
||||||
|
#define AL_ALC_H
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_API
|
||||||
|
#if defined(AL_LIBTYPE_STATIC)
|
||||||
|
#define ALC_API
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define ALC_API __declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define ALC_API extern
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#define ALC_APIENTRY __cdecl
|
||||||
|
#else
|
||||||
|
#define ALC_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** Deprecated macro. */
|
||||||
|
#define ALCAPI ALC_API
|
||||||
|
#define ALCAPIENTRY ALC_APIENTRY
|
||||||
|
#define ALC_INVALID 0
|
||||||
|
|
||||||
|
/** Supported ALC version? */
|
||||||
|
#define ALC_VERSION_0_1 1
|
||||||
|
|
||||||
|
/** Opaque device handle */
|
||||||
|
typedef struct ALCdevice ALCdevice;
|
||||||
|
/** Opaque context handle */
|
||||||
|
typedef struct ALCcontext ALCcontext;
|
||||||
|
|
||||||
|
/** 8-bit boolean */
|
||||||
|
typedef char ALCboolean;
|
||||||
|
|
||||||
|
/** character */
|
||||||
|
typedef char ALCchar;
|
||||||
|
|
||||||
|
/** signed 8-bit 2's complement integer */
|
||||||
|
typedef signed char ALCbyte;
|
||||||
|
|
||||||
|
/** unsigned 8-bit integer */
|
||||||
|
typedef unsigned char ALCubyte;
|
||||||
|
|
||||||
|
/** signed 16-bit 2's complement integer */
|
||||||
|
typedef short ALCshort;
|
||||||
|
|
||||||
|
/** unsigned 16-bit integer */
|
||||||
|
typedef unsigned short ALCushort;
|
||||||
|
|
||||||
|
/** signed 32-bit 2's complement integer */
|
||||||
|
typedef int ALCint;
|
||||||
|
|
||||||
|
/** unsigned 32-bit integer */
|
||||||
|
typedef unsigned int ALCuint;
|
||||||
|
|
||||||
|
/** non-negative 32-bit binary integer size */
|
||||||
|
typedef int ALCsizei;
|
||||||
|
|
||||||
|
/** enumerated 32-bit value */
|
||||||
|
typedef int ALCenum;
|
||||||
|
|
||||||
|
/** 32-bit IEEE754 floating-point */
|
||||||
|
typedef float ALCfloat;
|
||||||
|
|
||||||
|
/** 64-bit IEEE754 floating-point */
|
||||||
|
typedef double ALCdouble;
|
||||||
|
|
||||||
|
/** void type (for opaque pointers only) */
|
||||||
|
typedef void ALCvoid;
|
||||||
|
|
||||||
|
|
||||||
|
/* Enumerant values begin at column 50. No tabs. */
|
||||||
|
|
||||||
|
/** Boolean False. */
|
||||||
|
#define ALC_FALSE 0
|
||||||
|
|
||||||
|
/** Boolean True. */
|
||||||
|
#define ALC_TRUE 1
|
||||||
|
|
||||||
|
/** Context attribute: <int> Hz. */
|
||||||
|
#define ALC_FREQUENCY 0x1007
|
||||||
|
|
||||||
|
/** Context attribute: <int> Hz. */
|
||||||
|
#define ALC_REFRESH 0x1008
|
||||||
|
|
||||||
|
/** Context attribute: AL_TRUE or AL_FALSE. */
|
||||||
|
#define ALC_SYNC 0x1009
|
||||||
|
|
||||||
|
/** Context attribute: <int> requested Mono (3D) Sources. */
|
||||||
|
#define ALC_MONO_SOURCES 0x1010
|
||||||
|
|
||||||
|
/** Context attribute: <int> requested Stereo Sources. */
|
||||||
|
#define ALC_STEREO_SOURCES 0x1011
|
||||||
|
|
||||||
|
/** No error. */
|
||||||
|
#define ALC_NO_ERROR 0
|
||||||
|
|
||||||
|
/** Invalid device handle. */
|
||||||
|
#define ALC_INVALID_DEVICE 0xA001
|
||||||
|
|
||||||
|
/** Invalid context handle. */
|
||||||
|
#define ALC_INVALID_CONTEXT 0xA002
|
||||||
|
|
||||||
|
/** Invalid enum parameter passed to an ALC call. */
|
||||||
|
#define ALC_INVALID_ENUM 0xA003
|
||||||
|
|
||||||
|
/** Invalid value parameter passed to an ALC call. */
|
||||||
|
#define ALC_INVALID_VALUE 0xA004
|
||||||
|
|
||||||
|
/** Out of memory. */
|
||||||
|
#define ALC_OUT_OF_MEMORY 0xA005
|
||||||
|
|
||||||
|
|
||||||
|
/** Runtime ALC version. */
|
||||||
|
#define ALC_MAJOR_VERSION 0x1000
|
||||||
|
#define ALC_MINOR_VERSION 0x1001
|
||||||
|
|
||||||
|
/** Context attribute list properties. */
|
||||||
|
#define ALC_ATTRIBUTES_SIZE 0x1002
|
||||||
|
#define ALC_ALL_ATTRIBUTES 0x1003
|
||||||
|
|
||||||
|
/** String for the default device specifier. */
|
||||||
|
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
|
||||||
|
/**
|
||||||
|
* String for the given device's specifier.
|
||||||
|
*
|
||||||
|
* If device handle is NULL, it is instead a null-char separated list of
|
||||||
|
* strings of known device specifiers (list ends with an empty string).
|
||||||
|
*/
|
||||||
|
#define ALC_DEVICE_SPECIFIER 0x1005
|
||||||
|
/** String for space-separated list of ALC extensions. */
|
||||||
|
#define ALC_EXTENSIONS 0x1006
|
||||||
|
|
||||||
|
|
||||||
|
/** Capture extension */
|
||||||
|
#define ALC_EXT_CAPTURE 1
|
||||||
|
/**
|
||||||
|
* String for the given capture device's specifier.
|
||||||
|
*
|
||||||
|
* If device handle is NULL, it is instead a null-char separated list of
|
||||||
|
* strings of known capture device specifiers (list ends with an empty string).
|
||||||
|
*/
|
||||||
|
#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
|
||||||
|
/** String for the default capture device specifier. */
|
||||||
|
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
|
||||||
|
/** Number of sample frames available for capture. */
|
||||||
|
#define ALC_CAPTURE_SAMPLES 0x312
|
||||||
|
|
||||||
|
|
||||||
|
/** Enumerate All extension */
|
||||||
|
#define ALC_ENUMERATE_ALL_EXT 1
|
||||||
|
/** String for the default extended device specifier. */
|
||||||
|
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
|
||||||
|
/**
|
||||||
|
* String for the given extended device's specifier.
|
||||||
|
*
|
||||||
|
* If device handle is NULL, it is instead a null-char separated list of
|
||||||
|
* strings of known extended device specifiers (list ends with an empty string).
|
||||||
|
*/
|
||||||
|
#define ALC_ALL_DEVICES_SPECIFIER 0x1013
|
||||||
|
|
||||||
|
|
||||||
|
/** Context management. */
|
||||||
|
ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint* attrlist);
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context);
|
||||||
|
ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context);
|
||||||
|
ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context);
|
||||||
|
ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context);
|
||||||
|
ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void);
|
||||||
|
ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context);
|
||||||
|
|
||||||
|
/** Device management. */
|
||||||
|
ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename);
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error support.
|
||||||
|
*
|
||||||
|
* Obtain the most recent Device error.
|
||||||
|
*/
|
||||||
|
ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extension support.
|
||||||
|
*
|
||||||
|
* Query for the presence of an extension, and obtain any appropriate
|
||||||
|
* function pointers and enum values.
|
||||||
|
*/
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname);
|
||||||
|
ALC_API void* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname);
|
||||||
|
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname);
|
||||||
|
|
||||||
|
/** Query function. */
|
||||||
|
ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param);
|
||||||
|
ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values);
|
||||||
|
|
||||||
|
/** Capture function. */
|
||||||
|
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize);
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device);
|
||||||
|
ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device);
|
||||||
|
ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device);
|
||||||
|
ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
|
||||||
|
|
||||||
|
/** Pointer-to-function type, useful for dynamically getting ALC entry points. */
|
||||||
|
typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist);
|
||||||
|
typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)(ALCcontext *context);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)(ALCcontext *context);
|
||||||
|
typedef ALCcontext* (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)(void);
|
||||||
|
typedef ALCdevice* (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)(ALCcontext *context);
|
||||||
|
typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename);
|
||||||
|
typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device);
|
||||||
|
typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device);
|
||||||
|
typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname);
|
||||||
|
typedef void* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname);
|
||||||
|
typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname);
|
||||||
|
typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values);
|
||||||
|
typedef ALCdevice* (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize);
|
||||||
|
typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)(ALCdevice *device);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device);
|
||||||
|
typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* AL_ALC_H */
|
537
openal-soft/include/AL/alext.h
Normal file
537
openal-soft/include/AL/alext.h
Normal file
|
@ -0,0 +1,537 @@
|
||||||
|
/**
|
||||||
|
* OpenAL cross platform audio library
|
||||||
|
* Copyright (C) 2008 by authors.
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
* Or go to http://www.gnu.org/copyleft/lgpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AL_ALEXT_H
|
||||||
|
#define AL_ALEXT_H
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
/* Define int64_t and uint64_t types */
|
||||||
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
|
#include <inttypes.h>
|
||||||
|
#elif defined(_WIN32) && defined(__GNUC__)
|
||||||
|
#include <stdint.h>
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
typedef __int64 int64_t;
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#else
|
||||||
|
/* Fallback if nothing above works */
|
||||||
|
#include <inttypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "alc.h"
|
||||||
|
#include "al.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_LOKI_IMA_ADPCM_format
|
||||||
|
#define AL_LOKI_IMA_ADPCM_format 1
|
||||||
|
#define AL_FORMAT_IMA_ADPCM_MONO16_EXT 0x10000
|
||||||
|
#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT 0x10001
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_LOKI_WAVE_format
|
||||||
|
#define AL_LOKI_WAVE_format 1
|
||||||
|
#define AL_FORMAT_WAVE_EXT 0x10002
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_vorbis
|
||||||
|
#define AL_EXT_vorbis 1
|
||||||
|
#define AL_FORMAT_VORBIS_EXT 0x10003
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_LOKI_quadriphonic
|
||||||
|
#define AL_LOKI_quadriphonic 1
|
||||||
|
#define AL_FORMAT_QUAD8_LOKI 0x10004
|
||||||
|
#define AL_FORMAT_QUAD16_LOKI 0x10005
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_float32
|
||||||
|
#define AL_EXT_float32 1
|
||||||
|
#define AL_FORMAT_MONO_FLOAT32 0x10010
|
||||||
|
#define AL_FORMAT_STEREO_FLOAT32 0x10011
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_double
|
||||||
|
#define AL_EXT_double 1
|
||||||
|
#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012
|
||||||
|
#define AL_FORMAT_STEREO_DOUBLE_EXT 0x10013
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_MULAW
|
||||||
|
#define AL_EXT_MULAW 1
|
||||||
|
#define AL_FORMAT_MONO_MULAW_EXT 0x10014
|
||||||
|
#define AL_FORMAT_STEREO_MULAW_EXT 0x10015
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_ALAW
|
||||||
|
#define AL_EXT_ALAW 1
|
||||||
|
#define AL_FORMAT_MONO_ALAW_EXT 0x10016
|
||||||
|
#define AL_FORMAT_STEREO_ALAW_EXT 0x10017
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_LOKI_audio_channel
|
||||||
|
#define ALC_LOKI_audio_channel 1
|
||||||
|
#define ALC_CHAN_MAIN_LOKI 0x500001
|
||||||
|
#define ALC_CHAN_PCM_LOKI 0x500002
|
||||||
|
#define ALC_CHAN_CD_LOKI 0x500003
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_MCFORMATS
|
||||||
|
#define AL_EXT_MCFORMATS 1
|
||||||
|
/* Provides support for surround sound buffer formats with 8, 16, and 32-bit
|
||||||
|
* samples.
|
||||||
|
*
|
||||||
|
* QUAD8: Unsigned 8-bit, Quadraphonic (Front Left, Front Right, Rear Left,
|
||||||
|
* Rear Right).
|
||||||
|
* QUAD16: Signed 16-bit, Quadraphonic.
|
||||||
|
* QUAD32: 32-bit float, Quadraphonic.
|
||||||
|
* REAR8: Unsigned 8-bit, Rear Stereo (Rear Left, Rear Right).
|
||||||
|
* REAR16: Signed 16-bit, Rear Stereo.
|
||||||
|
* REAR32: 32-bit float, Rear Stereo.
|
||||||
|
* 51CHN8: Unsigned 8-bit, 5.1 Surround (Front Left, Front Right, Front Center,
|
||||||
|
* LFE, Side Left, Side Right). Note that some audio systems may label
|
||||||
|
* 5.1's Side channels as Rear or Surround; they are equivalent for the
|
||||||
|
* purposes of this extension.
|
||||||
|
* 51CHN16: Signed 16-bit, 5.1 Surround.
|
||||||
|
* 51CHN32: 32-bit float, 5.1 Surround.
|
||||||
|
* 61CHN8: Unsigned 8-bit, 6.1 Surround (Front Left, Front Right, Front Center,
|
||||||
|
* LFE, Rear Center, Side Left, Side Right).
|
||||||
|
* 61CHN16: Signed 16-bit, 6.1 Surround.
|
||||||
|
* 61CHN32: 32-bit float, 6.1 Surround.
|
||||||
|
* 71CHN8: Unsigned 8-bit, 7.1 Surround (Front Left, Front Right, Front Center,
|
||||||
|
* LFE, Rear Left, Rear Right, Side Left, Side Right).
|
||||||
|
* 71CHN16: Signed 16-bit, 7.1 Surround.
|
||||||
|
* 71CHN32: 32-bit float, 7.1 Surround.
|
||||||
|
*/
|
||||||
|
#define AL_FORMAT_QUAD8 0x1204
|
||||||
|
#define AL_FORMAT_QUAD16 0x1205
|
||||||
|
#define AL_FORMAT_QUAD32 0x1206
|
||||||
|
#define AL_FORMAT_REAR8 0x1207
|
||||||
|
#define AL_FORMAT_REAR16 0x1208
|
||||||
|
#define AL_FORMAT_REAR32 0x1209
|
||||||
|
#define AL_FORMAT_51CHN8 0x120A
|
||||||
|
#define AL_FORMAT_51CHN16 0x120B
|
||||||
|
#define AL_FORMAT_51CHN32 0x120C
|
||||||
|
#define AL_FORMAT_61CHN8 0x120D
|
||||||
|
#define AL_FORMAT_61CHN16 0x120E
|
||||||
|
#define AL_FORMAT_61CHN32 0x120F
|
||||||
|
#define AL_FORMAT_71CHN8 0x1210
|
||||||
|
#define AL_FORMAT_71CHN16 0x1211
|
||||||
|
#define AL_FORMAT_71CHN32 0x1212
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_MULAW_MCFORMATS
|
||||||
|
#define AL_EXT_MULAW_MCFORMATS 1
|
||||||
|
#define AL_FORMAT_MONO_MULAW 0x10014
|
||||||
|
#define AL_FORMAT_STEREO_MULAW 0x10015
|
||||||
|
#define AL_FORMAT_QUAD_MULAW 0x10021
|
||||||
|
#define AL_FORMAT_REAR_MULAW 0x10022
|
||||||
|
#define AL_FORMAT_51CHN_MULAW 0x10023
|
||||||
|
#define AL_FORMAT_61CHN_MULAW 0x10024
|
||||||
|
#define AL_FORMAT_71CHN_MULAW 0x10025
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_IMA4
|
||||||
|
#define AL_EXT_IMA4 1
|
||||||
|
#define AL_FORMAT_MONO_IMA4 0x1300
|
||||||
|
#define AL_FORMAT_STEREO_IMA4 0x1301
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_STATIC_BUFFER
|
||||||
|
#define AL_EXT_STATIC_BUFFER 1
|
||||||
|
typedef ALvoid (AL_APIENTRY*PFNALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_EXT_EFX
|
||||||
|
#define ALC_EXT_EFX 1
|
||||||
|
#include "efx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_EXT_disconnect
|
||||||
|
#define ALC_EXT_disconnect 1
|
||||||
|
#define ALC_CONNECTED 0x313
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_EXT_thread_local_context
|
||||||
|
#define ALC_EXT_thread_local_context 1
|
||||||
|
typedef ALCboolean (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context);
|
||||||
|
typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context);
|
||||||
|
ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_source_distance_model
|
||||||
|
#define AL_EXT_source_distance_model 1
|
||||||
|
#define AL_SOURCE_DISTANCE_MODEL 0x200
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_buffer_sub_data
|
||||||
|
#define AL_SOFT_buffer_sub_data 1
|
||||||
|
#define AL_BYTE_RW_OFFSETS_SOFT 0x1031
|
||||||
|
#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032
|
||||||
|
typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_loop_points
|
||||||
|
#define AL_SOFT_loop_points 1
|
||||||
|
#define AL_LOOP_POINTS_SOFT 0x2015
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_FOLDBACK
|
||||||
|
#define AL_EXT_FOLDBACK 1
|
||||||
|
#define AL_EXT_FOLDBACK_NAME "AL_EXT_FOLDBACK"
|
||||||
|
#define AL_FOLDBACK_EVENT_BLOCK 0x4112
|
||||||
|
#define AL_FOLDBACK_EVENT_START 0x4111
|
||||||
|
#define AL_FOLDBACK_EVENT_STOP 0x4113
|
||||||
|
#define AL_FOLDBACK_MODE_MONO 0x4101
|
||||||
|
#define AL_FOLDBACK_MODE_STEREO 0x4102
|
||||||
|
typedef void (AL_APIENTRY*LPALFOLDBACKCALLBACK)(ALenum,ALsizei);
|
||||||
|
typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTART)(ALenum,ALsizei,ALsizei,ALfloat*,LPALFOLDBACKCALLBACK);
|
||||||
|
typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTOP)(void);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API void AL_APIENTRY alRequestFoldbackStart(ALenum mode,ALsizei count,ALsizei length,ALfloat *mem,LPALFOLDBACKCALLBACK callback);
|
||||||
|
AL_API void AL_APIENTRY alRequestFoldbackStop(void);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_EXT_DEDICATED
|
||||||
|
#define ALC_EXT_DEDICATED 1
|
||||||
|
#define AL_DEDICATED_GAIN 0x0001
|
||||||
|
#define AL_EFFECT_DEDICATED_DIALOGUE 0x9001
|
||||||
|
#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_buffer_samples
|
||||||
|
#define AL_SOFT_buffer_samples 1
|
||||||
|
/* Channel configurations */
|
||||||
|
#define AL_MONO_SOFT 0x1500
|
||||||
|
#define AL_STEREO_SOFT 0x1501
|
||||||
|
#define AL_REAR_SOFT 0x1502
|
||||||
|
#define AL_QUAD_SOFT 0x1503
|
||||||
|
#define AL_5POINT1_SOFT 0x1504
|
||||||
|
#define AL_6POINT1_SOFT 0x1505
|
||||||
|
#define AL_7POINT1_SOFT 0x1506
|
||||||
|
|
||||||
|
/* Sample types */
|
||||||
|
#define AL_BYTE_SOFT 0x1400
|
||||||
|
#define AL_UNSIGNED_BYTE_SOFT 0x1401
|
||||||
|
#define AL_SHORT_SOFT 0x1402
|
||||||
|
#define AL_UNSIGNED_SHORT_SOFT 0x1403
|
||||||
|
#define AL_INT_SOFT 0x1404
|
||||||
|
#define AL_UNSIGNED_INT_SOFT 0x1405
|
||||||
|
#define AL_FLOAT_SOFT 0x1406
|
||||||
|
#define AL_DOUBLE_SOFT 0x1407
|
||||||
|
#define AL_BYTE3_SOFT 0x1408
|
||||||
|
#define AL_UNSIGNED_BYTE3_SOFT 0x1409
|
||||||
|
|
||||||
|
/* Storage formats */
|
||||||
|
#define AL_MONO8_SOFT 0x1100
|
||||||
|
#define AL_MONO16_SOFT 0x1101
|
||||||
|
#define AL_MONO32F_SOFT 0x10010
|
||||||
|
#define AL_STEREO8_SOFT 0x1102
|
||||||
|
#define AL_STEREO16_SOFT 0x1103
|
||||||
|
#define AL_STEREO32F_SOFT 0x10011
|
||||||
|
#define AL_QUAD8_SOFT 0x1204
|
||||||
|
#define AL_QUAD16_SOFT 0x1205
|
||||||
|
#define AL_QUAD32F_SOFT 0x1206
|
||||||
|
#define AL_REAR8_SOFT 0x1207
|
||||||
|
#define AL_REAR16_SOFT 0x1208
|
||||||
|
#define AL_REAR32F_SOFT 0x1209
|
||||||
|
#define AL_5POINT1_8_SOFT 0x120A
|
||||||
|
#define AL_5POINT1_16_SOFT 0x120B
|
||||||
|
#define AL_5POINT1_32F_SOFT 0x120C
|
||||||
|
#define AL_6POINT1_8_SOFT 0x120D
|
||||||
|
#define AL_6POINT1_16_SOFT 0x120E
|
||||||
|
#define AL_6POINT1_32F_SOFT 0x120F
|
||||||
|
#define AL_7POINT1_8_SOFT 0x1210
|
||||||
|
#define AL_7POINT1_16_SOFT 0x1211
|
||||||
|
#define AL_7POINT1_32F_SOFT 0x1212
|
||||||
|
|
||||||
|
/* Buffer attributes */
|
||||||
|
#define AL_INTERNAL_FORMAT_SOFT 0x2008
|
||||||
|
#define AL_BYTE_LENGTH_SOFT 0x2009
|
||||||
|
#define AL_SAMPLE_LENGTH_SOFT 0x200A
|
||||||
|
#define AL_SEC_LENGTH_SOFT 0x200B
|
||||||
|
|
||||||
|
typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*);
|
||||||
|
typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*);
|
||||||
|
typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data);
|
||||||
|
AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data);
|
||||||
|
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_direct_channels
|
||||||
|
#define AL_SOFT_direct_channels 1
|
||||||
|
#define AL_DIRECT_CHANNELS_SOFT 0x1033
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_SOFT_loopback
|
||||||
|
#define ALC_SOFT_loopback 1
|
||||||
|
#define ALC_FORMAT_CHANNELS_SOFT 0x1990
|
||||||
|
#define ALC_FORMAT_TYPE_SOFT 0x1991
|
||||||
|
|
||||||
|
/* Sample types */
|
||||||
|
#define ALC_BYTE_SOFT 0x1400
|
||||||
|
#define ALC_UNSIGNED_BYTE_SOFT 0x1401
|
||||||
|
#define ALC_SHORT_SOFT 0x1402
|
||||||
|
#define ALC_UNSIGNED_SHORT_SOFT 0x1403
|
||||||
|
#define ALC_INT_SOFT 0x1404
|
||||||
|
#define ALC_UNSIGNED_INT_SOFT 0x1405
|
||||||
|
#define ALC_FLOAT_SOFT 0x1406
|
||||||
|
|
||||||
|
/* Channel configurations */
|
||||||
|
#define ALC_MONO_SOFT 0x1500
|
||||||
|
#define ALC_STEREO_SOFT 0x1501
|
||||||
|
#define ALC_QUAD_SOFT 0x1503
|
||||||
|
#define ALC_5POINT1_SOFT 0x1504
|
||||||
|
#define ALC_6POINT1_SOFT 0x1505
|
||||||
|
#define ALC_7POINT1_SOFT 0x1506
|
||||||
|
|
||||||
|
typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*);
|
||||||
|
typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum);
|
||||||
|
typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName);
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type);
|
||||||
|
ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_STEREO_ANGLES
|
||||||
|
#define AL_EXT_STEREO_ANGLES 1
|
||||||
|
#define AL_STEREO_ANGLES 0x1030
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_SOURCE_RADIUS
|
||||||
|
#define AL_EXT_SOURCE_RADIUS 1
|
||||||
|
#define AL_SOURCE_RADIUS 0x1031
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_source_latency
|
||||||
|
#define AL_SOFT_source_latency 1
|
||||||
|
#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200
|
||||||
|
#define AL_SEC_OFFSET_LATENCY_SOFT 0x1201
|
||||||
|
typedef int64_t ALint64SOFT;
|
||||||
|
typedef uint64_t ALuint64SOFT;
|
||||||
|
typedef void (AL_APIENTRY*LPALSOURCEDSOFT)(ALuint,ALenum,ALdouble);
|
||||||
|
typedef void (AL_APIENTRY*LPALSOURCE3DSOFT)(ALuint,ALenum,ALdouble,ALdouble,ALdouble);
|
||||||
|
typedef void (AL_APIENTRY*LPALSOURCEDVSOFT)(ALuint,ALenum,const ALdouble*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETSOURCEDSOFT)(ALuint,ALenum,ALdouble*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETSOURCE3DSOFT)(ALuint,ALenum,ALdouble*,ALdouble*,ALdouble*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETSOURCEDVSOFT)(ALuint,ALenum,ALdouble*);
|
||||||
|
typedef void (AL_APIENTRY*LPALSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT);
|
||||||
|
typedef void (AL_APIENTRY*LPALSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT,ALint64SOFT,ALint64SOFT);
|
||||||
|
typedef void (AL_APIENTRY*LPALSOURCEI64VSOFT)(ALuint,ALenum,const ALint64SOFT*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT*,ALint64SOFT*,ALint64SOFT*);
|
||||||
|
typedef void (AL_APIENTRY*LPALGETSOURCEI64VSOFT)(ALuint,ALenum,ALint64SOFT*);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API void AL_APIENTRY alSourcedSOFT(ALuint source, ALenum param, ALdouble value);
|
||||||
|
AL_API void AL_APIENTRY alSource3dSOFT(ALuint source, ALenum param, ALdouble value1, ALdouble value2, ALdouble value3);
|
||||||
|
AL_API void AL_APIENTRY alSourcedvSOFT(ALuint source, ALenum param, const ALdouble *values);
|
||||||
|
AL_API void AL_APIENTRY alGetSourcedSOFT(ALuint source, ALenum param, ALdouble *value);
|
||||||
|
AL_API void AL_APIENTRY alGetSource3dSOFT(ALuint source, ALenum param, ALdouble *value1, ALdouble *value2, ALdouble *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetSourcedvSOFT(ALuint source, ALenum param, ALdouble *values);
|
||||||
|
AL_API void AL_APIENTRY alSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT value);
|
||||||
|
AL_API void AL_APIENTRY alSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT value1, ALint64SOFT value2, ALint64SOFT value3);
|
||||||
|
AL_API void AL_APIENTRY alSourcei64vSOFT(ALuint source, ALenum param, const ALint64SOFT *values);
|
||||||
|
AL_API void AL_APIENTRY alGetSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT *value);
|
||||||
|
AL_API void AL_APIENTRY alGetSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT *value1, ALint64SOFT *value2, ALint64SOFT *value3);
|
||||||
|
AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64SOFT *values);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_EXT_DEFAULT_FILTER_ORDER
|
||||||
|
#define ALC_EXT_DEFAULT_FILTER_ORDER 1
|
||||||
|
#define ALC_DEFAULT_FILTER_ORDER 0x1100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_deferred_updates
|
||||||
|
#define AL_SOFT_deferred_updates 1
|
||||||
|
#define AL_DEFERRED_UPDATES_SOFT 0xC002
|
||||||
|
typedef ALvoid (AL_APIENTRY*LPALDEFERUPDATESSOFT)(void);
|
||||||
|
typedef ALvoid (AL_APIENTRY*LPALPROCESSUPDATESSOFT)(void);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void);
|
||||||
|
AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_block_alignment
|
||||||
|
#define AL_SOFT_block_alignment 1
|
||||||
|
#define AL_UNPACK_BLOCK_ALIGNMENT_SOFT 0x200C
|
||||||
|
#define AL_PACK_BLOCK_ALIGNMENT_SOFT 0x200D
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_MSADPCM
|
||||||
|
#define AL_SOFT_MSADPCM 1
|
||||||
|
#define AL_FORMAT_MONO_MSADPCM_SOFT 0x1302
|
||||||
|
#define AL_FORMAT_STEREO_MSADPCM_SOFT 0x1303
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_source_length
|
||||||
|
#define AL_SOFT_source_length 1
|
||||||
|
/*#define AL_BYTE_LENGTH_SOFT 0x2009*/
|
||||||
|
/*#define AL_SAMPLE_LENGTH_SOFT 0x200A*/
|
||||||
|
/*#define AL_SEC_LENGTH_SOFT 0x200B*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_SOFT_pause_device
|
||||||
|
#define ALC_SOFT_pause_device 1
|
||||||
|
typedef void (ALC_APIENTRY*LPALCDEVICEPAUSESOFT)(ALCdevice *device);
|
||||||
|
typedef void (ALC_APIENTRY*LPALCDEVICERESUMESOFT)(ALCdevice *device);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
ALC_API void ALC_APIENTRY alcDevicePauseSOFT(ALCdevice *device);
|
||||||
|
ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_BFORMAT
|
||||||
|
#define AL_EXT_BFORMAT 1
|
||||||
|
/* Provides support for B-Format ambisonic buffers (first-order, FuMa scaling
|
||||||
|
* and layout).
|
||||||
|
*
|
||||||
|
* BFORMAT2D_8: Unsigned 8-bit, 3-channel non-periphonic (WXY).
|
||||||
|
* BFORMAT2D_16: Signed 16-bit, 3-channel non-periphonic (WXY).
|
||||||
|
* BFORMAT2D_FLOAT32: 32-bit float, 3-channel non-periphonic (WXY).
|
||||||
|
* BFORMAT3D_8: Unsigned 8-bit, 4-channel periphonic (WXYZ).
|
||||||
|
* BFORMAT3D_16: Signed 16-bit, 4-channel periphonic (WXYZ).
|
||||||
|
* BFORMAT3D_FLOAT32: 32-bit float, 4-channel periphonic (WXYZ).
|
||||||
|
*/
|
||||||
|
#define AL_FORMAT_BFORMAT2D_8 0x20021
|
||||||
|
#define AL_FORMAT_BFORMAT2D_16 0x20022
|
||||||
|
#define AL_FORMAT_BFORMAT2D_FLOAT32 0x20023
|
||||||
|
#define AL_FORMAT_BFORMAT3D_8 0x20031
|
||||||
|
#define AL_FORMAT_BFORMAT3D_16 0x20032
|
||||||
|
#define AL_FORMAT_BFORMAT3D_FLOAT32 0x20033
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_MULAW_BFORMAT
|
||||||
|
#define AL_EXT_MULAW_BFORMAT 1
|
||||||
|
#define AL_FORMAT_BFORMAT2D_MULAW 0x10031
|
||||||
|
#define AL_FORMAT_BFORMAT3D_MULAW 0x10032
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_SOFT_HRTF
|
||||||
|
#define ALC_SOFT_HRTF 1
|
||||||
|
#define ALC_HRTF_SOFT 0x1992
|
||||||
|
#define ALC_DONT_CARE_SOFT 0x0002
|
||||||
|
#define ALC_HRTF_STATUS_SOFT 0x1993
|
||||||
|
#define ALC_HRTF_DISABLED_SOFT 0x0000
|
||||||
|
#define ALC_HRTF_ENABLED_SOFT 0x0001
|
||||||
|
#define ALC_HRTF_DENIED_SOFT 0x0002
|
||||||
|
#define ALC_HRTF_REQUIRED_SOFT 0x0003
|
||||||
|
#define ALC_HRTF_HEADPHONES_DETECTED_SOFT 0x0004
|
||||||
|
#define ALC_HRTF_UNSUPPORTED_FORMAT_SOFT 0x0005
|
||||||
|
#define ALC_NUM_HRTF_SPECIFIERS_SOFT 0x1994
|
||||||
|
#define ALC_HRTF_SPECIFIER_SOFT 0x1995
|
||||||
|
#define ALC_HRTF_ID_SOFT 0x1996
|
||||||
|
typedef const ALCchar* (ALC_APIENTRY*LPALCGETSTRINGISOFT)(ALCdevice *device, ALCenum paramName, ALCsizei index);
|
||||||
|
typedef ALCboolean (ALC_APIENTRY*LPALCRESETDEVICESOFT)(ALCdevice *device, const ALCint *attribs);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
ALC_API const ALCchar* ALC_APIENTRY alcGetStringiSOFT(ALCdevice *device, ALCenum paramName, ALCsizei index);
|
||||||
|
ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCint *attribs);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_gain_clamp_ex
|
||||||
|
#define AL_SOFT_gain_clamp_ex 1
|
||||||
|
#define AL_GAIN_LIMIT_SOFT 0x200E
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_source_resampler
|
||||||
|
#define AL_SOFT_source_resampler
|
||||||
|
#define AL_NUM_RESAMPLERS_SOFT 0x1210
|
||||||
|
#define AL_DEFAULT_RESAMPLER_SOFT 0x1211
|
||||||
|
#define AL_SOURCE_RESAMPLER_SOFT 0x1212
|
||||||
|
#define AL_RESAMPLER_NAME_SOFT 0x1213
|
||||||
|
typedef const ALchar* (AL_APIENTRY*LPALGETSTRINGISOFT)(ALenum pname, ALsizei index);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_source_spatialize
|
||||||
|
#define AL_SOFT_source_spatialize
|
||||||
|
#define AL_SOURCE_SPATIALIZE_SOFT 0x1214
|
||||||
|
#define AL_AUTO_SOFT 0x0002
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_SOFT_output_limiter
|
||||||
|
#define ALC_SOFT_output_limiter
|
||||||
|
#define ALC_OUTPUT_LIMITER_SOFT 0x199A
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_SOFT_device_clock
|
||||||
|
#define ALC_SOFT_device_clock 1
|
||||||
|
typedef int64_t ALCint64SOFT;
|
||||||
|
typedef uint64_t ALCuint64SOFT;
|
||||||
|
#define ALC_DEVICE_CLOCK_SOFT 0x1600
|
||||||
|
#define ALC_DEVICE_LATENCY_SOFT 0x1601
|
||||||
|
#define ALC_DEVICE_CLOCK_LATENCY_SOFT 0x1602
|
||||||
|
#define AL_SAMPLE_OFFSET_CLOCK_SOFT 0x1202
|
||||||
|
#define AL_SEC_OFFSET_CLOCK_SOFT 0x1203
|
||||||
|
typedef void (ALC_APIENTRY*LPALCGETINTEGER64VSOFT)(ALCdevice *device, ALCenum pname, ALsizei size, ALCint64SOFT *values);
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
ALC_API void ALC_APIENTRY alcGetInteger64vSOFT(ALCdevice *device, ALCenum pname, ALsizei size, ALCint64SOFT *values);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_direct_channels_remix
|
||||||
|
#define AL_SOFT_direct_channels_remix 1
|
||||||
|
#define AL_DROP_UNMATCHED_SOFT 0x0001
|
||||||
|
#define AL_REMIX_UNMATCHED_SOFT 0x0002
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_SOFT_bformat_ex
|
||||||
|
#define AL_SOFT_bformat_ex 1
|
||||||
|
#define AL_AMBISONIC_LAYOUT_SOFT 0x1997
|
||||||
|
#define AL_AMBISONIC_SCALING_SOFT 0x1998
|
||||||
|
|
||||||
|
/* Ambisonic layouts */
|
||||||
|
#define AL_FUMA_SOFT 0x0000
|
||||||
|
#define AL_ACN_SOFT 0x0001
|
||||||
|
|
||||||
|
/* Ambisonic scalings (normalization) */
|
||||||
|
/*#define AL_FUMA_SOFT*/
|
||||||
|
#define AL_SN3D_SOFT 0x0001
|
||||||
|
#define AL_N3D_SOFT 0x0002
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
3
openal-soft/include/AL/efx-creative.h
Normal file
3
openal-soft/include/AL/efx-creative.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/* The tokens that would be defined here are already defined in efx.h. This
|
||||||
|
* empty file is here to provide compatibility with Windows-based projects
|
||||||
|
* that would include it. */
|
402
openal-soft/include/AL/efx-presets.h
Normal file
402
openal-soft/include/AL/efx-presets.h
Normal file
|
@ -0,0 +1,402 @@
|
||||||
|
/* Reverb presets for EFX */
|
||||||
|
|
||||||
|
#ifndef EFX_PRESETS_H
|
||||||
|
#define EFX_PRESETS_H
|
||||||
|
|
||||||
|
#ifndef EFXEAXREVERBPROPERTIES_DEFINED
|
||||||
|
#define EFXEAXREVERBPROPERTIES_DEFINED
|
||||||
|
typedef struct {
|
||||||
|
float flDensity;
|
||||||
|
float flDiffusion;
|
||||||
|
float flGain;
|
||||||
|
float flGainHF;
|
||||||
|
float flGainLF;
|
||||||
|
float flDecayTime;
|
||||||
|
float flDecayHFRatio;
|
||||||
|
float flDecayLFRatio;
|
||||||
|
float flReflectionsGain;
|
||||||
|
float flReflectionsDelay;
|
||||||
|
float flReflectionsPan[3];
|
||||||
|
float flLateReverbGain;
|
||||||
|
float flLateReverbDelay;
|
||||||
|
float flLateReverbPan[3];
|
||||||
|
float flEchoTime;
|
||||||
|
float flEchoDepth;
|
||||||
|
float flModulationTime;
|
||||||
|
float flModulationDepth;
|
||||||
|
float flAirAbsorptionGainHF;
|
||||||
|
float flHFReference;
|
||||||
|
float flLFReference;
|
||||||
|
float flRoomRolloffFactor;
|
||||||
|
int iDecayHFLimit;
|
||||||
|
} EFXEAXREVERBPROPERTIES, *LPEFXEAXREVERBPROPERTIES;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Default Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_GENERIC \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.8913f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PADDEDCELL \
|
||||||
|
{ 0.1715f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.1700f, 0.1000f, 1.0000f, 0.2500f, 0.0010f, { 0.0000f, 0.0000f, 0.0000f }, 1.2691f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ROOM \
|
||||||
|
{ 0.4287f, 1.0000f, 0.3162f, 0.5929f, 1.0000f, 0.4000f, 0.8300f, 1.0000f, 0.1503f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.0629f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_BATHROOM \
|
||||||
|
{ 0.1715f, 1.0000f, 0.3162f, 0.2512f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.6531f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 3.2734f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_LIVINGROOM \
|
||||||
|
{ 0.9766f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.5000f, 0.1000f, 1.0000f, 0.2051f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2805f, 0.0040f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_STONEROOM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 2.3100f, 0.6400f, 1.0000f, 0.4411f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1003f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_AUDITORIUM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.5781f, 1.0000f, 4.3200f, 0.5900f, 1.0000f, 0.4032f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7170f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CONCERTHALL \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.5623f, 1.0000f, 3.9200f, 0.7000f, 1.0000f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.9977f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CAVE \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 2.9100f, 1.3000f, 1.0000f, 0.5000f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.7063f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ARENA \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.4477f, 1.0000f, 7.2400f, 0.3300f, 1.0000f, 0.2612f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.0186f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_HANGAR \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 10.0500f, 0.2300f, 1.0000f, 0.5000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2560f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CARPETEDHALLWAY \
|
||||||
|
{ 0.4287f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 0.3000f, 0.1000f, 1.0000f, 0.1215f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.1531f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_HALLWAY \
|
||||||
|
{ 0.3645f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 1.4900f, 0.5900f, 1.0000f, 0.2458f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.6615f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_STONECORRIDOR \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.7612f, 1.0000f, 2.7000f, 0.7900f, 1.0000f, 0.2472f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 1.5758f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ALLEY \
|
||||||
|
{ 1.0000f, 0.3000f, 0.3162f, 0.7328f, 1.0000f, 1.4900f, 0.8600f, 1.0000f, 0.2500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.9954f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.9500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FOREST \
|
||||||
|
{ 1.0000f, 0.3000f, 0.3162f, 0.0224f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.0525f, 0.1620f, { 0.0000f, 0.0000f, 0.0000f }, 0.7682f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY \
|
||||||
|
{ 1.0000f, 0.5000f, 0.3162f, 0.3981f, 1.0000f, 1.4900f, 0.6700f, 1.0000f, 0.0730f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1427f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_MOUNTAINS \
|
||||||
|
{ 1.0000f, 0.2700f, 0.3162f, 0.0562f, 1.0000f, 1.4900f, 0.2100f, 1.0000f, 0.0407f, 0.3000f, { 0.0000f, 0.0000f, 0.0000f }, 0.1919f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_QUARRY \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0000f, 0.0610f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.7000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PLAIN \
|
||||||
|
{ 1.0000f, 0.2100f, 0.3162f, 0.1000f, 1.0000f, 1.4900f, 0.5000f, 1.0000f, 0.0585f, 0.1790f, { 0.0000f, 0.0000f, 0.0000f }, 0.1089f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PARKINGLOT \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 1.6500f, 1.5000f, 1.0000f, 0.2082f, 0.0080f, { 0.0000f, 0.0000f, 0.0000f }, 0.2652f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SEWERPIPE \
|
||||||
|
{ 0.3071f, 0.8000f, 0.3162f, 0.3162f, 1.0000f, 2.8100f, 0.1400f, 1.0000f, 1.6387f, 0.0140f, { 0.0000f, 0.0000f, 0.0000f }, 3.2471f, 0.0210f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_UNDERWATER \
|
||||||
|
{ 0.3645f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 1.4900f, 0.1000f, 1.0000f, 0.5963f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 7.0795f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 1.1800f, 0.3480f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRUGGED \
|
||||||
|
{ 0.4287f, 0.5000f, 0.3162f, 1.0000f, 1.0000f, 8.3900f, 1.3900f, 1.0000f, 0.8760f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 3.1081f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DIZZY \
|
||||||
|
{ 0.3645f, 0.6000f, 0.3162f, 0.6310f, 1.0000f, 17.2300f, 0.5600f, 1.0000f, 0.1392f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4937f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.8100f, 0.3100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PSYCHOTIC \
|
||||||
|
{ 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
/* Castle Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_SMALLROOM \
|
||||||
|
{ 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 1.2200f, 0.8300f, 0.3100f, 0.8913f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_SHORTPASSAGE \
|
||||||
|
{ 1.0000f, 0.8900f, 0.3162f, 0.3162f, 0.1000f, 2.3200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_MEDIUMROOM \
|
||||||
|
{ 1.0000f, 0.9300f, 0.3162f, 0.2818f, 0.1000f, 2.0400f, 0.8300f, 0.4600f, 0.6310f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1550f, 0.0300f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_LARGEROOM \
|
||||||
|
{ 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.1259f, 2.5300f, 0.8300f, 0.5000f, 0.4467f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1850f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_LONGPASSAGE \
|
||||||
|
{ 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 3.4200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_HALL \
|
||||||
|
{ 1.0000f, 0.8100f, 0.3162f, 0.2818f, 0.1778f, 3.1400f, 0.7900f, 0.6200f, 0.1778f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_CUPBOARD \
|
||||||
|
{ 1.0000f, 0.8900f, 0.3162f, 0.2818f, 0.1000f, 0.6700f, 0.8700f, 0.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 3.5481f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_COURTYARD \
|
||||||
|
{ 1.0000f, 0.4200f, 0.3162f, 0.4467f, 0.1995f, 2.1300f, 0.6100f, 0.2300f, 0.2239f, 0.1600f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3700f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CASTLE_ALCOVE \
|
||||||
|
{ 1.0000f, 0.8900f, 0.3162f, 0.5012f, 0.1000f, 1.6400f, 0.8700f, 0.3100f, 1.0000f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Factory Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_SMALLROOM \
|
||||||
|
{ 0.3645f, 0.8200f, 0.3162f, 0.7943f, 0.5012f, 1.7200f, 0.6500f, 1.3100f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.1190f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_SHORTPASSAGE \
|
||||||
|
{ 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 2.5300f, 0.6500f, 1.3100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_MEDIUMROOM \
|
||||||
|
{ 0.4287f, 0.8200f, 0.2512f, 0.7943f, 0.5012f, 2.7600f, 0.6500f, 1.3100f, 0.2818f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1740f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_LARGEROOM \
|
||||||
|
{ 0.4287f, 0.7500f, 0.2512f, 0.7079f, 0.6310f, 4.2400f, 0.5100f, 1.3100f, 0.1778f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2310f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_LONGPASSAGE \
|
||||||
|
{ 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 4.0600f, 0.6500f, 1.3100f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_HALL \
|
||||||
|
{ 0.4287f, 0.7500f, 0.3162f, 0.7079f, 0.6310f, 7.4300f, 0.5100f, 1.3100f, 0.0631f, 0.0730f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_CUPBOARD \
|
||||||
|
{ 0.3071f, 0.6300f, 0.2512f, 0.7943f, 0.5012f, 0.4900f, 0.6500f, 1.3100f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.1070f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_COURTYARD \
|
||||||
|
{ 0.3071f, 0.5700f, 0.3162f, 0.3162f, 0.6310f, 2.3200f, 0.2900f, 0.5600f, 0.2239f, 0.1400f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2900f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_FACTORY_ALCOVE \
|
||||||
|
{ 0.3645f, 0.5900f, 0.2512f, 0.7943f, 0.5012f, 3.1400f, 0.6500f, 1.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1140f, 0.1000f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Ice Palace Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_SMALLROOM \
|
||||||
|
{ 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 1.5100f, 1.5300f, 0.2700f, 0.8913f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1640f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_SHORTPASSAGE \
|
||||||
|
{ 1.0000f, 0.7500f, 0.3162f, 0.5623f, 0.2818f, 1.7900f, 1.4600f, 0.2800f, 0.5012f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_MEDIUMROOM \
|
||||||
|
{ 1.0000f, 0.8700f, 0.3162f, 0.5623f, 0.4467f, 2.2200f, 1.5300f, 0.3200f, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_LARGEROOM \
|
||||||
|
{ 1.0000f, 0.8100f, 0.3162f, 0.5623f, 0.4467f, 3.1400f, 1.5300f, 0.3200f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_LONGPASSAGE \
|
||||||
|
{ 1.0000f, 0.7700f, 0.3162f, 0.5623f, 0.3981f, 3.0100f, 1.4600f, 0.2800f, 0.7943f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.0400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_HALL \
|
||||||
|
{ 1.0000f, 0.7600f, 0.3162f, 0.4467f, 0.5623f, 5.4900f, 1.5300f, 0.3800f, 0.1122f, 0.0540f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0520f, { 0.0000f, 0.0000f, 0.0000f }, 0.2260f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_CUPBOARD \
|
||||||
|
{ 1.0000f, 0.8300f, 0.3162f, 0.5012f, 0.2239f, 0.7600f, 1.5300f, 0.2600f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1430f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_COURTYARD \
|
||||||
|
{ 1.0000f, 0.5900f, 0.3162f, 0.2818f, 0.3162f, 2.0400f, 1.2000f, 0.3800f, 0.3162f, 0.1730f, { 0.0000f, 0.0000f, 0.0000f }, 0.3162f, 0.0430f, { 0.0000f, 0.0000f, 0.0000f }, 0.2350f, 0.4800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_ICEPALACE_ALCOVE \
|
||||||
|
{ 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 2.7600f, 1.4600f, 0.2800f, 1.1220f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1610f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Space Station Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_SMALLROOM \
|
||||||
|
{ 0.2109f, 0.7000f, 0.3162f, 0.7079f, 0.8913f, 1.7200f, 0.8200f, 0.5500f, 0.7943f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 0.1880f, 0.2600f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_SHORTPASSAGE \
|
||||||
|
{ 0.2109f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 3.5700f, 0.5000f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1720f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_MEDIUMROOM \
|
||||||
|
{ 0.2109f, 0.7500f, 0.3162f, 0.6310f, 0.8913f, 3.0100f, 0.5000f, 0.5500f, 0.3981f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2090f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_LARGEROOM \
|
||||||
|
{ 0.3645f, 0.8100f, 0.3162f, 0.6310f, 0.8913f, 3.8900f, 0.3800f, 0.6100f, 0.3162f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2330f, 0.2800f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_LONGPASSAGE \
|
||||||
|
{ 0.4287f, 0.8200f, 0.3162f, 0.6310f, 0.8913f, 4.6200f, 0.6200f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_HALL \
|
||||||
|
{ 0.4287f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 7.1100f, 0.3800f, 0.6100f, 0.1778f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2500f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_CUPBOARD \
|
||||||
|
{ 0.1715f, 0.5600f, 0.3162f, 0.7079f, 0.8913f, 0.7900f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1810f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPACESTATION_ALCOVE \
|
||||||
|
{ 0.2109f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.1600f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1920f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Wooden Galleon Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_SMALLROOM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.1122f, 0.3162f, 0.7900f, 0.3200f, 0.8700f, 1.0000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_SHORTPASSAGE \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.7500f, 0.5000f, 0.8700f, 0.8913f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_MEDIUMROOM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.2818f, 1.4700f, 0.4200f, 0.8200f, 0.8913f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_LARGEROOM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.2818f, 2.6500f, 0.3300f, 0.8200f, 0.8913f, 0.0660f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_LONGPASSAGE \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.3162f, 1.9900f, 0.4000f, 0.7900f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4467f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_HALL \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.0794f, 0.2818f, 3.4500f, 0.3000f, 0.8200f, 0.8913f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_CUPBOARD \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.1413f, 0.3162f, 0.5600f, 0.4600f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_COURTYARD \
|
||||||
|
{ 1.0000f, 0.6500f, 0.3162f, 0.0794f, 0.3162f, 1.7900f, 0.3500f, 0.7900f, 0.5623f, 0.1230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_WOODEN_ALCOVE \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.2200f, 0.6200f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Sports Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_EMPTYSTADIUM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.4467f, 0.7943f, 6.2600f, 0.5100f, 1.1000f, 0.0631f, 0.1830f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_SQUASHCOURT \
|
||||||
|
{ 1.0000f, 0.7500f, 0.3162f, 0.3162f, 0.7943f, 2.2200f, 0.9100f, 1.1600f, 0.4467f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1260f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL \
|
||||||
|
{ 1.0000f, 0.7000f, 0.3162f, 0.7943f, 0.8913f, 2.7600f, 1.2500f, 1.1400f, 0.6310f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_LARGESWIMMINGPOOL \
|
||||||
|
{ 1.0000f, 0.8200f, 0.3162f, 0.7943f, 1.0000f, 5.4900f, 1.3100f, 1.1400f, 0.4467f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2220f, 0.5500f, 1.1590f, 0.2100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_GYMNASIUM \
|
||||||
|
{ 1.0000f, 0.8100f, 0.3162f, 0.4467f, 0.8913f, 3.1400f, 1.0600f, 1.3500f, 0.3981f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0450f, { 0.0000f, 0.0000f, 0.0000f }, 0.1460f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_FULLSTADIUM \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.0708f, 0.7943f, 5.2500f, 0.1700f, 0.8000f, 0.1000f, 0.1880f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SPORT_STADIUMTANNOY \
|
||||||
|
{ 1.0000f, 0.7800f, 0.3162f, 0.5623f, 0.5012f, 2.5300f, 0.8800f, 0.6800f, 0.2818f, 0.2300f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Prefab Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PREFAB_WORKSHOP \
|
||||||
|
{ 0.4287f, 1.0000f, 0.3162f, 0.1413f, 0.3981f, 0.7600f, 1.0000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PREFAB_SCHOOLROOM \
|
||||||
|
{ 0.4022f, 0.6900f, 0.3162f, 0.6310f, 0.5012f, 0.9800f, 0.4500f, 0.1800f, 1.4125f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PREFAB_PRACTISEROOM \
|
||||||
|
{ 0.4022f, 0.8700f, 0.3162f, 0.3981f, 0.5012f, 1.1200f, 0.5600f, 0.1800f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PREFAB_OUTHOUSE \
|
||||||
|
{ 1.0000f, 0.8200f, 0.3162f, 0.1122f, 0.1585f, 1.3800f, 0.3800f, 0.3500f, 0.8913f, 0.0240f, { 0.0000f, 0.0000f, -0.0000f }, 0.6310f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.1210f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PREFAB_CARAVAN \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.1259f, 0.4300f, 1.5000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
/* Dome and Pipe Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DOME_TOMB \
|
||||||
|
{ 1.0000f, 0.7900f, 0.3162f, 0.3548f, 0.2239f, 4.1800f, 0.2100f, 0.1000f, 0.3868f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 1.6788f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PIPE_SMALL \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 5.0400f, 0.1000f, 0.1000f, 0.5012f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 2.5119f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DOME_SAINTPAULS \
|
||||||
|
{ 1.0000f, 0.8700f, 0.3162f, 0.3548f, 0.2239f, 10.4800f, 0.1900f, 0.1000f, 0.1778f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0420f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PIPE_LONGTHIN \
|
||||||
|
{ 0.2560f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 9.2100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PIPE_LARGE \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 8.4500f, 0.1000f, 0.1000f, 0.3981f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_PIPE_RESONANT \
|
||||||
|
{ 0.1373f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 6.8100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
/* Outdoors Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_OUTDOORS_BACKYARD \
|
||||||
|
{ 1.0000f, 0.4500f, 0.3162f, 0.2512f, 0.5012f, 1.1200f, 0.3400f, 0.4600f, 0.4467f, 0.0690f, { 0.0000f, 0.0000f, -0.0000f }, 0.7079f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_OUTDOORS_ROLLINGPLAINS \
|
||||||
|
{ 1.0000f, 0.0000f, 0.3162f, 0.0112f, 0.6310f, 2.1300f, 0.2100f, 0.4600f, 0.1778f, 0.3000f, { 0.0000f, 0.0000f, -0.0000f }, 0.4467f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_OUTDOORS_DEEPCANYON \
|
||||||
|
{ 1.0000f, 0.7400f, 0.3162f, 0.1778f, 0.6310f, 3.8900f, 0.2100f, 0.4600f, 0.3162f, 0.2230f, { 0.0000f, 0.0000f, -0.0000f }, 0.3548f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_OUTDOORS_CREEK \
|
||||||
|
{ 1.0000f, 0.3500f, 0.3162f, 0.1778f, 0.5012f, 2.1300f, 0.2100f, 0.4600f, 0.3981f, 0.1150f, { 0.0000f, 0.0000f, -0.0000f }, 0.1995f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_OUTDOORS_VALLEY \
|
||||||
|
{ 1.0000f, 0.2800f, 0.3162f, 0.0282f, 0.1585f, 2.8800f, 0.2600f, 0.3500f, 0.1413f, 0.2630f, { 0.0000f, 0.0000f, -0.0000f }, 0.3981f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
/* Mood Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_MOOD_HEAVEN \
|
||||||
|
{ 1.0000f, 0.9400f, 0.3162f, 0.7943f, 0.4467f, 5.0400f, 1.1200f, 0.5600f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0800f, 2.7420f, 0.0500f, 0.9977f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_MOOD_HELL \
|
||||||
|
{ 1.0000f, 0.5700f, 0.3162f, 0.3548f, 0.4467f, 3.5700f, 0.4900f, 2.0000f, 0.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1100f, 0.0400f, 2.1090f, 0.5200f, 0.9943f, 5000.0000f, 139.5000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_MOOD_MEMORY \
|
||||||
|
{ 1.0000f, 0.8500f, 0.3162f, 0.6310f, 0.3548f, 4.0600f, 0.8200f, 0.5600f, 0.0398f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.4740f, 0.4500f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
/* Driving Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \
|
||||||
|
{ 1.0000f, 0.0000f, 0.3162f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_PITGARAGE \
|
||||||
|
{ 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_INCAR_RACER \
|
||||||
|
{ 0.0832f, 0.8000f, 0.3162f, 1.0000f, 0.7943f, 0.1700f, 2.0000f, 0.4100f, 1.7783f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_INCAR_SPORTS \
|
||||||
|
{ 0.0832f, 0.8000f, 0.3162f, 0.6310f, 1.0000f, 0.1700f, 0.7500f, 0.4100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_INCAR_LUXURY \
|
||||||
|
{ 0.2560f, 1.0000f, 0.3162f, 0.1000f, 0.5012f, 0.1300f, 0.4100f, 0.4600f, 0.7943f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_FULLGRANDSTAND \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 0.2818f, 0.6310f, 3.0100f, 1.3700f, 1.2800f, 0.3548f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.1778f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_EMPTYGRANDSTAND \
|
||||||
|
{ 1.0000f, 1.0000f, 0.3162f, 1.0000f, 0.7943f, 4.6200f, 1.7500f, 1.4000f, 0.2082f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DRIVING_TUNNEL \
|
||||||
|
{ 1.0000f, 0.8100f, 0.3162f, 0.3981f, 0.8913f, 3.4200f, 0.9400f, 1.3100f, 0.7079f, 0.0510f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.0500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 155.3000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* City Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY_STREETS \
|
||||||
|
{ 1.0000f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.7900f, 1.1200f, 0.9100f, 0.2818f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 0.1995f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY_SUBWAY \
|
||||||
|
{ 1.0000f, 0.7400f, 0.3162f, 0.7079f, 0.8913f, 3.0100f, 1.2300f, 0.9100f, 0.7079f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY_MUSEUM \
|
||||||
|
{ 1.0000f, 0.8200f, 0.3162f, 0.1778f, 0.1778f, 3.2800f, 1.4000f, 0.5700f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY_LIBRARY \
|
||||||
|
{ 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.0891f, 2.7600f, 0.8900f, 0.4100f, 0.3548f, 0.0290f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY_UNDERPASS \
|
||||||
|
{ 1.0000f, 0.8200f, 0.3162f, 0.4467f, 0.8913f, 3.5700f, 1.1200f, 0.9100f, 0.3981f, 0.0590f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1400f, 0.2500f, 0.0000f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CITY_ABANDONED \
|
||||||
|
{ 1.0000f, 0.6900f, 0.3162f, 0.7943f, 0.8913f, 3.2800f, 1.1700f, 0.9100f, 0.4467f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9966f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
/* Misc. Presets */
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_DUSTYROOM \
|
||||||
|
{ 0.3645f, 0.5600f, 0.3162f, 0.7943f, 0.7079f, 1.7900f, 0.3800f, 0.2100f, 0.5012f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0060f, { 0.0000f, 0.0000f, 0.0000f }, 0.2020f, 0.0500f, 0.2500f, 0.0000f, 0.9886f, 13046.0000f, 163.3000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_CHAPEL \
|
||||||
|
{ 1.0000f, 0.8400f, 0.3162f, 0.5623f, 1.0000f, 4.6200f, 0.6400f, 1.2300f, 0.4467f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.1100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||||
|
|
||||||
|
#define EFX_REVERB_PRESET_SMALLWATERROOM \
|
||||||
|
{ 1.0000f, 0.7000f, 0.3162f, 0.4477f, 1.0000f, 1.5100f, 1.2500f, 1.1400f, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||||
|
|
||||||
|
#endif /* EFX_PRESETS_H */
|
762
openal-soft/include/AL/efx.h
Normal file
762
openal-soft/include/AL/efx.h
Normal file
|
@ -0,0 +1,762 @@
|
||||||
|
#ifndef AL_EFX_H
|
||||||
|
#define AL_EFX_H
|
||||||
|
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
|
#include "alc.h"
|
||||||
|
#include "al.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ALC_EXT_EFX_NAME "ALC_EXT_EFX"
|
||||||
|
|
||||||
|
#define ALC_EFX_MAJOR_VERSION 0x20001
|
||||||
|
#define ALC_EFX_MINOR_VERSION 0x20002
|
||||||
|
#define ALC_MAX_AUXILIARY_SENDS 0x20003
|
||||||
|
|
||||||
|
|
||||||
|
/* Listener properties. */
|
||||||
|
#define AL_METERS_PER_UNIT 0x20004
|
||||||
|
|
||||||
|
/* Source properties. */
|
||||||
|
#define AL_DIRECT_FILTER 0x20005
|
||||||
|
#define AL_AUXILIARY_SEND_FILTER 0x20006
|
||||||
|
#define AL_AIR_ABSORPTION_FACTOR 0x20007
|
||||||
|
#define AL_ROOM_ROLLOFF_FACTOR 0x20008
|
||||||
|
#define AL_CONE_OUTER_GAINHF 0x20009
|
||||||
|
#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
|
||||||
|
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
|
||||||
|
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
|
||||||
|
|
||||||
|
|
||||||
|
/* Effect properties. */
|
||||||
|
|
||||||
|
/* Reverb effect parameters */
|
||||||
|
#define AL_REVERB_DENSITY 0x0001
|
||||||
|
#define AL_REVERB_DIFFUSION 0x0002
|
||||||
|
#define AL_REVERB_GAIN 0x0003
|
||||||
|
#define AL_REVERB_GAINHF 0x0004
|
||||||
|
#define AL_REVERB_DECAY_TIME 0x0005
|
||||||
|
#define AL_REVERB_DECAY_HFRATIO 0x0006
|
||||||
|
#define AL_REVERB_REFLECTIONS_GAIN 0x0007
|
||||||
|
#define AL_REVERB_REFLECTIONS_DELAY 0x0008
|
||||||
|
#define AL_REVERB_LATE_REVERB_GAIN 0x0009
|
||||||
|
#define AL_REVERB_LATE_REVERB_DELAY 0x000A
|
||||||
|
#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B
|
||||||
|
#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C
|
||||||
|
#define AL_REVERB_DECAY_HFLIMIT 0x000D
|
||||||
|
|
||||||
|
/* EAX Reverb effect parameters */
|
||||||
|
#define AL_EAXREVERB_DENSITY 0x0001
|
||||||
|
#define AL_EAXREVERB_DIFFUSION 0x0002
|
||||||
|
#define AL_EAXREVERB_GAIN 0x0003
|
||||||
|
#define AL_EAXREVERB_GAINHF 0x0004
|
||||||
|
#define AL_EAXREVERB_GAINLF 0x0005
|
||||||
|
#define AL_EAXREVERB_DECAY_TIME 0x0006
|
||||||
|
#define AL_EAXREVERB_DECAY_HFRATIO 0x0007
|
||||||
|
#define AL_EAXREVERB_DECAY_LFRATIO 0x0008
|
||||||
|
#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009
|
||||||
|
#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A
|
||||||
|
#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B
|
||||||
|
#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C
|
||||||
|
#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D
|
||||||
|
#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E
|
||||||
|
#define AL_EAXREVERB_ECHO_TIME 0x000F
|
||||||
|
#define AL_EAXREVERB_ECHO_DEPTH 0x0010
|
||||||
|
#define AL_EAXREVERB_MODULATION_TIME 0x0011
|
||||||
|
#define AL_EAXREVERB_MODULATION_DEPTH 0x0012
|
||||||
|
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013
|
||||||
|
#define AL_EAXREVERB_HFREFERENCE 0x0014
|
||||||
|
#define AL_EAXREVERB_LFREFERENCE 0x0015
|
||||||
|
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016
|
||||||
|
#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017
|
||||||
|
|
||||||
|
/* Chorus effect parameters */
|
||||||
|
#define AL_CHORUS_WAVEFORM 0x0001
|
||||||
|
#define AL_CHORUS_PHASE 0x0002
|
||||||
|
#define AL_CHORUS_RATE 0x0003
|
||||||
|
#define AL_CHORUS_DEPTH 0x0004
|
||||||
|
#define AL_CHORUS_FEEDBACK 0x0005
|
||||||
|
#define AL_CHORUS_DELAY 0x0006
|
||||||
|
|
||||||
|
/* Distortion effect parameters */
|
||||||
|
#define AL_DISTORTION_EDGE 0x0001
|
||||||
|
#define AL_DISTORTION_GAIN 0x0002
|
||||||
|
#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003
|
||||||
|
#define AL_DISTORTION_EQCENTER 0x0004
|
||||||
|
#define AL_DISTORTION_EQBANDWIDTH 0x0005
|
||||||
|
|
||||||
|
/* Echo effect parameters */
|
||||||
|
#define AL_ECHO_DELAY 0x0001
|
||||||
|
#define AL_ECHO_LRDELAY 0x0002
|
||||||
|
#define AL_ECHO_DAMPING 0x0003
|
||||||
|
#define AL_ECHO_FEEDBACK 0x0004
|
||||||
|
#define AL_ECHO_SPREAD 0x0005
|
||||||
|
|
||||||
|
/* Flanger effect parameters */
|
||||||
|
#define AL_FLANGER_WAVEFORM 0x0001
|
||||||
|
#define AL_FLANGER_PHASE 0x0002
|
||||||
|
#define AL_FLANGER_RATE 0x0003
|
||||||
|
#define AL_FLANGER_DEPTH 0x0004
|
||||||
|
#define AL_FLANGER_FEEDBACK 0x0005
|
||||||
|
#define AL_FLANGER_DELAY 0x0006
|
||||||
|
|
||||||
|
/* Frequency shifter effect parameters */
|
||||||
|
#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001
|
||||||
|
#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002
|
||||||
|
#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003
|
||||||
|
|
||||||
|
/* Vocal morpher effect parameters */
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEA 0x0001
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEB 0x0003
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM 0x0005
|
||||||
|
#define AL_VOCAL_MORPHER_RATE 0x0006
|
||||||
|
|
||||||
|
/* Pitchshifter effect parameters */
|
||||||
|
#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001
|
||||||
|
#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002
|
||||||
|
|
||||||
|
/* Ringmodulator effect parameters */
|
||||||
|
#define AL_RING_MODULATOR_FREQUENCY 0x0001
|
||||||
|
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002
|
||||||
|
#define AL_RING_MODULATOR_WAVEFORM 0x0003
|
||||||
|
|
||||||
|
/* Autowah effect parameters */
|
||||||
|
#define AL_AUTOWAH_ATTACK_TIME 0x0001
|
||||||
|
#define AL_AUTOWAH_RELEASE_TIME 0x0002
|
||||||
|
#define AL_AUTOWAH_RESONANCE 0x0003
|
||||||
|
#define AL_AUTOWAH_PEAK_GAIN 0x0004
|
||||||
|
|
||||||
|
/* Compressor effect parameters */
|
||||||
|
#define AL_COMPRESSOR_ONOFF 0x0001
|
||||||
|
|
||||||
|
/* Equalizer effect parameters */
|
||||||
|
#define AL_EQUALIZER_LOW_GAIN 0x0001
|
||||||
|
#define AL_EQUALIZER_LOW_CUTOFF 0x0002
|
||||||
|
#define AL_EQUALIZER_MID1_GAIN 0x0003
|
||||||
|
#define AL_EQUALIZER_MID1_CENTER 0x0004
|
||||||
|
#define AL_EQUALIZER_MID1_WIDTH 0x0005
|
||||||
|
#define AL_EQUALIZER_MID2_GAIN 0x0006
|
||||||
|
#define AL_EQUALIZER_MID2_CENTER 0x0007
|
||||||
|
#define AL_EQUALIZER_MID2_WIDTH 0x0008
|
||||||
|
#define AL_EQUALIZER_HIGH_GAIN 0x0009
|
||||||
|
#define AL_EQUALIZER_HIGH_CUTOFF 0x000A
|
||||||
|
|
||||||
|
/* Effect type */
|
||||||
|
#define AL_EFFECT_FIRST_PARAMETER 0x0000
|
||||||
|
#define AL_EFFECT_LAST_PARAMETER 0x8000
|
||||||
|
#define AL_EFFECT_TYPE 0x8001
|
||||||
|
|
||||||
|
/* Effect types, used with the AL_EFFECT_TYPE property */
|
||||||
|
#define AL_EFFECT_NULL 0x0000
|
||||||
|
#define AL_EFFECT_REVERB 0x0001
|
||||||
|
#define AL_EFFECT_CHORUS 0x0002
|
||||||
|
#define AL_EFFECT_DISTORTION 0x0003
|
||||||
|
#define AL_EFFECT_ECHO 0x0004
|
||||||
|
#define AL_EFFECT_FLANGER 0x0005
|
||||||
|
#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006
|
||||||
|
#define AL_EFFECT_VOCAL_MORPHER 0x0007
|
||||||
|
#define AL_EFFECT_PITCH_SHIFTER 0x0008
|
||||||
|
#define AL_EFFECT_RING_MODULATOR 0x0009
|
||||||
|
#define AL_EFFECT_AUTOWAH 0x000A
|
||||||
|
#define AL_EFFECT_COMPRESSOR 0x000B
|
||||||
|
#define AL_EFFECT_EQUALIZER 0x000C
|
||||||
|
#define AL_EFFECT_EAXREVERB 0x8000
|
||||||
|
|
||||||
|
/* Auxiliary Effect Slot properties. */
|
||||||
|
#define AL_EFFECTSLOT_EFFECT 0x0001
|
||||||
|
#define AL_EFFECTSLOT_GAIN 0x0002
|
||||||
|
#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
|
||||||
|
|
||||||
|
/* NULL Auxiliary Slot ID to disable a source send. */
|
||||||
|
#define AL_EFFECTSLOT_NULL 0x0000
|
||||||
|
|
||||||
|
|
||||||
|
/* Filter properties. */
|
||||||
|
|
||||||
|
/* Lowpass filter parameters */
|
||||||
|
#define AL_LOWPASS_GAIN 0x0001
|
||||||
|
#define AL_LOWPASS_GAINHF 0x0002
|
||||||
|
|
||||||
|
/* Highpass filter parameters */
|
||||||
|
#define AL_HIGHPASS_GAIN 0x0001
|
||||||
|
#define AL_HIGHPASS_GAINLF 0x0002
|
||||||
|
|
||||||
|
/* Bandpass filter parameters */
|
||||||
|
#define AL_BANDPASS_GAIN 0x0001
|
||||||
|
#define AL_BANDPASS_GAINLF 0x0002
|
||||||
|
#define AL_BANDPASS_GAINHF 0x0003
|
||||||
|
|
||||||
|
/* Filter type */
|
||||||
|
#define AL_FILTER_FIRST_PARAMETER 0x0000
|
||||||
|
#define AL_FILTER_LAST_PARAMETER 0x8000
|
||||||
|
#define AL_FILTER_TYPE 0x8001
|
||||||
|
|
||||||
|
/* Filter types, used with the AL_FILTER_TYPE property */
|
||||||
|
#define AL_FILTER_NULL 0x0000
|
||||||
|
#define AL_FILTER_LOWPASS 0x0001
|
||||||
|
#define AL_FILTER_HIGHPASS 0x0002
|
||||||
|
#define AL_FILTER_BANDPASS 0x0003
|
||||||
|
|
||||||
|
|
||||||
|
/* Effect object function types. */
|
||||||
|
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, const ALuint*);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, const ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, const ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
|
||||||
|
/* Filter object function types. */
|
||||||
|
typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, const ALuint*);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, const ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, const ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
|
||||||
|
/* Auxiliary Effect Slot object function types. */
|
||||||
|
typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, const ALuint*);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, const ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, const ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects);
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat *pflValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
|
||||||
|
|
||||||
|
AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters);
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat *pflValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
|
||||||
|
|
||||||
|
AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint *effectslots);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const ALfloat *pflValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Filter ranges and defaults. */
|
||||||
|
|
||||||
|
/* Lowpass filter */
|
||||||
|
#define AL_LOWPASS_MIN_GAIN (0.0f)
|
||||||
|
#define AL_LOWPASS_MAX_GAIN (1.0f)
|
||||||
|
#define AL_LOWPASS_DEFAULT_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_LOWPASS_MIN_GAINHF (0.0f)
|
||||||
|
#define AL_LOWPASS_MAX_GAINHF (1.0f)
|
||||||
|
#define AL_LOWPASS_DEFAULT_GAINHF (1.0f)
|
||||||
|
|
||||||
|
/* Highpass filter */
|
||||||
|
#define AL_HIGHPASS_MIN_GAIN (0.0f)
|
||||||
|
#define AL_HIGHPASS_MAX_GAIN (1.0f)
|
||||||
|
#define AL_HIGHPASS_DEFAULT_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_HIGHPASS_MIN_GAINLF (0.0f)
|
||||||
|
#define AL_HIGHPASS_MAX_GAINLF (1.0f)
|
||||||
|
#define AL_HIGHPASS_DEFAULT_GAINLF (1.0f)
|
||||||
|
|
||||||
|
/* Bandpass filter */
|
||||||
|
#define AL_BANDPASS_MIN_GAIN (0.0f)
|
||||||
|
#define AL_BANDPASS_MAX_GAIN (1.0f)
|
||||||
|
#define AL_BANDPASS_DEFAULT_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_BANDPASS_MIN_GAINHF (0.0f)
|
||||||
|
#define AL_BANDPASS_MAX_GAINHF (1.0f)
|
||||||
|
#define AL_BANDPASS_DEFAULT_GAINHF (1.0f)
|
||||||
|
|
||||||
|
#define AL_BANDPASS_MIN_GAINLF (0.0f)
|
||||||
|
#define AL_BANDPASS_MAX_GAINLF (1.0f)
|
||||||
|
#define AL_BANDPASS_DEFAULT_GAINLF (1.0f)
|
||||||
|
|
||||||
|
|
||||||
|
/* Effect parameter ranges and defaults. */
|
||||||
|
|
||||||
|
/* Standard reverb effect */
|
||||||
|
#define AL_REVERB_MIN_DENSITY (0.0f)
|
||||||
|
#define AL_REVERB_MAX_DENSITY (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DENSITY (1.0f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DIFFUSION (0.0f)
|
||||||
|
#define AL_REVERB_MAX_DIFFUSION (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DIFFUSION (1.0f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_GAIN (0.0f)
|
||||||
|
#define AL_REVERB_MAX_GAIN (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_GAIN (0.32f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_GAINHF (0.0f)
|
||||||
|
#define AL_REVERB_MAX_GAINHF (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_GAINHF (0.89f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DECAY_TIME (0.1f)
|
||||||
|
#define AL_REVERB_MAX_DECAY_TIME (20.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f)
|
||||||
|
#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f)
|
||||||
|
#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f)
|
||||||
|
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f)
|
||||||
|
#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f)
|
||||||
|
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f)
|
||||||
|
#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f)
|
||||||
|
#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f)
|
||||||
|
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f)
|
||||||
|
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||||
|
#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||||
|
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||||
|
|
||||||
|
/* EAX reverb effect */
|
||||||
|
#define AL_EAXREVERB_MIN_DENSITY (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_DENSITY (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DIFFUSION (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_DIFFUSION (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_GAIN (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_GAIN (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_GAIN (0.32f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_GAINHF (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_GAINHF (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_GAINLF (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_GAINLF (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f)
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f)
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f)
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f)
|
||||||
|
#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f)
|
||||||
|
#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f)
|
||||||
|
#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||||
|
|
||||||
|
/* Chorus effect */
|
||||||
|
#define AL_CHORUS_WAVEFORM_SINUSOID (0)
|
||||||
|
#define AL_CHORUS_WAVEFORM_TRIANGLE (1)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_WAVEFORM (0)
|
||||||
|
#define AL_CHORUS_MAX_WAVEFORM (1)
|
||||||
|
#define AL_CHORUS_DEFAULT_WAVEFORM (1)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_PHASE (-180)
|
||||||
|
#define AL_CHORUS_MAX_PHASE (180)
|
||||||
|
#define AL_CHORUS_DEFAULT_PHASE (90)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_RATE (0.0f)
|
||||||
|
#define AL_CHORUS_MAX_RATE (10.0f)
|
||||||
|
#define AL_CHORUS_DEFAULT_RATE (1.1f)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_DEPTH (0.0f)
|
||||||
|
#define AL_CHORUS_MAX_DEPTH (1.0f)
|
||||||
|
#define AL_CHORUS_DEFAULT_DEPTH (0.1f)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_FEEDBACK (-1.0f)
|
||||||
|
#define AL_CHORUS_MAX_FEEDBACK (1.0f)
|
||||||
|
#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_DELAY (0.0f)
|
||||||
|
#define AL_CHORUS_MAX_DELAY (0.016f)
|
||||||
|
#define AL_CHORUS_DEFAULT_DELAY (0.016f)
|
||||||
|
|
||||||
|
/* Distortion effect */
|
||||||
|
#define AL_DISTORTION_MIN_EDGE (0.0f)
|
||||||
|
#define AL_DISTORTION_MAX_EDGE (1.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_EDGE (0.2f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_GAIN (0.01f)
|
||||||
|
#define AL_DISTORTION_MAX_GAIN (1.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_GAIN (0.05f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f)
|
||||||
|
#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_EQCENTER (80.0f)
|
||||||
|
#define AL_DISTORTION_MAX_EQCENTER (24000.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f)
|
||||||
|
#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f)
|
||||||
|
|
||||||
|
/* Echo effect */
|
||||||
|
#define AL_ECHO_MIN_DELAY (0.0f)
|
||||||
|
#define AL_ECHO_MAX_DELAY (0.207f)
|
||||||
|
#define AL_ECHO_DEFAULT_DELAY (0.1f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_LRDELAY (0.0f)
|
||||||
|
#define AL_ECHO_MAX_LRDELAY (0.404f)
|
||||||
|
#define AL_ECHO_DEFAULT_LRDELAY (0.1f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_DAMPING (0.0f)
|
||||||
|
#define AL_ECHO_MAX_DAMPING (0.99f)
|
||||||
|
#define AL_ECHO_DEFAULT_DAMPING (0.5f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_FEEDBACK (0.0f)
|
||||||
|
#define AL_ECHO_MAX_FEEDBACK (1.0f)
|
||||||
|
#define AL_ECHO_DEFAULT_FEEDBACK (0.5f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_SPREAD (-1.0f)
|
||||||
|
#define AL_ECHO_MAX_SPREAD (1.0f)
|
||||||
|
#define AL_ECHO_DEFAULT_SPREAD (-1.0f)
|
||||||
|
|
||||||
|
/* Flanger effect */
|
||||||
|
#define AL_FLANGER_WAVEFORM_SINUSOID (0)
|
||||||
|
#define AL_FLANGER_WAVEFORM_TRIANGLE (1)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_WAVEFORM (0)
|
||||||
|
#define AL_FLANGER_MAX_WAVEFORM (1)
|
||||||
|
#define AL_FLANGER_DEFAULT_WAVEFORM (1)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_PHASE (-180)
|
||||||
|
#define AL_FLANGER_MAX_PHASE (180)
|
||||||
|
#define AL_FLANGER_DEFAULT_PHASE (0)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_RATE (0.0f)
|
||||||
|
#define AL_FLANGER_MAX_RATE (10.0f)
|
||||||
|
#define AL_FLANGER_DEFAULT_RATE (0.27f)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_DEPTH (0.0f)
|
||||||
|
#define AL_FLANGER_MAX_DEPTH (1.0f)
|
||||||
|
#define AL_FLANGER_DEFAULT_DEPTH (1.0f)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_FEEDBACK (-1.0f)
|
||||||
|
#define AL_FLANGER_MAX_FEEDBACK (1.0f)
|
||||||
|
#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_DELAY (0.0f)
|
||||||
|
#define AL_FLANGER_MAX_DELAY (0.004f)
|
||||||
|
#define AL_FLANGER_DEFAULT_DELAY (0.002f)
|
||||||
|
|
||||||
|
/* Frequency shifter effect */
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f)
|
||||||
|
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0)
|
||||||
|
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2)
|
||||||
|
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0)
|
||||||
|
|
||||||
|
/* Vocal morpher effect */
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_A (0)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_E (1)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_I (2)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_O (3)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_U (4)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AA (5)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AE (6)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AH (7)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AO (8)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_EH (9)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_ER (10)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_IH (11)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_IY (12)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_UH (13)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_UW (14)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_B (15)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_D (16)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_F (17)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_G (18)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_J (19)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_K (20)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_L (21)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_M (22)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_N (23)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_P (24)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_R (25)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_S (26)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_T (27)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_V (28)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_Z (29)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0)
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1)
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_RATE (0.0f)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_RATE (10.0f)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f)
|
||||||
|
|
||||||
|
/* Pitch shifter effect */
|
||||||
|
#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12)
|
||||||
|
#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12)
|
||||||
|
#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12)
|
||||||
|
|
||||||
|
#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50)
|
||||||
|
#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50)
|
||||||
|
#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0)
|
||||||
|
|
||||||
|
/* Ring modulator effect */
|
||||||
|
#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f)
|
||||||
|
#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f)
|
||||||
|
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f)
|
||||||
|
|
||||||
|
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f)
|
||||||
|
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f)
|
||||||
|
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f)
|
||||||
|
|
||||||
|
#define AL_RING_MODULATOR_SINUSOID (0)
|
||||||
|
#define AL_RING_MODULATOR_SAWTOOTH (1)
|
||||||
|
#define AL_RING_MODULATOR_SQUARE (2)
|
||||||
|
|
||||||
|
#define AL_RING_MODULATOR_MIN_WAVEFORM (0)
|
||||||
|
#define AL_RING_MODULATOR_MAX_WAVEFORM (2)
|
||||||
|
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0)
|
||||||
|
|
||||||
|
/* Autowah effect */
|
||||||
|
#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f)
|
||||||
|
#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f)
|
||||||
|
|
||||||
|
#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f)
|
||||||
|
#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f)
|
||||||
|
|
||||||
|
#define AL_AUTOWAH_MIN_RESONANCE (2.0f)
|
||||||
|
#define AL_AUTOWAH_MAX_RESONANCE (1000.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f)
|
||||||
|
|
||||||
|
#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f)
|
||||||
|
#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f)
|
||||||
|
|
||||||
|
/* Compressor effect */
|
||||||
|
#define AL_COMPRESSOR_MIN_ONOFF (0)
|
||||||
|
#define AL_COMPRESSOR_MAX_ONOFF (1)
|
||||||
|
#define AL_COMPRESSOR_DEFAULT_ONOFF (1)
|
||||||
|
|
||||||
|
/* Equalizer effect */
|
||||||
|
#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f)
|
||||||
|
|
||||||
|
|
||||||
|
/* Source parameter value ranges and defaults. */
|
||||||
|
#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f)
|
||||||
|
#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f)
|
||||||
|
#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||||
|
#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_MIN_CONE_OUTER_GAINHF (0.0f)
|
||||||
|
#define AL_MAX_CONE_OUTER_GAINHF (1.0f)
|
||||||
|
#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f)
|
||||||
|
|
||||||
|
#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE
|
||||||
|
#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
|
||||||
|
#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE
|
||||||
|
#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||||
|
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||||
|
|
||||||
|
#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE
|
||||||
|
#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/* Listener parameter value ranges and defaults. */
|
||||||
|
#define AL_MIN_METERS_PER_UNIT FLT_MIN
|
||||||
|
#define AL_MAX_METERS_PER_UNIT FLT_MAX
|
||||||
|
#define AL_DEFAULT_METERS_PER_UNIT (1.0f)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* AL_EFX_H */
|
96
openal-soft/libs/Win32/OpenAL32.def
Normal file
96
openal-soft/libs/Win32/OpenAL32.def
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
EXPORTS
|
||||||
|
alBuffer3f
|
||||||
|
alBuffer3i
|
||||||
|
alBufferData
|
||||||
|
alBufferf
|
||||||
|
alBufferfv
|
||||||
|
alBufferi
|
||||||
|
alBufferiv
|
||||||
|
alDeleteBuffers
|
||||||
|
alDeleteSources
|
||||||
|
alDisable
|
||||||
|
alDistanceModel
|
||||||
|
alDopplerFactor
|
||||||
|
alDopplerVelocity
|
||||||
|
alEnable
|
||||||
|
alGenBuffers
|
||||||
|
alGenSources
|
||||||
|
alGetBoolean
|
||||||
|
alGetBooleanv
|
||||||
|
alGetBuffer3f
|
||||||
|
alGetBuffer3i
|
||||||
|
alGetBufferf
|
||||||
|
alGetBufferfv
|
||||||
|
alGetBufferi
|
||||||
|
alGetBufferiv
|
||||||
|
alGetDouble
|
||||||
|
alGetDoublev
|
||||||
|
alGetEnumValue
|
||||||
|
alGetError
|
||||||
|
alGetFloat
|
||||||
|
alGetFloatv
|
||||||
|
alGetInteger
|
||||||
|
alGetIntegerv
|
||||||
|
alGetListener3f
|
||||||
|
alGetListener3i
|
||||||
|
alGetListenerf
|
||||||
|
alGetListenerfv
|
||||||
|
alGetListeneri
|
||||||
|
alGetListeneriv
|
||||||
|
alGetProcAddress
|
||||||
|
alGetSource3f
|
||||||
|
alGetSource3i
|
||||||
|
alGetSourcef
|
||||||
|
alGetSourcefv
|
||||||
|
alGetSourcei
|
||||||
|
alGetSourceiv
|
||||||
|
alGetString
|
||||||
|
alIsBuffer
|
||||||
|
alIsEnabled
|
||||||
|
alIsExtensionPresent
|
||||||
|
alIsSource
|
||||||
|
alListener3f
|
||||||
|
alListener3i
|
||||||
|
alListenerf
|
||||||
|
alListenerfv
|
||||||
|
alListeneri
|
||||||
|
alListeneriv
|
||||||
|
alSource3f
|
||||||
|
alSource3i
|
||||||
|
alSourcePause
|
||||||
|
alSourcePausev
|
||||||
|
alSourcePlay
|
||||||
|
alSourcePlayv
|
||||||
|
alSourceQueueBuffers
|
||||||
|
alSourceRewind
|
||||||
|
alSourceRewindv
|
||||||
|
alSourceStop
|
||||||
|
alSourceStopv
|
||||||
|
alSourceUnqueueBuffers
|
||||||
|
alSourcef
|
||||||
|
alSourcefv
|
||||||
|
alSourcei
|
||||||
|
alSourceiv
|
||||||
|
alSpeedOfSound
|
||||||
|
alcCaptureCloseDevice
|
||||||
|
alcCaptureOpenDevice
|
||||||
|
alcCaptureSamples
|
||||||
|
alcCaptureStart
|
||||||
|
alcCaptureStop
|
||||||
|
alcCloseDevice
|
||||||
|
alcCreateContext
|
||||||
|
alcDestroyContext
|
||||||
|
alcGetContextsDevice
|
||||||
|
alcGetCurrentContext
|
||||||
|
alcGetEnumValue
|
||||||
|
alcGetError
|
||||||
|
alcGetIntegerv
|
||||||
|
alcGetProcAddress
|
||||||
|
alcGetString
|
||||||
|
alcGetThreadContext
|
||||||
|
alcIsExtensionPresent
|
||||||
|
alcMakeContextCurrent
|
||||||
|
alcOpenDevice
|
||||||
|
alcProcessContext
|
||||||
|
alcSetThreadContext
|
||||||
|
alcSuspendContext
|
BIN
openal-soft/libs/Win32/OpenAL32.lib
Normal file
BIN
openal-soft/libs/Win32/OpenAL32.lib
Normal file
Binary file not shown.
BIN
openal-soft/libs/Win32/libOpenAL32.dll.a
Normal file
BIN
openal-soft/libs/Win32/libOpenAL32.dll.a
Normal file
Binary file not shown.
96
openal-soft/libs/Win64/OpenAL32.def
Normal file
96
openal-soft/libs/Win64/OpenAL32.def
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
EXPORTS
|
||||||
|
alBuffer3f
|
||||||
|
alBuffer3i
|
||||||
|
alBufferData
|
||||||
|
alBufferf
|
||||||
|
alBufferfv
|
||||||
|
alBufferi
|
||||||
|
alBufferiv
|
||||||
|
alDeleteBuffers
|
||||||
|
alDeleteSources
|
||||||
|
alDisable
|
||||||
|
alDistanceModel
|
||||||
|
alDopplerFactor
|
||||||
|
alDopplerVelocity
|
||||||
|
alEnable
|
||||||
|
alGenBuffers
|
||||||
|
alGenSources
|
||||||
|
alGetBoolean
|
||||||
|
alGetBooleanv
|
||||||
|
alGetBuffer3f
|
||||||
|
alGetBuffer3i
|
||||||
|
alGetBufferf
|
||||||
|
alGetBufferfv
|
||||||
|
alGetBufferi
|
||||||
|
alGetBufferiv
|
||||||
|
alGetDouble
|
||||||
|
alGetDoublev
|
||||||
|
alGetEnumValue
|
||||||
|
alGetError
|
||||||
|
alGetFloat
|
||||||
|
alGetFloatv
|
||||||
|
alGetInteger
|
||||||
|
alGetIntegerv
|
||||||
|
alGetListener3f
|
||||||
|
alGetListener3i
|
||||||
|
alGetListenerf
|
||||||
|
alGetListenerfv
|
||||||
|
alGetListeneri
|
||||||
|
alGetListeneriv
|
||||||
|
alGetProcAddress
|
||||||
|
alGetSource3f
|
||||||
|
alGetSource3i
|
||||||
|
alGetSourcef
|
||||||
|
alGetSourcefv
|
||||||
|
alGetSourcei
|
||||||
|
alGetSourceiv
|
||||||
|
alGetString
|
||||||
|
alIsBuffer
|
||||||
|
alIsEnabled
|
||||||
|
alIsExtensionPresent
|
||||||
|
alIsSource
|
||||||
|
alListener3f
|
||||||
|
alListener3i
|
||||||
|
alListenerf
|
||||||
|
alListenerfv
|
||||||
|
alListeneri
|
||||||
|
alListeneriv
|
||||||
|
alSource3f
|
||||||
|
alSource3i
|
||||||
|
alSourcePause
|
||||||
|
alSourcePausev
|
||||||
|
alSourcePlay
|
||||||
|
alSourcePlayv
|
||||||
|
alSourceQueueBuffers
|
||||||
|
alSourceRewind
|
||||||
|
alSourceRewindv
|
||||||
|
alSourceStop
|
||||||
|
alSourceStopv
|
||||||
|
alSourceUnqueueBuffers
|
||||||
|
alSourcef
|
||||||
|
alSourcefv
|
||||||
|
alSourcei
|
||||||
|
alSourceiv
|
||||||
|
alSpeedOfSound
|
||||||
|
alcCaptureCloseDevice
|
||||||
|
alcCaptureOpenDevice
|
||||||
|
alcCaptureSamples
|
||||||
|
alcCaptureStart
|
||||||
|
alcCaptureStop
|
||||||
|
alcCloseDevice
|
||||||
|
alcCreateContext
|
||||||
|
alcDestroyContext
|
||||||
|
alcGetContextsDevice
|
||||||
|
alcGetCurrentContext
|
||||||
|
alcGetEnumValue
|
||||||
|
alcGetError
|
||||||
|
alcGetIntegerv
|
||||||
|
alcGetProcAddress
|
||||||
|
alcGetString
|
||||||
|
alcGetThreadContext
|
||||||
|
alcIsExtensionPresent
|
||||||
|
alcMakeContextCurrent
|
||||||
|
alcOpenDevice
|
||||||
|
alcProcessContext
|
||||||
|
alcSetThreadContext
|
||||||
|
alcSuspendContext
|
BIN
openal-soft/libs/Win64/OpenAL32.lib
Normal file
BIN
openal-soft/libs/Win64/OpenAL32.lib
Normal file
Binary file not shown.
BIN
openal-soft/libs/Win64/libOpenAL32.dll.a
Normal file
BIN
openal-soft/libs/Win64/libOpenAL32.dll.a
Normal file
Binary file not shown.
32
openal-soft/readme.txt
Normal file
32
openal-soft/readme.txt
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
OpenAL Soft Binary Distribution
|
||||||
|
|
||||||
|
These binaries are provided as a convenience. Users and developers may use it
|
||||||
|
so they can use OpenAL Soft without having to build it from source.
|
||||||
|
|
||||||
|
Note that it is still expected to install the OpenAL redistributable provided
|
||||||
|
by Creative Labs (at http://openal.org/), as that will provide the "router"
|
||||||
|
OpenAL32.dll that applications talk to, and may provide extra drivers for the
|
||||||
|
user's system. The DLLs provided here will simply add additional devices for
|
||||||
|
applications to select from. If you do not wish to use the redistributable,
|
||||||
|
then rename soft_oal.dll to OpenAL32.dll (note: even the 64-bit DLL should be
|
||||||
|
named OpenAL32.dll). Just be aware this will prevent other system-installed
|
||||||
|
OpenAL implementations from working.
|
||||||
|
|
||||||
|
To use the 32-bit DLL, copy it from the bin\Win32 folder to the folder that
|
||||||
|
the 32-bit OpenAL32.dll router is installed in.
|
||||||
|
For 32-bit Windows, the Win32 DLL will typically go into the system32 folder.
|
||||||
|
For 64-bit Windows, the Win32 DLL will typically go into the SysWOW64 folder.
|
||||||
|
|
||||||
|
To use the 64-bit DLL, copy it from the bin\Win64 folder to the folder that
|
||||||
|
the 64-bit OpenAL32.dll router is installed in.
|
||||||
|
For 64-bit Windows, this will typically be the system32 folder.
|
||||||
|
|
||||||
|
The included openal-info32.exe and openal-info64.exe programs can be used to
|
||||||
|
tell if the OpenAL Soft DLL is being detected. It should be run from a command
|
||||||
|
shell, as the program will exit as soon as it's done printing information.
|
||||||
|
|
||||||
|
A configuration GUI app is provided in the alsoft-config folder. It is a front-
|
||||||
|
end to editing %AppData%\alsoft.ini, which can be used to modify certain
|
||||||
|
behaviors for OpenAL Soft devices.
|
||||||
|
|
||||||
|
Have fun!
|
|
@ -104,7 +104,7 @@ project "librw"
|
||||||
end
|
end
|
||||||
|
|
||||||
local function addSrcFiles( prefix )
|
local function addSrcFiles( prefix )
|
||||||
return prefix .. "/*cpp", prefix .. "/*.h", prefix .. "/*.c", prefix .. "/*.ico", prefix .. "/*.aps", prefix .. "/*.rc"
|
return prefix .. "/*cpp", prefix .. "/*.h", prefix .. "/*.c", prefix .. "/*.ico", prefix .. "/*.rc"
|
||||||
end
|
end
|
||||||
|
|
||||||
project "reVC"
|
project "reVC"
|
||||||
|
@ -197,5 +197,5 @@ project "reVC"
|
||||||
|
|
||||||
filter "platforms:*gl3_glfw*"
|
filter "platforms:*gl3_glfw*"
|
||||||
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
|
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
|
||||||
libdirs { path.join(_OPTIONS["glfwdir"], "lib-" .. string.gsub(_ACTION, "vs", "vc")) }
|
libdirs { path.join(_OPTIONS["glfwdir"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
|
||||||
links { "opengl32", "glew32s", "glfw3" }
|
links { "opengl32", "glew32s", "glfw3" }
|
||||||
|
|
|
@ -27,7 +27,7 @@ struct AnimBlendFrameData
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(sizeof(AnimBlendFrameData) == 0x14, "AnimBlendFrameData: error");
|
VALIDATE_SIZE(AnimBlendFrameData, 0x14);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,4 +26,5 @@ public:
|
||||||
void Uncompress(void);
|
void Uncompress(void);
|
||||||
void RemoveUncompressedData(void);
|
void RemoveUncompressedData(void);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CAnimBlendHierarchy) == 0x28, "CAnimBlendHierarchy: error");
|
|
||||||
|
VALIDATE_SIZE(CAnimBlendHierarchy, 0x28);
|
|
@ -28,4 +28,6 @@ public:
|
||||||
void GetCurrentTranslation(CVector &trans, float weight);
|
void GetCurrentTranslation(CVector &trans, float weight);
|
||||||
void GetEndTranslation(CVector &trans, float weight);
|
void GetEndTranslation(CVector &trans, float weight);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CAnimBlendNode) == 0x1C, "CAnimBlendNode: error");
|
|
||||||
|
|
||||||
|
VALIDATE_SIZE(CAnimBlendNode, 0x1C);
|
||||||
|
|
|
@ -56,5 +56,5 @@ public:
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(sizeof(CAnimBlendSequence) == 0x2C, "CAnimBlendSequence: error");
|
VALIDATE_SIZE(CAnimBlendSequence, 0x2C);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
// no methods
|
// no methods
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cAudioCollision) == 40, "cAudioCollision: error");
|
VALIDATE_SIZE(cAudioCollision, 40);
|
||||||
|
|
||||||
class cAudioCollisionManager
|
class cAudioCollisionManager
|
||||||
{
|
{
|
||||||
|
@ -35,4 +35,4 @@ public:
|
||||||
void AddCollisionToRequestedQueue();
|
void AddCollisionToRequestedQueue();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cAudioCollisionManager) == 852, "cAudioCollisionManager: error");
|
VALIDATE_SIZE(cAudioCollisionManager, 852);
|
||||||
|
|
|
@ -9336,7 +9336,7 @@ cAudioManager::ResetTimers(uint32 time)
|
||||||
SampleManager.SetEffectsFadeVolume(0);
|
SampleManager.SetEffectsFadeVolume(0);
|
||||||
SampleManager.SetMusicFadeVolume(0);
|
SampleManager.SetMusicFadeVolume(0);
|
||||||
MusicManager.ResetMusicAfterReload();
|
MusicManager.ResetMusicAfterReload();
|
||||||
#ifdef OPENAL
|
#ifdef AUDIO_OAL
|
||||||
SampleManager.Service();
|
SampleManager.Service();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -9392,7 +9392,7 @@ cAudioManager::ServiceSoundEffects()
|
||||||
ProcessMissionAudio();
|
ProcessMissionAudio();
|
||||||
AdjustSamplesVolume();
|
AdjustSamplesVolume();
|
||||||
ProcessActiveQueues();
|
ProcessActiveQueues();
|
||||||
#ifdef OPENAL
|
#ifdef AUDIO_OAL
|
||||||
SampleManager.Service();
|
SampleManager.Service();
|
||||||
#endif
|
#endif
|
||||||
for (int32 i = 0; i < m_sAudioScriptObjectManager.m_nScriptObjectEntityTotal; ++i) {
|
for (int32 i = 0; i < m_sAudioScriptObjectManager.m_nScriptObjectEntityTotal; ++i) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
int8 m_nVolumeChange;
|
int8 m_nVolumeChange;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(tSound) == 92, "tSound: error");
|
VALIDATE_SIZE(tSound, 92);
|
||||||
|
|
||||||
class CPhysical;
|
class CPhysical;
|
||||||
class CAutomobile;
|
class CAutomobile;
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
uint8 m_AudioEvents;
|
uint8 m_AudioEvents;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(tAudioEntity) == 40, "tAudioEntity: error");
|
VALIDATE_SIZE(tAudioEntity, 40);
|
||||||
|
|
||||||
class tPedComment
|
class tPedComment
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
int8 m_nProcess;
|
int8 m_nProcess;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(tPedComment) == 28, "tPedComment: error");
|
VALIDATE_SIZE(tPedComment, 28);
|
||||||
|
|
||||||
class cPedComments
|
class cPedComments
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ public:
|
||||||
void Process();
|
void Process();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cPedComments) == 1164, "cPedComments: error");
|
VALIDATE_SIZE(cPedComments, 1164);
|
||||||
|
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
|
@ -96,8 +96,7 @@ public:
|
||||||
int32 m_nMissionAudioCounter;
|
int32 m_nMissionAudioCounter;
|
||||||
bool m_bIsPlayed;
|
bool m_bIsPlayed;
|
||||||
};
|
};
|
||||||
|
VALIDATE_SIZE(cMissionAudio, 32);
|
||||||
static_assert(sizeof(cMissionAudio) == 32, "cMissionAudio: error");
|
|
||||||
|
|
||||||
// name made up
|
// name made up
|
||||||
class cAudioScriptObjectManager
|
class cAudioScriptObjectManager
|
||||||
|
@ -135,7 +134,7 @@ public:
|
||||||
float m_fVelocityChange;
|
float m_fVelocityChange;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cVehicleParams) == 0x18, "cVehicleParams: error");
|
VALIDATE_SIZE(cVehicleParams, 0x18);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/*
|
/*
|
||||||
|
@ -472,6 +471,8 @@ public:
|
||||||
void DebugShit();
|
void DebugShit();
|
||||||
};
|
};
|
||||||
|
|
||||||
//dstatic_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
#ifdef AUDIO_MSS
|
||||||
|
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
||||||
|
#endif
|
||||||
|
|
||||||
extern cAudioManager AudioManager;
|
extern cAudioManager AudioManager;
|
||||||
|
|
|
@ -148,6 +148,6 @@ public:
|
||||||
static void SaveAllAudioScriptObjects(uint8 *buf, uint32 *size);
|
static void SaveAllAudioScriptObjects(uint8 *buf, uint32 *size);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cAudioScriptObject) == 20, "cAudioScriptObject: error");
|
VALIDATE_SIZE(cAudioScriptObject, 20);
|
||||||
|
|
||||||
extern void PlayOneShotScriptObject(uint8 id, CVector const &pos);
|
extern void PlayOneShotScriptObject(uint8 id, CVector const &pos);
|
|
@ -5,6 +5,7 @@
|
||||||
#include "AudioManager.h"
|
#include "AudioManager.h"
|
||||||
#include "AudioScriptObject.h"
|
#include "AudioScriptObject.h"
|
||||||
#include "sampman.h"
|
#include "sampman.h"
|
||||||
|
#include "Text.h"
|
||||||
|
|
||||||
cDMAudio DMAudio;
|
cDMAudio DMAudio;
|
||||||
|
|
||||||
|
@ -104,6 +105,28 @@ cDMAudio::Get3DProviderName(uint8 id)
|
||||||
return AudioManager.Get3DProviderName(id);
|
return AudioManager.Get3DProviderName(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int8 cDMAudio::AutoDetect3DProviders(void)
|
||||||
|
{
|
||||||
|
for ( int32 i = 0; i < GetNum3DProvidersAvailable(); i++ )
|
||||||
|
{
|
||||||
|
wchar buff[64];
|
||||||
|
|
||||||
|
char *name = Get3DProviderName(i);
|
||||||
|
AsciiToUnicode(name, buff);
|
||||||
|
char *providername = UnicodeToAscii(buff);
|
||||||
|
strupr(providername);
|
||||||
|
#if defined(AUDIO_MSS)
|
||||||
|
if ( !strcmp(providername, "MILES FAST 2D POSITIONAL AUDIO") )
|
||||||
|
return i;
|
||||||
|
#elif defined(AUDIO_OAL)
|
||||||
|
if ( !strcmp(providername, "OPENAL SOFT") )
|
||||||
|
return i;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
cDMAudio::GetCurrent3DProviderIndex(void)
|
cDMAudio::GetCurrent3DProviderIndex(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,8 @@ public:
|
||||||
uint8 GetNum3DProvidersAvailable(void);
|
uint8 GetNum3DProvidersAvailable(void);
|
||||||
char *Get3DProviderName(uint8 id);
|
char *Get3DProviderName(uint8 id);
|
||||||
|
|
||||||
|
int8 AutoDetect3DProviders(void);
|
||||||
|
|
||||||
int8 GetCurrent3DProviderIndex(void);
|
int8 GetCurrent3DProviderIndex(void);
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
int8 SetCurrent3DProvider(uint8 which);
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,6 @@ public:
|
||||||
bool ChangeRadioChannel();
|
bool ChangeRadioChannel();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error");
|
VALIDATE_SIZE(cMusicManager, 0x95C);
|
||||||
|
|
||||||
extern cMusicManager MusicManager;
|
extern cMusicManager MusicManager;
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct cAMCrime {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cAMCrime) == 20, "cAMCrime: error ");
|
VALIDATE_SIZE(cAMCrime, 20);
|
||||||
|
|
||||||
class cPoliceRadioQueue
|
class cPoliceRadioQueue
|
||||||
{
|
{
|
||||||
|
@ -43,4 +43,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(cPoliceRadioQueue) == 444, "cPoliceRadioQueue: error ");
|
VALIDATE_SIZE(cPoliceRadioQueue, 444);
|
||||||
|
|
|
@ -1,339 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "common.h"
|
|
||||||
#include "AudioSamples.h"
|
|
||||||
|
|
||||||
#define MAX_VOLUME 127
|
|
||||||
|
|
||||||
struct tSample {
|
|
||||||
int32 nOffset;
|
|
||||||
uint32 nSize;
|
|
||||||
int32 nFrequency;
|
|
||||||
int32 nLoopStart;
|
|
||||||
int32 nLoopEnd;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
SAMPLEBANK_MAIN,
|
|
||||||
SAMPLEBANK_PED,
|
|
||||||
MAX_SAMPLEBANKS,
|
|
||||||
SAMPLEBANK_INVALID
|
|
||||||
};
|
|
||||||
|
|
||||||
#define MAX_PEDSFX 7
|
|
||||||
#define PED_BLOCKSIZE 79000
|
|
||||||
|
|
||||||
#define MAXPROVIDERS 64
|
|
||||||
|
|
||||||
#define MAXCHANNELS 28
|
|
||||||
#define MAXCHANNELS_SURROUND 24
|
|
||||||
#define MAX2DCHANNELS 1
|
|
||||||
#define CHANNEL2D MAXCHANNELS
|
|
||||||
|
|
||||||
#define MAX_MP3STREAMS 2
|
|
||||||
|
|
||||||
#define DIGITALRATE 32000
|
|
||||||
#define DIGITALBITS 16
|
|
||||||
#define DIGITALCHANNELS 2
|
|
||||||
|
|
||||||
#define MAX_DIGITAL_MIXER_CHANNELS 32
|
|
||||||
|
|
||||||
class cSampleManager
|
|
||||||
{
|
|
||||||
uint8 m_nEffectsVolume;
|
|
||||||
uint8 m_nMusicVolume;
|
|
||||||
uint8 m_nEffectsFadeVolume;
|
|
||||||
uint8 m_nMusicFadeVolume;
|
|
||||||
uint8 m_nMonoMode;
|
|
||||||
char unk;
|
|
||||||
char m_szCDRomRootPath[80];
|
|
||||||
bool m_bInitialised;
|
|
||||||
uint8 m_nNumberOfProviders;
|
|
||||||
char *m_aAudioProviders[MAXPROVIDERS];
|
|
||||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSampleManager(void) :
|
|
||||||
m_nNumberOfProviders(0)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
~cSampleManager(void)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
void SetSpeakerConfig(int32 nConfig);
|
|
||||||
uint32 GetMaximumSupportedChannels(void);
|
|
||||||
|
|
||||||
uint32 GetNum3DProvidersAvailable() { return m_nNumberOfProviders; }
|
|
||||||
void SetNum3DProvidersAvailable(uint32 num) { m_nNumberOfProviders = num; }
|
|
||||||
|
|
||||||
char *Get3DProviderName(uint8 id) { return m_aAudioProviders[id]; }
|
|
||||||
void Set3DProviderName(uint8 id, char *name) { m_aAudioProviders[id] = name; }
|
|
||||||
|
|
||||||
int8 GetCurrent3DProviderIndex(void);
|
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
|
||||||
|
|
||||||
bool IsMP3RadioChannelAvailable(void);
|
|
||||||
|
|
||||||
void ReleaseDigitalHandle (void);
|
|
||||||
void ReacquireDigitalHandle(void);
|
|
||||||
|
|
||||||
bool Initialise(void);
|
|
||||||
void Terminate (void);
|
|
||||||
|
|
||||||
bool CheckForAnAudioFileOnCD(void);
|
|
||||||
char GetCDAudioDriveLetter (void);
|
|
||||||
|
|
||||||
void UpdateEffectsVolume(void);
|
|
||||||
|
|
||||||
void SetEffectsMasterVolume(uint8 nVolume);
|
|
||||||
void SetMusicMasterVolume (uint8 nVolume);
|
|
||||||
void SetEffectsFadeVolume (uint8 nVolume);
|
|
||||||
void SetMusicFadeVolume (uint8 nVolume);
|
|
||||||
|
|
||||||
bool LoadSampleBank (uint8 nBank);
|
|
||||||
void UnloadSampleBank (uint8 nBank);
|
|
||||||
bool IsSampleBankLoaded(uint8 nBank);
|
|
||||||
|
|
||||||
bool IsPedCommentLoaded(uint32 nComment);
|
|
||||||
bool LoadPedComment (uint32 nComment);
|
|
||||||
|
|
||||||
int32 _GetPedCommentSlot(uint32 nComment);
|
|
||||||
|
|
||||||
int32 GetSampleBaseFrequency (uint32 nSample);
|
|
||||||
int32 GetSampleLoopStartOffset(uint32 nSample);
|
|
||||||
int32 GetSampleLoopEndOffset (uint32 nSample);
|
|
||||||
uint32 GetSampleLength (uint32 nSample);
|
|
||||||
|
|
||||||
bool UpdateReverb(void);
|
|
||||||
|
|
||||||
void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
|
|
||||||
bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
|
|
||||||
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
|
||||||
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
|
||||||
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
|
||||||
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
|
|
||||||
void SetChannelPan (uint32 nChannel, uint32 nPan);
|
|
||||||
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
|
|
||||||
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
|
|
||||||
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
|
|
||||||
bool GetChannelUsedFlag (uint32 nChannel);
|
|
||||||
void StartChannel (uint32 nChannel);
|
|
||||||
void StopChannel (uint32 nChannel);
|
|
||||||
|
|
||||||
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
|
||||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
|
||||||
void StartPreloadedStreamedFile (uint8 nStream);
|
|
||||||
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
|
||||||
void StopStreamedFile (uint8 nStream);
|
|
||||||
int32 GetStreamedFilePosition (uint8 nStream);
|
|
||||||
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
|
||||||
int32 GetStreamedFileLength (uint8 nStream);
|
|
||||||
bool IsStreamPlaying (uint8 nStream);
|
|
||||||
bool InitialiseSampleBanks(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
extern cSampleManager SampleManager;
|
|
||||||
extern int32 BankStartOffset[MAX_SAMPLEBANKS];
|
|
||||||
|
|
||||||
static char StreamedNameTable[][25]=
|
|
||||||
{
|
|
||||||
"AUDIO\\HEAD.WAV",
|
|
||||||
"AUDIO\\CLASS.WAV",
|
|
||||||
"AUDIO\\KJAH.WAV",
|
|
||||||
"AUDIO\\RISE.WAV",
|
|
||||||
"AUDIO\\LIPS.WAV",
|
|
||||||
"AUDIO\\GAME.WAV",
|
|
||||||
"AUDIO\\MSX.WAV",
|
|
||||||
"AUDIO\\FLASH.WAV",
|
|
||||||
"AUDIO\\CHAT.WAV",
|
|
||||||
"AUDIO\\HEAD.WAV",
|
|
||||||
"AUDIO\\POLICE.WAV",
|
|
||||||
"AUDIO\\CITY.WAV",
|
|
||||||
"AUDIO\\WATER.WAV",
|
|
||||||
"AUDIO\\COMOPEN.WAV",
|
|
||||||
"AUDIO\\SUBOPEN.WAV",
|
|
||||||
"AUDIO\\JB.MP3",
|
|
||||||
"AUDIO\\BET.MP3",
|
|
||||||
"AUDIO\\L1_LG.MP3",
|
|
||||||
"AUDIO\\L2_DSB.MP3",
|
|
||||||
"AUDIO\\L3_DM.MP3",
|
|
||||||
"AUDIO\\L4_PAP.MP3",
|
|
||||||
"AUDIO\\L5_TFB.MP3",
|
|
||||||
"AUDIO\\J0_DM2.MP3",
|
|
||||||
"AUDIO\\J1_LFL.MP3",
|
|
||||||
"AUDIO\\J2_KCL.MP3",
|
|
||||||
"AUDIO\\J3_VH.MP3",
|
|
||||||
"AUDIO\\J4_ETH.MP3",
|
|
||||||
"AUDIO\\J5_DST.MP3",
|
|
||||||
"AUDIO\\J6_TBJ.MP3",
|
|
||||||
"AUDIO\\T1_TOL.MP3",
|
|
||||||
"AUDIO\\T2_TPU.MP3",
|
|
||||||
"AUDIO\\T3_MAS.MP3",
|
|
||||||
"AUDIO\\T4_TAT.MP3",
|
|
||||||
"AUDIO\\T5_BF.MP3",
|
|
||||||
"AUDIO\\S0_MAS.MP3",
|
|
||||||
"AUDIO\\S1_PF.MP3",
|
|
||||||
"AUDIO\\S2_CTG.MP3",
|
|
||||||
"AUDIO\\S3_RTC.MP3",
|
|
||||||
"AUDIO\\S5_LRQ.MP3",
|
|
||||||
"AUDIO\\S4_BDBA.MP3",
|
|
||||||
"AUDIO\\S4_BDBB.MP3",
|
|
||||||
"AUDIO\\S2_CTG2.MP3",
|
|
||||||
"AUDIO\\S4_BDBD.MP3",
|
|
||||||
"AUDIO\\S5_LRQB.MP3",
|
|
||||||
"AUDIO\\S5_LRQC.MP3",
|
|
||||||
"AUDIO\\A1_SSO.WAV",
|
|
||||||
"AUDIO\\A2_PP.WAV",
|
|
||||||
"AUDIO\\A3_SS.WAV",
|
|
||||||
"AUDIO\\A4_PDR.WAV",
|
|
||||||
"AUDIO\\A5_K2FT.WAV",
|
|
||||||
"AUDIO\\K1_KBO.MP3",
|
|
||||||
"AUDIO\\K2_GIS.MP3",
|
|
||||||
"AUDIO\\K3_DS.MP3",
|
|
||||||
"AUDIO\\K4_SHI.MP3",
|
|
||||||
"AUDIO\\K5_SD.MP3",
|
|
||||||
"AUDIO\\R0_PDR2.MP3",
|
|
||||||
"AUDIO\\R1_SW.MP3",
|
|
||||||
"AUDIO\\R2_AP.MP3",
|
|
||||||
"AUDIO\\R3_ED.MP3",
|
|
||||||
"AUDIO\\R4_GF.MP3",
|
|
||||||
"AUDIO\\R5_PB.MP3",
|
|
||||||
"AUDIO\\R6_MM.MP3",
|
|
||||||
"AUDIO\\D1_STOG.MP3",
|
|
||||||
"AUDIO\\D2_KK.MP3",
|
|
||||||
"AUDIO\\D3_ADO.MP3",
|
|
||||||
"AUDIO\\D5_ES.MP3",
|
|
||||||
"AUDIO\\D7_MLD.MP3",
|
|
||||||
"AUDIO\\D4_GTA.MP3",
|
|
||||||
"AUDIO\\D4_GTA2.MP3",
|
|
||||||
"AUDIO\\D6_STS.MP3",
|
|
||||||
"AUDIO\\A6_BAIT.WAV",
|
|
||||||
"AUDIO\\A7_ETG.WAV",
|
|
||||||
"AUDIO\\A8_PS.WAV",
|
|
||||||
"AUDIO\\A9_ASD.WAV",
|
|
||||||
"AUDIO\\K4_SHI2.MP3",
|
|
||||||
"AUDIO\\C1_TEX.MP3",
|
|
||||||
"AUDIO\\EL_PH1.MP3",
|
|
||||||
"AUDIO\\EL_PH2.MP3",
|
|
||||||
"AUDIO\\EL_PH3.MP3",
|
|
||||||
"AUDIO\\EL_PH4.MP3",
|
|
||||||
"AUDIO\\YD_PH1.MP3",
|
|
||||||
"AUDIO\\YD_PH2.MP3",
|
|
||||||
"AUDIO\\YD_PH3.MP3",
|
|
||||||
"AUDIO\\YD_PH4.MP3",
|
|
||||||
"AUDIO\\HD_PH1.MP3",
|
|
||||||
"AUDIO\\HD_PH2.MP3",
|
|
||||||
"AUDIO\\HD_PH3.MP3",
|
|
||||||
"AUDIO\\HD_PH4.MP3",
|
|
||||||
"AUDIO\\HD_PH5.MP3",
|
|
||||||
"AUDIO\\MT_PH1.MP3",
|
|
||||||
"AUDIO\\MT_PH2.MP3",
|
|
||||||
"AUDIO\\MT_PH3.MP3",
|
|
||||||
"AUDIO\\MT_PH4.MP3",
|
|
||||||
"AUDIO\\MISCOM.WAV",
|
|
||||||
"AUDIO\\END.MP3",
|
|
||||||
"AUDIO\\lib_a1.WAV",
|
|
||||||
"AUDIO\\lib_a2.WAV",
|
|
||||||
"AUDIO\\lib_a.WAV",
|
|
||||||
"AUDIO\\lib_b.WAV",
|
|
||||||
"AUDIO\\lib_c.WAV",
|
|
||||||
"AUDIO\\lib_d.WAV",
|
|
||||||
"AUDIO\\l2_a.WAV",
|
|
||||||
"AUDIO\\j4t_1.WAV",
|
|
||||||
"AUDIO\\j4t_2.WAV",
|
|
||||||
"AUDIO\\j4t_3.WAV",
|
|
||||||
"AUDIO\\j4t_4.WAV",
|
|
||||||
"AUDIO\\j4_a.WAV",
|
|
||||||
"AUDIO\\j4_b.WAV",
|
|
||||||
"AUDIO\\j4_c.WAV",
|
|
||||||
"AUDIO\\j4_d.WAV",
|
|
||||||
"AUDIO\\j4_e.WAV",
|
|
||||||
"AUDIO\\j4_f.WAV",
|
|
||||||
"AUDIO\\j6_1.WAV",
|
|
||||||
"AUDIO\\j6_a.WAV",
|
|
||||||
"AUDIO\\j6_b.WAV",
|
|
||||||
"AUDIO\\j6_c.WAV",
|
|
||||||
"AUDIO\\j6_d.WAV",
|
|
||||||
"AUDIO\\t4_a.WAV",
|
|
||||||
"AUDIO\\s1_a.WAV",
|
|
||||||
"AUDIO\\s1_a1.WAV",
|
|
||||||
"AUDIO\\s1_b.WAV",
|
|
||||||
"AUDIO\\s1_c.WAV",
|
|
||||||
"AUDIO\\s1_c1.WAV",
|
|
||||||
"AUDIO\\s1_d.WAV",
|
|
||||||
"AUDIO\\s1_e.WAV",
|
|
||||||
"AUDIO\\s1_f.WAV",
|
|
||||||
"AUDIO\\s1_g.WAV",
|
|
||||||
"AUDIO\\s1_h.WAV",
|
|
||||||
"AUDIO\\s1_i.WAV",
|
|
||||||
"AUDIO\\s1_j.WAV",
|
|
||||||
"AUDIO\\s1_k.WAV",
|
|
||||||
"AUDIO\\s1_l.WAV",
|
|
||||||
"AUDIO\\s3_a.WAV",
|
|
||||||
"AUDIO\\s3_b.WAV",
|
|
||||||
"AUDIO\\el3_a.WAV",
|
|
||||||
"AUDIO\\mf1_a.WAV",
|
|
||||||
"AUDIO\\mf2_a.WAV",
|
|
||||||
"AUDIO\\mf3_a.WAV",
|
|
||||||
"AUDIO\\mf3_b.WAV",
|
|
||||||
"AUDIO\\mf3_b1.WAV",
|
|
||||||
"AUDIO\\mf3_c.WAV",
|
|
||||||
"AUDIO\\mf4_a.WAV",
|
|
||||||
"AUDIO\\mf4_b.WAV",
|
|
||||||
"AUDIO\\mf4_c.WAV",
|
|
||||||
"AUDIO\\a1_a.WAV",
|
|
||||||
"AUDIO\\a3_a.WAV",
|
|
||||||
"AUDIO\\a5_a.WAV",
|
|
||||||
"AUDIO\\a4_a.WAV",
|
|
||||||
"AUDIO\\a4_b.WAV",
|
|
||||||
"AUDIO\\a4_c.WAV",
|
|
||||||
"AUDIO\\a4_d.WAV",
|
|
||||||
"AUDIO\\k1_a.WAV",
|
|
||||||
"AUDIO\\k3_a.WAV",
|
|
||||||
"AUDIO\\r1_a.WAV",
|
|
||||||
"AUDIO\\r2_a.WAV",
|
|
||||||
"AUDIO\\r2_b.WAV",
|
|
||||||
"AUDIO\\r2_c.WAV",
|
|
||||||
"AUDIO\\r2_d.WAV",
|
|
||||||
"AUDIO\\r2_e.WAV",
|
|
||||||
"AUDIO\\r2_f.WAV",
|
|
||||||
"AUDIO\\r2_g.WAV",
|
|
||||||
"AUDIO\\r2_h.WAV",
|
|
||||||
"AUDIO\\r5_a.WAV",
|
|
||||||
"AUDIO\\r6_a.WAV",
|
|
||||||
"AUDIO\\r6_a1.WAV",
|
|
||||||
"AUDIO\\r6_b.WAV",
|
|
||||||
"AUDIO\\lo2_a.WAV",
|
|
||||||
"AUDIO\\lo6_a.WAV",
|
|
||||||
"AUDIO\\yd2_a.WAV",
|
|
||||||
"AUDIO\\yd2_b.WAV",
|
|
||||||
"AUDIO\\yd2_c.WAV",
|
|
||||||
"AUDIO\\yd2_c1.WAV",
|
|
||||||
"AUDIO\\yd2_d.WAV",
|
|
||||||
"AUDIO\\yd2_e.WAV",
|
|
||||||
"AUDIO\\yd2_f.WAV",
|
|
||||||
"AUDIO\\yd2_g.WAV",
|
|
||||||
"AUDIO\\yd2_h.WAV",
|
|
||||||
"AUDIO\\yd2_ass.WAV",
|
|
||||||
"AUDIO\\yd2_ok.WAV",
|
|
||||||
"AUDIO\\h5_a.WAV",
|
|
||||||
"AUDIO\\h5_b.WAV",
|
|
||||||
"AUDIO\\h5_c.WAV",
|
|
||||||
"AUDIO\\ammu_a.WAV",
|
|
||||||
"AUDIO\\ammu_b.WAV",
|
|
||||||
"AUDIO\\ammu_c.WAV",
|
|
||||||
"AUDIO\\door_1.WAV",
|
|
||||||
"AUDIO\\door_2.WAV",
|
|
||||||
"AUDIO\\door_3.WAV",
|
|
||||||
"AUDIO\\door_4.WAV",
|
|
||||||
"AUDIO\\door_5.WAV",
|
|
||||||
"AUDIO\\door_6.WAV",
|
|
||||||
"AUDIO\\t3_a.WAV",
|
|
||||||
"AUDIO\\t3_b.WAV",
|
|
||||||
"AUDIO\\t3_c.WAV",
|
|
||||||
"AUDIO\\k1_b.WAV",
|
|
||||||
"AUDIO\\cat1.WAV"
|
|
||||||
};
|
|
329
src/audio/oal/aldlist.cpp
Normal file
329
src/audio/oal/aldlist.cpp
Normal file
|
@ -0,0 +1,329 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006, Creative Labs Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
|
* that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||||
|
* the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||||
|
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of Creative Labs Inc. nor the names of its contributors may be used to endorse or
|
||||||
|
* promote products derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||||
|
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "aldlist.h"
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
/*
|
||||||
|
* Init call
|
||||||
|
*/
|
||||||
|
ALDeviceList::ALDeviceList()
|
||||||
|
{
|
||||||
|
ALDEVICEINFO ALDeviceInfo;
|
||||||
|
char *devices;
|
||||||
|
int index;
|
||||||
|
const char *defaultDeviceName;
|
||||||
|
const char *actualDeviceName;
|
||||||
|
|
||||||
|
// DeviceInfo vector stores, for each enumerated device, it's device name, selection status, spec version #, and extension support
|
||||||
|
vDeviceInfo.empty();
|
||||||
|
vDeviceInfo.reserve(10);
|
||||||
|
|
||||||
|
defaultDeviceIndex = 0;
|
||||||
|
|
||||||
|
if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT")) {
|
||||||
|
devices = (char *)alcGetString(NULL, ALC_DEVICE_SPECIFIER);
|
||||||
|
defaultDeviceName = (char *)alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||||
|
|
||||||
|
index = 0;
|
||||||
|
// go through device list (each device terminated with a single NULL, list terminated with double NULL)
|
||||||
|
while (*devices != NULL) {
|
||||||
|
if (strcmp(defaultDeviceName, devices) == 0) {
|
||||||
|
defaultDeviceIndex = index;
|
||||||
|
}
|
||||||
|
ALCdevice *device = alcOpenDevice(devices);
|
||||||
|
if (device) {
|
||||||
|
ALCcontext *context = alcCreateContext(device, NULL);
|
||||||
|
if (context) {
|
||||||
|
alcMakeContextCurrent(context);
|
||||||
|
// if new actual device name isn't already in the list, then add it...
|
||||||
|
actualDeviceName = alcGetString(device, ALC_DEVICE_SPECIFIER);
|
||||||
|
bool bNewName = true;
|
||||||
|
for (int i = 0; i < GetNumDevices(); i++) {
|
||||||
|
if (strcmp(GetDeviceName(i), actualDeviceName) == 0) {
|
||||||
|
bNewName = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) {
|
||||||
|
memset(&ALDeviceInfo, 0, sizeof(ALDEVICEINFO));
|
||||||
|
ALDeviceInfo.bSelected = true;
|
||||||
|
ALDeviceInfo.strDeviceName = std::string(actualDeviceName, strlen(actualDeviceName));
|
||||||
|
alcGetIntegerv(device, ALC_MAJOR_VERSION, sizeof(int), &ALDeviceInfo.iMajorVersion);
|
||||||
|
alcGetIntegerv(device, ALC_MINOR_VERSION, sizeof(int), &ALDeviceInfo.iMinorVersion);
|
||||||
|
|
||||||
|
ALDeviceInfo.pvstrExtensions = new std::vector<std::string>;
|
||||||
|
|
||||||
|
// Check for ALC Extensions
|
||||||
|
if (alcIsExtensionPresent(device, "ALC_EXT_CAPTURE") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("ALC_EXT_CAPTURE");
|
||||||
|
if (alcIsExtensionPresent(device, "ALC_EXT_EFX") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("ALC_EXT_EFX");
|
||||||
|
|
||||||
|
// Check for AL Extensions
|
||||||
|
if (alIsExtensionPresent("AL_EXT_OFFSET") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("AL_EXT_OFFSET");
|
||||||
|
|
||||||
|
if (alIsExtensionPresent("AL_EXT_LINEAR_DISTANCE") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("AL_EXT_LINEAR_DISTANCE");
|
||||||
|
if (alIsExtensionPresent("AL_EXT_EXPONENT_DISTANCE") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("AL_EXT_EXPONENT_DISTANCE");
|
||||||
|
|
||||||
|
if (alIsExtensionPresent("EAX2.0") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("EAX2.0");
|
||||||
|
if (alIsExtensionPresent("EAX3.0") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("EAX3.0");
|
||||||
|
if (alIsExtensionPresent("EAX4.0") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("EAX4.0");
|
||||||
|
if (alIsExtensionPresent("EAX5.0") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("EAX5.0");
|
||||||
|
|
||||||
|
if (alIsExtensionPresent("EAX-RAM") == AL_TRUE)
|
||||||
|
ALDeviceInfo.pvstrExtensions->push_back("EAX-RAM");
|
||||||
|
|
||||||
|
// Get Source Count
|
||||||
|
ALDeviceInfo.uiSourceCount = GetMaxNumSources();
|
||||||
|
|
||||||
|
vDeviceInfo.push_back(ALDeviceInfo);
|
||||||
|
}
|
||||||
|
alcMakeContextCurrent(NULL);
|
||||||
|
alcDestroyContext(context);
|
||||||
|
}
|
||||||
|
alcCloseDevice(device);
|
||||||
|
}
|
||||||
|
devices += strlen(devices) + 1;
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ResetFilters();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Exit call
|
||||||
|
*/
|
||||||
|
ALDeviceList::~ALDeviceList()
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < vDeviceInfo.size(); i++) {
|
||||||
|
if (vDeviceInfo[i].pvstrExtensions) {
|
||||||
|
vDeviceInfo[i].pvstrExtensions->empty();
|
||||||
|
delete vDeviceInfo[i].pvstrExtensions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vDeviceInfo.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns the number of devices in the complete device list
|
||||||
|
*/
|
||||||
|
int ALDeviceList::GetNumDevices()
|
||||||
|
{
|
||||||
|
return (int)vDeviceInfo.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns the device name at an index in the complete device list
|
||||||
|
*/
|
||||||
|
char * ALDeviceList::GetDeviceName(int index)
|
||||||
|
{
|
||||||
|
if (index < GetNumDevices())
|
||||||
|
return (char *)vDeviceInfo[index].strDeviceName.c_str();
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns the major and minor version numbers for a device at a specified index in the complete list
|
||||||
|
*/
|
||||||
|
void ALDeviceList::GetDeviceVersion(int index, int *major, int *minor)
|
||||||
|
{
|
||||||
|
if (index < GetNumDevices()) {
|
||||||
|
if (major)
|
||||||
|
*major = vDeviceInfo[index].iMajorVersion;
|
||||||
|
if (minor)
|
||||||
|
*minor = vDeviceInfo[index].iMinorVersion;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns the maximum number of Sources that can be generate on the given device
|
||||||
|
*/
|
||||||
|
unsigned int ALDeviceList::GetMaxNumSources(int index)
|
||||||
|
{
|
||||||
|
if (index < GetNumDevices())
|
||||||
|
return vDeviceInfo[index].uiSourceCount;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Checks if the extension is supported on the given device
|
||||||
|
*/
|
||||||
|
bool ALDeviceList::IsExtensionSupported(int index, char *szExtName)
|
||||||
|
{
|
||||||
|
bool bReturn = false;
|
||||||
|
|
||||||
|
if (index < GetNumDevices()) {
|
||||||
|
for (unsigned int i = 0; i < vDeviceInfo[index].pvstrExtensions->size(); i++) {
|
||||||
|
if (!_stricmp(vDeviceInfo[index].pvstrExtensions->at(i).c_str(), szExtName)) {
|
||||||
|
bReturn = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* returns the index of the default device in the complete device list
|
||||||
|
*/
|
||||||
|
int ALDeviceList::GetDefaultDevice()
|
||||||
|
{
|
||||||
|
return defaultDeviceIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Deselects devices which don't have the specified minimum version
|
||||||
|
*/
|
||||||
|
void ALDeviceList::FilterDevicesMinVer(int major, int minor)
|
||||||
|
{
|
||||||
|
int dMajor, dMinor;
|
||||||
|
for (unsigned int i = 0; i < vDeviceInfo.size(); i++) {
|
||||||
|
GetDeviceVersion(i, &dMajor, &dMinor);
|
||||||
|
if ((dMajor < major) || ((dMajor == major) && (dMinor < minor))) {
|
||||||
|
vDeviceInfo[i].bSelected = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Deselects devices which don't have the specified maximum version
|
||||||
|
*/
|
||||||
|
void ALDeviceList::FilterDevicesMaxVer(int major, int minor)
|
||||||
|
{
|
||||||
|
int dMajor, dMinor;
|
||||||
|
for (unsigned int i = 0; i < vDeviceInfo.size(); i++) {
|
||||||
|
GetDeviceVersion(i, &dMajor, &dMinor);
|
||||||
|
if ((dMajor > major) || ((dMajor == major) && (dMinor > minor))) {
|
||||||
|
vDeviceInfo[i].bSelected = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Deselects device which don't support the given extension name
|
||||||
|
*/
|
||||||
|
void ALDeviceList::FilterDevicesExtension(char *szExtName)
|
||||||
|
{
|
||||||
|
bool bFound;
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < vDeviceInfo.size(); i++) {
|
||||||
|
bFound = false;
|
||||||
|
for (unsigned int j = 0; j < vDeviceInfo[i].pvstrExtensions->size(); j++) {
|
||||||
|
if (!_stricmp(vDeviceInfo[i].pvstrExtensions->at(j).c_str(), szExtName)) {
|
||||||
|
bFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!bFound)
|
||||||
|
vDeviceInfo[i].bSelected = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resets all filtering, such that all devices are in the list
|
||||||
|
*/
|
||||||
|
void ALDeviceList::ResetFilters()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < GetNumDevices(); i++) {
|
||||||
|
vDeviceInfo[i].bSelected = true;
|
||||||
|
}
|
||||||
|
filterIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gets index of first filtered device
|
||||||
|
*/
|
||||||
|
int ALDeviceList::GetFirstFilteredDevice()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < GetNumDevices(); i++) {
|
||||||
|
if (vDeviceInfo[i].bSelected == true) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filterIndex = i + 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gets index of next filtered device
|
||||||
|
*/
|
||||||
|
int ALDeviceList::GetNextFilteredDevice()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = filterIndex; i < GetNumDevices(); i++) {
|
||||||
|
if (vDeviceInfo[i].bSelected == true) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filterIndex = i + 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Internal function to detemine max number of Sources that can be generated
|
||||||
|
*/
|
||||||
|
unsigned int ALDeviceList::GetMaxNumSources()
|
||||||
|
{
|
||||||
|
ALuint uiSources[256];
|
||||||
|
unsigned int iSourceCount = 0;
|
||||||
|
|
||||||
|
// Clear AL Error Code
|
||||||
|
alGetError();
|
||||||
|
|
||||||
|
// Generate up to 256 Sources, checking for any errors
|
||||||
|
for (iSourceCount = 0; iSourceCount < 256; iSourceCount++)
|
||||||
|
{
|
||||||
|
alGenSources(1, &uiSources[iSourceCount]);
|
||||||
|
if (alGetError() != AL_NO_ERROR)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Release the Sources
|
||||||
|
alDeleteSources(iSourceCount, uiSources);
|
||||||
|
if (alGetError() != AL_NO_ERROR)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < 256; i++)
|
||||||
|
{
|
||||||
|
alDeleteSources(1, &uiSources[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return iSourceCount;
|
||||||
|
}
|
||||||
|
#endif
|
49
src/audio/oal/aldlist.h
Normal file
49
src/audio/oal/aldlist.h
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
#ifndef ALDEVICELIST_H
|
||||||
|
#define ALDEVICELIST_H
|
||||||
|
|
||||||
|
#include "oal_utils.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#pragma warning(disable: 4786) //disable warning "identifier was truncated to '255' characters in the browser information"
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
std::string strDeviceName;
|
||||||
|
int iMajorVersion;
|
||||||
|
int iMinorVersion;
|
||||||
|
unsigned int uiSourceCount;
|
||||||
|
std::vector<std::string> *pvstrExtensions;
|
||||||
|
bool bSelected;
|
||||||
|
} ALDEVICEINFO, *LPALDEVICEINFO;
|
||||||
|
|
||||||
|
class ALDeviceList
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::vector<ALDEVICEINFO> vDeviceInfo;
|
||||||
|
int defaultDeviceIndex;
|
||||||
|
int filterIndex;
|
||||||
|
|
||||||
|
public:
|
||||||
|
ALDeviceList ();
|
||||||
|
~ALDeviceList ();
|
||||||
|
int GetNumDevices();
|
||||||
|
char *GetDeviceName(int index);
|
||||||
|
void GetDeviceVersion(int index, int *major, int *minor);
|
||||||
|
unsigned int GetMaxNumSources(int index);
|
||||||
|
bool IsExtensionSupported(int index, char *szExtName);
|
||||||
|
int GetDefaultDevice();
|
||||||
|
void FilterDevicesMinVer(int major, int minor);
|
||||||
|
void FilterDevicesMaxVer(int major, int minor);
|
||||||
|
void FilterDevicesExtension(char *szExtName);
|
||||||
|
void ResetFilters();
|
||||||
|
int GetFirstFilteredDevice();
|
||||||
|
int GetNextFilteredDevice();
|
||||||
|
|
||||||
|
private:
|
||||||
|
unsigned int GetMaxNumSources();
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // ALDEVICELIST_H
|
210
src/audio/oal/channel.cpp
Normal file
210
src/audio/oal/channel.cpp
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
#include "channel.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#include "common.h"
|
||||||
|
#include "sampman.h"
|
||||||
|
|
||||||
|
extern bool IsFXSupported();
|
||||||
|
|
||||||
|
CChannel::CChannel()
|
||||||
|
{
|
||||||
|
alSource = AL_NONE;
|
||||||
|
alFilter = AL_FILTER_NULL;
|
||||||
|
SetDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetDefault()
|
||||||
|
{
|
||||||
|
alBuffer = AL_NONE;
|
||||||
|
|
||||||
|
Pitch = 1.0f;
|
||||||
|
Gain = 1.0f;
|
||||||
|
Mix = 0.0f;
|
||||||
|
|
||||||
|
Position[0] = 0.0f; Position[1] = 0.0f; Position[2] = 0.0f;
|
||||||
|
Distances[0] = 0.0f; Distances[1] = FLT_MAX;
|
||||||
|
LoopCount = 1;
|
||||||
|
LoopPoints[0] = 0; LoopPoints[1] = -1;
|
||||||
|
|
||||||
|
Frequency = MAX_FREQ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::Reset()
|
||||||
|
{
|
||||||
|
ClearBuffer();
|
||||||
|
SetDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::Init(bool Is2D)
|
||||||
|
{
|
||||||
|
ASSERT(!HasSource());
|
||||||
|
alGenSources(1, &alSource);
|
||||||
|
if ( HasSource() )
|
||||||
|
{
|
||||||
|
alSourcei(alSource, AL_SOURCE_RELATIVE, AL_TRUE);
|
||||||
|
if ( IsFXSupported() )
|
||||||
|
alSource3i(alSource, AL_AUXILIARY_SEND_FILTER, AL_EFFECTSLOT_NULL, 0, AL_FILTER_NULL);
|
||||||
|
|
||||||
|
if ( Is2D )
|
||||||
|
{
|
||||||
|
alSource3f(alSource, AL_POSITION, 0.0f, 0.0f, 0.0f);
|
||||||
|
alSourcef (alSource, AL_GAIN, 1.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( IsFXSupported() )
|
||||||
|
alGenFilters(1,&alFilter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::Term()
|
||||||
|
{
|
||||||
|
Stop();
|
||||||
|
if ( HasSource() )
|
||||||
|
{
|
||||||
|
if ( IsFXSupported() )
|
||||||
|
{
|
||||||
|
alSource3i(alSource, AL_AUXILIARY_SEND_FILTER, AL_EFFECTSLOT_NULL, 0, AL_FILTER_NULL);
|
||||||
|
|
||||||
|
if(alFilter != AL_FILTER_NULL)
|
||||||
|
alDeleteFilters(1,&alFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
alDeleteSources(1, &alSource);
|
||||||
|
}
|
||||||
|
alSource = AL_NONE;
|
||||||
|
alFilter = AL_FILTER_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::Start()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
|
||||||
|
if ( LoopPoints[0] != 0 && LoopPoints[0] != -1 )
|
||||||
|
alBufferiv(alBuffer, AL_LOOP_POINTS_SOFT, LoopPoints);
|
||||||
|
alSourcei (alSource, AL_BUFFER, alBuffer);
|
||||||
|
alSourcePlay(alSource);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::Stop()
|
||||||
|
{
|
||||||
|
if ( HasSource() )
|
||||||
|
alSourceStop(alSource);
|
||||||
|
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CChannel::HasSource()
|
||||||
|
{
|
||||||
|
return alSource != AL_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CChannel::IsUsed()
|
||||||
|
{
|
||||||
|
if ( HasSource() )
|
||||||
|
{
|
||||||
|
ALint sourceState;
|
||||||
|
alGetSourcei(alSource, AL_SOURCE_STATE, &sourceState);
|
||||||
|
return sourceState == AL_PLAYING;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetPitch(float pitch)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSourcef(alSource, AL_PITCH, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetGain(float gain)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSourcef(alSource, AL_GAIN, gain);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetVolume(int32 vol)
|
||||||
|
{
|
||||||
|
SetGain(ALfloat(vol) / MAX_VOLUME);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetSampleID(uint32 nSfx)
|
||||||
|
{
|
||||||
|
Sample = nSfx;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetFreq(int32 freq)
|
||||||
|
{
|
||||||
|
Frequency = freq;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetCurrentFreq(uint32 freq)
|
||||||
|
{
|
||||||
|
SetPitch(ALfloat(freq) / Frequency);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetLoopCount(int32 loopCount) // fake. TODO:
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSourcei(alSource, AL_LOOPING, loopCount == 1 ? AL_FALSE : AL_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetLoopPoints(ALint start, ALint end)
|
||||||
|
{
|
||||||
|
LoopPoints[0] = start;
|
||||||
|
LoopPoints[1] = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetPosition(float x, float y, float z)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSource3f(alSource, AL_POSITION, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetDistances(float max, float min)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSourcef (alSource, AL_MAX_DISTANCE, max);
|
||||||
|
alSourcef (alSource, AL_REFERENCE_DISTANCE, min);
|
||||||
|
alSourcef (alSource, AL_MAX_GAIN, 1.0f);
|
||||||
|
alSourcef (alSource, AL_ROLLOFF_FACTOR, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetPan(uint32 pan)
|
||||||
|
{
|
||||||
|
SetPosition((pan-63)/64.0f, 0.0f, Sqrt(1.0f-SQR((pan-63)/64.0f)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetBuffer(ALuint buffer)
|
||||||
|
{
|
||||||
|
alBuffer = buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::ClearBuffer()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
SetBuffer(AL_NONE);
|
||||||
|
alSourcei(alSource, AL_BUFFER, AL_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::SetReverbMix(ALuint slot, float mix)
|
||||||
|
{
|
||||||
|
if ( !IsFXSupported() ) return;
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
if ( alFilter == AL_FILTER_NULL ) return;
|
||||||
|
|
||||||
|
Mix = mix;
|
||||||
|
EAX3_SetReverbMix(alFilter, mix);
|
||||||
|
alSource3i(alSource, AL_AUXILIARY_SEND_FILTER, slot, 0, alFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChannel::UpdateReverb(ALuint slot)
|
||||||
|
{
|
||||||
|
if ( !IsFXSupported() ) return;
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
if ( alFilter == AL_FILTER_NULL ) return;
|
||||||
|
EAX3_SetReverbMix(alFilter, Mix);
|
||||||
|
alSource3i(alSource, AL_AUXILIARY_SEND_FILTER, slot, 0, alFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
51
src/audio/oal/channel.h
Normal file
51
src/audio/oal/channel.h
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#pragma once
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#include "oal/oal_utils.h"
|
||||||
|
#include <AL/al.h>
|
||||||
|
#include <AL/alext.h>
|
||||||
|
#include <AL/efx.h>
|
||||||
|
|
||||||
|
|
||||||
|
class CChannel
|
||||||
|
{
|
||||||
|
ALuint alSource;
|
||||||
|
ALuint alFilter;
|
||||||
|
ALuint alBuffer;
|
||||||
|
float Pitch, Gain;
|
||||||
|
float Mix;
|
||||||
|
int32 Frequency;
|
||||||
|
float Position[3];
|
||||||
|
float Distances[2];
|
||||||
|
int32 LoopCount;
|
||||||
|
ALint LoopPoints[2];
|
||||||
|
uint32 Sample;
|
||||||
|
public:
|
||||||
|
CChannel();
|
||||||
|
void SetDefault();
|
||||||
|
void Reset();
|
||||||
|
void Init(bool Is2D = false);
|
||||||
|
void Term();
|
||||||
|
void Start();
|
||||||
|
void Stop();
|
||||||
|
bool HasSource();
|
||||||
|
bool IsUsed();
|
||||||
|
void SetPitch(float pitch);
|
||||||
|
void SetGain(float gain);
|
||||||
|
void SetVolume(int32 vol);
|
||||||
|
void SetSampleID(uint32 nSfx);
|
||||||
|
void SetFreq(int32 freq);
|
||||||
|
void SetCurrentFreq(uint32 freq);
|
||||||
|
void SetLoopCount(int32 loopCount); // fake
|
||||||
|
void SetLoopPoints(ALint start, ALint end);
|
||||||
|
void SetPosition(float x, float y, float z);
|
||||||
|
void SetDistances(float max, float min);
|
||||||
|
void SetPan(uint32 pan);
|
||||||
|
void SetBuffer(ALuint buffer);
|
||||||
|
void ClearBuffer();
|
||||||
|
void SetReverbMix(ALuint slot, float mix);
|
||||||
|
void UpdateReverb(ALuint slot);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
169
src/audio/oal/oal_utils.cpp
Normal file
169
src/audio/oal/oal_utils.cpp
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
#include "oal_utils.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
|
||||||
|
LPALGENEFFECTS alGenEffects;
|
||||||
|
LPALDELETEEFFECTS alDeleteEffects;
|
||||||
|
LPALISEFFECT alIsEffect;
|
||||||
|
LPALEFFECTI alEffecti;
|
||||||
|
LPALEFFECTIV alEffectiv;
|
||||||
|
LPALEFFECTF alEffectf;
|
||||||
|
LPALEFFECTFV alEffectfv;
|
||||||
|
LPALGETEFFECTI alGetEffecti;
|
||||||
|
LPALGETEFFECTIV alGetEffectiv;
|
||||||
|
LPALGETEFFECTF alGetEffectf;
|
||||||
|
LPALGETEFFECTFV alGetEffectfv;
|
||||||
|
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
|
||||||
|
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
|
||||||
|
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
|
||||||
|
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
|
||||||
|
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
|
||||||
|
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
|
||||||
|
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
|
||||||
|
LPALGENFILTERS alGenFilters;
|
||||||
|
LPALDELETEFILTERS alDeleteFilters;
|
||||||
|
LPALISFILTER alIsFilter;
|
||||||
|
LPALFILTERI alFilteri;
|
||||||
|
LPALFILTERIV alFilteriv;
|
||||||
|
LPALFILTERF alFilterf;
|
||||||
|
LPALFILTERFV alFilterfv;
|
||||||
|
LPALGETFILTERI alGetFilteri;
|
||||||
|
LPALGETFILTERIV alGetFilteriv;
|
||||||
|
LPALGETFILTERF alGetFilterf;
|
||||||
|
LPALGETFILTERFV alGetFilterfv;
|
||||||
|
|
||||||
|
|
||||||
|
void EFXInit()
|
||||||
|
{
|
||||||
|
/* Define a macro to help load the function pointers. */
|
||||||
|
#define LOAD_PROC(T, x) ((x) = (T)alGetProcAddress(#x))
|
||||||
|
LOAD_PROC(LPALGENEFFECTS, alGenEffects);
|
||||||
|
LOAD_PROC(LPALDELETEEFFECTS, alDeleteEffects);
|
||||||
|
LOAD_PROC(LPALISEFFECT, alIsEffect);
|
||||||
|
LOAD_PROC(LPALEFFECTI, alEffecti);
|
||||||
|
LOAD_PROC(LPALEFFECTIV, alEffectiv);
|
||||||
|
LOAD_PROC(LPALEFFECTF, alEffectf);
|
||||||
|
LOAD_PROC(LPALEFFECTFV, alEffectfv);
|
||||||
|
LOAD_PROC(LPALGETEFFECTI, alGetEffecti);
|
||||||
|
LOAD_PROC(LPALGETEFFECTIV, alGetEffectiv);
|
||||||
|
LOAD_PROC(LPALGETEFFECTF, alGetEffectf);
|
||||||
|
LOAD_PROC(LPALGETEFFECTFV, alGetEffectfv);
|
||||||
|
|
||||||
|
LOAD_PROC(LPALGENFILTERS, alGenFilters);
|
||||||
|
LOAD_PROC(LPALDELETEFILTERS, alDeleteFilters);
|
||||||
|
LOAD_PROC(LPALISFILTER, alIsFilter);
|
||||||
|
LOAD_PROC(LPALFILTERI, alFilteri);
|
||||||
|
LOAD_PROC(LPALFILTERIV, alFilteriv);
|
||||||
|
LOAD_PROC(LPALFILTERF, alFilterf);
|
||||||
|
LOAD_PROC(LPALFILTERFV, alFilterfv);
|
||||||
|
LOAD_PROC(LPALGETFILTERI, alGetFilteri);
|
||||||
|
LOAD_PROC(LPALGETFILTERIV, alGetFilteriv);
|
||||||
|
LOAD_PROC(LPALGETFILTERF, alGetFilterf);
|
||||||
|
LOAD_PROC(LPALGETFILTERFV, alGetFilterfv);
|
||||||
|
|
||||||
|
LOAD_PROC(LPALGENAUXILIARYEFFECTSLOTS, alGenAuxiliaryEffectSlots);
|
||||||
|
LOAD_PROC(LPALDELETEAUXILIARYEFFECTSLOTS, alDeleteAuxiliaryEffectSlots);
|
||||||
|
LOAD_PROC(LPALISAUXILIARYEFFECTSLOT, alIsAuxiliaryEffectSlot);
|
||||||
|
LOAD_PROC(LPALAUXILIARYEFFECTSLOTI, alAuxiliaryEffectSloti);
|
||||||
|
LOAD_PROC(LPALAUXILIARYEFFECTSLOTIV, alAuxiliaryEffectSlotiv);
|
||||||
|
LOAD_PROC(LPALAUXILIARYEFFECTSLOTF, alAuxiliaryEffectSlotf);
|
||||||
|
LOAD_PROC(LPALAUXILIARYEFFECTSLOTFV, alAuxiliaryEffectSlotfv);
|
||||||
|
LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTI, alGetAuxiliaryEffectSloti);
|
||||||
|
LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTIV, alGetAuxiliaryEffectSlotiv);
|
||||||
|
LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTF, alGetAuxiliaryEffectSlotf);
|
||||||
|
LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTFV, alGetAuxiliaryEffectSlotfv);
|
||||||
|
#undef LOAD_PROC
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetEffectsLevel(ALuint uiFilter, float level)
|
||||||
|
{
|
||||||
|
alFilteri(uiFilter, AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
||||||
|
alFilterf(uiFilter, AL_LOWPASS_GAIN, 1.0f);
|
||||||
|
alFilterf(uiFilter, AL_LOWPASS_GAINHF, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline float gain_to_mB(float gain)
|
||||||
|
{
|
||||||
|
return (gain > 1e-5f) ? (float)(log10f(gain) * 2000.0f) : -10000l;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline float mB_to_gain(float millibels)
|
||||||
|
{
|
||||||
|
return (millibels > -10000.0f) ? powf(10.0f, millibels/2000.0f) : 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline float clampF(float val, float minval, float maxval)
|
||||||
|
{
|
||||||
|
if(val >= maxval) return maxval;
|
||||||
|
if(val <= minval) return minval;
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EAX3_Set(ALuint effect, const EAXLISTENERPROPERTIES *props)
|
||||||
|
{
|
||||||
|
alEffecti (effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_DENSITY, clampF(powf(props->flEnvironmentSize, 3.0f) / 16.0f, 0.0f, 1.0f));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_DIFFUSION, props->flEnvironmentDiffusion);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_GAIN, mB_to_gain((float)props->lRoom));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_GAINHF, mB_to_gain((float)props->lRoomHF));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_GAINLF, mB_to_gain((float)props->lRoomLF));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_DECAY_TIME, props->flDecayTime);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_DECAY_HFRATIO, props->flDecayHFRatio);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_DECAY_LFRATIO, props->flDecayLFRatio);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_REFLECTIONS_GAIN, clampF(mB_to_gain((float)props->lReflections), AL_EAXREVERB_MIN_REFLECTIONS_GAIN, AL_EAXREVERB_MAX_REFLECTIONS_GAIN));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_REFLECTIONS_DELAY, props->flReflectionsDelay);
|
||||||
|
alEffectfv(effect, AL_EAXREVERB_REFLECTIONS_PAN, &props->vReflectionsPan.x);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_LATE_REVERB_GAIN, clampF(mB_to_gain((float)props->lReverb), AL_EAXREVERB_MIN_LATE_REVERB_GAIN, AL_EAXREVERB_MAX_LATE_REVERB_GAIN));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_LATE_REVERB_DELAY, props->flReverbDelay);
|
||||||
|
alEffectfv(effect, AL_EAXREVERB_LATE_REVERB_PAN, &props->vReverbPan.x);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_ECHO_TIME, props->flEchoTime);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_ECHO_DEPTH, props->flEchoDepth);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_MODULATION_TIME, props->flModulationTime);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_MODULATION_DEPTH, props->flModulationDepth);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, clampF(mB_to_gain(props->flAirAbsorptionHF), AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF, AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF));
|
||||||
|
alEffectf (effect, AL_EAXREVERB_HFREFERENCE, props->flHFReference);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_LFREFERENCE, props->flLFReference);
|
||||||
|
alEffectf (effect, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, props->flRoomRolloffFactor);
|
||||||
|
alEffecti (effect, AL_EAXREVERB_DECAY_HFLIMIT, (props->ulFlags&EAXLISTENERFLAGS_DECAYHFLIMIT) ? AL_TRUE : AL_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EFX_Set(ALuint effect, const EAXLISTENERPROPERTIES *props)
|
||||||
|
{
|
||||||
|
alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_REVERB);
|
||||||
|
|
||||||
|
alEffectf(effect, AL_REVERB_DENSITY, clampF(powf(props->flEnvironmentSize, 3.0f) / 16.0f, 0.0f, 1.0f));
|
||||||
|
alEffectf(effect, AL_REVERB_DIFFUSION, props->flEnvironmentDiffusion);
|
||||||
|
alEffectf(effect, AL_REVERB_GAIN, mB_to_gain((float)props->lRoom));
|
||||||
|
alEffectf(effect, AL_REVERB_GAINHF, mB_to_gain((float)props->lRoomHF));
|
||||||
|
alEffectf(effect, AL_REVERB_DECAY_TIME, props->flDecayTime);
|
||||||
|
alEffectf(effect, AL_REVERB_DECAY_HFRATIO, props->flDecayHFRatio);
|
||||||
|
alEffectf(effect, AL_REVERB_REFLECTIONS_GAIN, clampF(mB_to_gain((float)props->lReflections), AL_EAXREVERB_MIN_REFLECTIONS_GAIN, AL_EAXREVERB_MAX_REFLECTIONS_GAIN));
|
||||||
|
alEffectf(effect, AL_REVERB_REFLECTIONS_DELAY, props->flReflectionsDelay);
|
||||||
|
alEffectf(effect, AL_REVERB_LATE_REVERB_GAIN, clampF(mB_to_gain((float)props->lReverb), AL_EAXREVERB_MIN_LATE_REVERB_GAIN, AL_EAXREVERB_MAX_LATE_REVERB_GAIN));
|
||||||
|
alEffectf(effect, AL_REVERB_LATE_REVERB_DELAY, props->flReverbDelay);
|
||||||
|
alEffectf(effect, AL_REVERB_AIR_ABSORPTION_GAINHF, clampF(mB_to_gain(props->flAirAbsorptionHF), AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF, AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF));
|
||||||
|
alEffectf(effect, AL_REVERB_ROOM_ROLLOFF_FACTOR, props->flRoomRolloffFactor);
|
||||||
|
alEffecti(effect, AL_REVERB_DECAY_HFLIMIT, (props->ulFlags&EAXLISTENERFLAGS_DECAYHFLIMIT) ? AL_TRUE : AL_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EAX3_SetReverbMix(ALuint filter, float mix)
|
||||||
|
{
|
||||||
|
//long vol=(long)linear_to_dB(mix);
|
||||||
|
//DSPROPERTY_EAXBUFFER_ROOMHF,
|
||||||
|
//DSPROPERTY_EAXBUFFER_ROOM,
|
||||||
|
//DSPROPERTY_EAXBUFFER_REVERBMIX,
|
||||||
|
|
||||||
|
long mbvol = gain_to_mB(mix);
|
||||||
|
float mb = mbvol;
|
||||||
|
float mbhf = mbvol;
|
||||||
|
|
||||||
|
alFilteri(filter, AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
||||||
|
alFilterf(filter, AL_LOWPASS_GAIN, mB_to_gain(Min(mb, 0.0f)));
|
||||||
|
alFilterf(filter, AL_LOWPASS_GAINHF, mB_to_gain(mbhf));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
48
src/audio/oal/oal_utils.h
Normal file
48
src/audio/oal/oal_utils.h
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#pragma once
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#include "eax.h"
|
||||||
|
#include "AL/efx.h"
|
||||||
|
|
||||||
|
|
||||||
|
void EFXInit();
|
||||||
|
void EAX3_Set(ALuint effect, const EAXLISTENERPROPERTIES *props);
|
||||||
|
void EFX_Set(ALuint effect, const EAXLISTENERPROPERTIES *props);
|
||||||
|
void EAX3_SetReverbMix(ALuint filter, float mix);
|
||||||
|
void SetEffectsLevel(ALuint uiFilter, float level);
|
||||||
|
|
||||||
|
extern LPALGENEFFECTS alGenEffects;
|
||||||
|
extern LPALDELETEEFFECTS alDeleteEffects;
|
||||||
|
extern LPALISEFFECT alIsEffect;
|
||||||
|
extern LPALEFFECTI alEffecti;
|
||||||
|
extern LPALEFFECTIV alEffectiv;
|
||||||
|
extern LPALEFFECTF alEffectf;
|
||||||
|
extern LPALEFFECTFV alEffectfv;
|
||||||
|
extern LPALGETEFFECTI alGetEffecti;
|
||||||
|
extern LPALGETEFFECTIV alGetEffectiv;
|
||||||
|
extern LPALGETEFFECTF alGetEffectf;
|
||||||
|
extern LPALGETEFFECTFV alGetEffectfv;
|
||||||
|
extern LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
|
||||||
|
extern LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
|
||||||
|
extern LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
|
||||||
|
extern LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
|
||||||
|
extern LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
|
||||||
|
extern LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
|
||||||
|
extern LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
|
||||||
|
extern LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
|
||||||
|
extern LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
|
||||||
|
extern LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
|
||||||
|
extern LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
|
||||||
|
extern LPALGENFILTERS alGenFilters;
|
||||||
|
extern LPALDELETEFILTERS alDeleteFilters;
|
||||||
|
extern LPALISFILTER alIsFilter;
|
||||||
|
extern LPALFILTERI alFilteri;
|
||||||
|
extern LPALFILTERIV alFilteriv;
|
||||||
|
extern LPALFILTERF alFilterf;
|
||||||
|
extern LPALFILTERFV alFilterfv;
|
||||||
|
extern LPALGETFILTERI alGetFilteri;
|
||||||
|
extern LPALGETFILTERIV alGetFilteriv;
|
||||||
|
extern LPALGETFILTERF alGetFilterf;
|
||||||
|
extern LPALGETFILTERFV alGetFilterfv;
|
||||||
|
#endif
|
520
src/audio/oal/stream.cpp
Normal file
520
src/audio/oal/stream.cpp
Normal file
|
@ -0,0 +1,520 @@
|
||||||
|
#include "stream.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#include "common.h"
|
||||||
|
#include "sampman.h"
|
||||||
|
|
||||||
|
typedef long ssize_t;
|
||||||
|
|
||||||
|
#include <sndfile.h>
|
||||||
|
#include <mpg123.h>
|
||||||
|
|
||||||
|
#pragma comment( lib, "libsndfile-1.lib" )
|
||||||
|
#pragma comment( lib, "libmpg123.lib" )
|
||||||
|
|
||||||
|
class CSndFile : public IDecoder
|
||||||
|
{
|
||||||
|
SNDFILE *m_pfSound;
|
||||||
|
SF_INFO m_soundInfo;
|
||||||
|
public:
|
||||||
|
CSndFile(const char *path) :
|
||||||
|
m_pfSound(nil)
|
||||||
|
{
|
||||||
|
memset(&m_soundInfo, 0, sizeof(m_soundInfo));
|
||||||
|
m_pfSound = sf_open(path, SFM_READ, &m_soundInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
~CSndFile()
|
||||||
|
{
|
||||||
|
if ( m_pfSound )
|
||||||
|
{
|
||||||
|
sf_close(m_pfSound);
|
||||||
|
m_pfSound = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsOpened()
|
||||||
|
{
|
||||||
|
return m_pfSound != nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetSampleSize()
|
||||||
|
{
|
||||||
|
return sizeof(uint16);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetSampleCount()
|
||||||
|
{
|
||||||
|
return m_soundInfo.frames;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetSampleRate()
|
||||||
|
{
|
||||||
|
return m_soundInfo.samplerate;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetChannels()
|
||||||
|
{
|
||||||
|
return m_soundInfo.channels;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seek(uint32 milliseconds)
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return;
|
||||||
|
sf_seek(m_pfSound, ms2samples(milliseconds), SF_SEEK_SET);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Tell()
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return 0;
|
||||||
|
return samples2ms(sf_seek(m_pfSound, 0, SF_SEEK_CUR));
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Decode(void *buffer)
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return 0;
|
||||||
|
return sf_read_short(m_pfSound, (short *)buffer, GetBufferSamples()) * GetSampleSize();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class CMP3File : public IDecoder
|
||||||
|
{
|
||||||
|
mpg123_handle *m_pMH;
|
||||||
|
bool m_bOpened;
|
||||||
|
uint32 m_nRate;
|
||||||
|
uint32 m_nChannels;
|
||||||
|
public:
|
||||||
|
CMP3File(const char *path) :
|
||||||
|
m_pMH(nil),
|
||||||
|
m_bOpened(false),
|
||||||
|
m_nRate(0),
|
||||||
|
m_nChannels(0)
|
||||||
|
{
|
||||||
|
m_pMH = mpg123_new(nil, nil);
|
||||||
|
if ( m_pMH )
|
||||||
|
{
|
||||||
|
long rate = 0;
|
||||||
|
int channels = 0;
|
||||||
|
int encoding = 0;
|
||||||
|
|
||||||
|
m_bOpened = mpg123_open(m_pMH, path) == MPG123_OK
|
||||||
|
&& mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK;
|
||||||
|
m_nRate = rate;
|
||||||
|
m_nChannels = channels;
|
||||||
|
|
||||||
|
if ( IsOpened() )
|
||||||
|
{
|
||||||
|
mpg123_format_none(m_pMH);
|
||||||
|
mpg123_format(m_pMH, rate, channels, encoding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
~CMP3File()
|
||||||
|
{
|
||||||
|
if ( m_pMH )
|
||||||
|
{
|
||||||
|
mpg123_close(m_pMH);
|
||||||
|
mpg123_delete(m_pMH);
|
||||||
|
m_pMH = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsOpened()
|
||||||
|
{
|
||||||
|
return m_bOpened;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetSampleSize()
|
||||||
|
{
|
||||||
|
return sizeof(uint16);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetSampleCount()
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return 0;
|
||||||
|
return mpg123_length(m_pMH);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetSampleRate()
|
||||||
|
{
|
||||||
|
return m_nRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetChannels()
|
||||||
|
{
|
||||||
|
return m_nChannels;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seek(uint32 milliseconds)
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return;
|
||||||
|
mpg123_seek(m_pMH, ms2samples(milliseconds)*GetSampleSize(), SEEK_SET);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Tell()
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return 0;
|
||||||
|
return samples2ms(mpg123_tell(m_pMH)/GetSampleSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Decode(void *buffer)
|
||||||
|
{
|
||||||
|
if ( !IsOpened() ) return 0;
|
||||||
|
|
||||||
|
size_t size;
|
||||||
|
int err = mpg123_read(m_pMH, (unsigned char *)buffer, GetBufferSize(), &size);
|
||||||
|
if (err != MPG123_OK && err != MPG123_DONE) return 0;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void CStream::Initialise()
|
||||||
|
{
|
||||||
|
mpg123_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::Terminate()
|
||||||
|
{
|
||||||
|
mpg123_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
CStream::CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUFFERS]) :
|
||||||
|
m_alSource(source),
|
||||||
|
m_alBuffers(buffers),
|
||||||
|
m_pBuffer(nil),
|
||||||
|
m_bPaused(false),
|
||||||
|
m_bActive(false),
|
||||||
|
m_pSoundFile(nil),
|
||||||
|
m_bReset(false),
|
||||||
|
m_nVolume(0),
|
||||||
|
m_nPan(0),
|
||||||
|
m_nPosBeforeReset(0)
|
||||||
|
|
||||||
|
{
|
||||||
|
strcpy(m_aFilename, filename);
|
||||||
|
|
||||||
|
DEV("Stream %s\n", m_aFilename);
|
||||||
|
|
||||||
|
if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".mp3")], ".mp3"))
|
||||||
|
m_pSoundFile = new CMP3File(m_aFilename);
|
||||||
|
else if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".wav")], ".wav"))
|
||||||
|
m_pSoundFile = new CSndFile(m_aFilename);
|
||||||
|
else
|
||||||
|
m_pSoundFile = nil;
|
||||||
|
ASSERT(m_pSoundFile != nil);
|
||||||
|
if (m_pSoundFile && m_pSoundFile->IsOpened() )
|
||||||
|
{
|
||||||
|
m_pBuffer = malloc(m_pSoundFile->GetBufferSize());
|
||||||
|
ASSERT(m_pBuffer!=nil);
|
||||||
|
|
||||||
|
DEV("AvgSamplesPerSec: %d\n", m_pSoundFile->GetAvgSamplesPerSec());
|
||||||
|
DEV("SampleCount: %d\n", m_pSoundFile->GetSampleCount());
|
||||||
|
DEV("SampleRate: %d\n", m_pSoundFile->GetSampleRate());
|
||||||
|
DEV("Channels: %d\n", m_pSoundFile->GetChannels());
|
||||||
|
DEV("Buffer Samples: %d\n", m_pSoundFile->GetBufferSamples());
|
||||||
|
DEV("Buffer sec: %f\n", (float(m_pSoundFile->GetBufferSamples()) / float(m_pSoundFile->GetChannels())/ float(m_pSoundFile->GetSampleRate())));
|
||||||
|
DEV("Length MS: %02d:%02d\n", (m_pSoundFile->GetLength() / 1000) / 60, (m_pSoundFile->GetLength() / 1000) % 60);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CStream::~CStream()
|
||||||
|
{
|
||||||
|
Delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::Delete()
|
||||||
|
{
|
||||||
|
Stop();
|
||||||
|
ClearBuffers();
|
||||||
|
|
||||||
|
if ( m_pSoundFile )
|
||||||
|
{
|
||||||
|
delete m_pSoundFile;
|
||||||
|
m_pSoundFile = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_pBuffer )
|
||||||
|
{
|
||||||
|
free(m_pBuffer);
|
||||||
|
m_pBuffer = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CStream::HasSource()
|
||||||
|
{
|
||||||
|
return m_alSource != AL_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CStream::IsOpened()
|
||||||
|
{
|
||||||
|
return m_pSoundFile->IsOpened();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CStream::IsPlaying()
|
||||||
|
{
|
||||||
|
if ( !HasSource() || !IsOpened() ) return false;
|
||||||
|
|
||||||
|
if ( m_pSoundFile->IsOpened() && !m_bPaused )
|
||||||
|
{
|
||||||
|
ALint sourceState;
|
||||||
|
alGetSourcei(m_alSource, AL_SOURCE_STATE, &sourceState);
|
||||||
|
if ( m_bActive || sourceState == AL_PLAYING )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::Pause()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
ALint sourceState = AL_PAUSED;
|
||||||
|
alGetSourcei(m_alSource, AL_SOURCE_STATE, &sourceState);
|
||||||
|
if (sourceState != AL_PAUSED )
|
||||||
|
alSourcePause(m_alSource);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetPause(bool bPause)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
if ( bPause )
|
||||||
|
{
|
||||||
|
Pause();
|
||||||
|
m_bPaused = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_bPaused)
|
||||||
|
SetPlay(true);
|
||||||
|
m_bPaused = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetPitch(float pitch)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSourcef(m_alSource, AL_PITCH, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetGain(float gain)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSourcef(m_alSource, AL_GAIN, gain);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetPosition(float x, float y, float z)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
alSource3f(m_alSource, AL_POSITION, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetVolume(uint32 nVol)
|
||||||
|
{
|
||||||
|
m_nVolume = nVol;
|
||||||
|
SetGain(ALfloat(nVol) / MAX_VOLUME);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetPan(uint8 nPan)
|
||||||
|
{
|
||||||
|
m_nPan = nPan;
|
||||||
|
SetPosition((nPan - 63)/64.0f, 0.0f, Sqrt(1.0f-SQR((nPan-63)/64.0f)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetPosMS(uint32 nPos)
|
||||||
|
{
|
||||||
|
if ( !m_pSoundFile->IsOpened() ) return;
|
||||||
|
m_pSoundFile->Seek(nPos);
|
||||||
|
ClearBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 CStream::GetPosMS()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return 0;
|
||||||
|
if ( !m_pSoundFile->IsOpened() ) return 0;
|
||||||
|
|
||||||
|
ALint offset;
|
||||||
|
//alGetSourcei(m_alSource, AL_SAMPLE_OFFSET, &offset);
|
||||||
|
alGetSourcei(m_alSource, AL_BYTE_OFFSET, &offset);
|
||||||
|
|
||||||
|
return m_pSoundFile->Tell()
|
||||||
|
- m_pSoundFile->samples2ms(m_pSoundFile->GetBufferSamples() * (NUM_STREAMBUFFERS-1))
|
||||||
|
+ m_pSoundFile->samples2ms(offset/m_pSoundFile->GetSampleSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 CStream::GetLengthMS()
|
||||||
|
{
|
||||||
|
if ( !m_pSoundFile->IsOpened() ) return 0;
|
||||||
|
return m_pSoundFile->GetLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CStream::FillBuffer(ALuint alBuffer)
|
||||||
|
{
|
||||||
|
if ( !HasSource() )
|
||||||
|
return false;
|
||||||
|
if ( !m_pSoundFile->IsOpened() )
|
||||||
|
return false;
|
||||||
|
if ( !(alBuffer != AL_NONE && alIsBuffer(alBuffer)) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
uint32 size = m_pSoundFile->Decode(m_pBuffer);
|
||||||
|
if( size == 0 )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
alBufferData(alBuffer, m_pSoundFile->GetChannels() == 1 ? AL_FORMAT_MONO16 : AL_FORMAT_STEREO16,
|
||||||
|
m_pBuffer, size, m_pSoundFile->GetSampleRate());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32 CStream::FillBuffers()
|
||||||
|
{
|
||||||
|
int32 i = 0;
|
||||||
|
for ( i = 0; i < NUM_STREAMBUFFERS; i++ )
|
||||||
|
{
|
||||||
|
if ( !FillBuffer(m_alBuffers[i]) )
|
||||||
|
break;
|
||||||
|
alSourceQueueBuffers(m_alSource, 1, &m_alBuffers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::ClearBuffers()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
|
||||||
|
ALint buffersQueued;
|
||||||
|
alGetSourcei(m_alSource, AL_BUFFERS_QUEUED, &buffersQueued);
|
||||||
|
|
||||||
|
ALuint value;
|
||||||
|
while (buffersQueued--)
|
||||||
|
alSourceUnqueueBuffers(m_alSource, 1, &value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CStream::Setup()
|
||||||
|
{
|
||||||
|
if ( m_pSoundFile->IsOpened() )
|
||||||
|
{
|
||||||
|
m_pSoundFile->Seek(0);
|
||||||
|
alSourcei(m_alSource, AL_SOURCE_RELATIVE, AL_TRUE);
|
||||||
|
//SetPosition(0.0f, 0.0f, 0.0f);
|
||||||
|
SetPitch(1.0f);
|
||||||
|
//SetPan(m_nPan);
|
||||||
|
//SetVolume(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
return IsOpened();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::SetPlay(bool state)
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
if ( state )
|
||||||
|
{
|
||||||
|
ALint sourceState = AL_PLAYING;
|
||||||
|
alGetSourcei(m_alSource, AL_SOURCE_STATE, &sourceState);
|
||||||
|
if (sourceState != AL_PLAYING )
|
||||||
|
alSourcePlay(m_alSource);
|
||||||
|
m_bActive = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ALint sourceState = AL_STOPPED;
|
||||||
|
alGetSourcei(m_alSource, AL_SOURCE_STATE, &sourceState);
|
||||||
|
if (sourceState != AL_STOPPED )
|
||||||
|
alSourceStop(m_alSource);
|
||||||
|
m_bActive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::Start()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
if ( FillBuffers() != 0 )
|
||||||
|
SetPlay(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::Stop()
|
||||||
|
{
|
||||||
|
if ( !HasSource() ) return;
|
||||||
|
SetPlay(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::Update()
|
||||||
|
{
|
||||||
|
if ( !IsOpened() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( !HasSource() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( m_bReset )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( !m_bPaused )
|
||||||
|
{
|
||||||
|
ALint sourceState;
|
||||||
|
ALint buffersProcessed = 0;
|
||||||
|
|
||||||
|
alGetSourcei(m_alSource, AL_SOURCE_STATE, &sourceState);
|
||||||
|
alGetSourcei(m_alSource, AL_BUFFERS_PROCESSED, &buffersProcessed);
|
||||||
|
|
||||||
|
ALint looping = AL_FALSE;
|
||||||
|
alGetSourcei(m_alSource, AL_LOOPING, &looping);
|
||||||
|
|
||||||
|
if ( looping == AL_TRUE )
|
||||||
|
{
|
||||||
|
TRACE("stream set looping");
|
||||||
|
alSourcei(m_alSource, AL_LOOPING, AL_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
while( buffersProcessed-- )
|
||||||
|
{
|
||||||
|
ALuint buffer;
|
||||||
|
|
||||||
|
alSourceUnqueueBuffers(m_alSource, 1, &buffer);
|
||||||
|
|
||||||
|
if ( m_bActive && FillBuffer(buffer) )
|
||||||
|
alSourceQueueBuffers(m_alSource, 1, &buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sourceState != AL_PLAYING )
|
||||||
|
{
|
||||||
|
alGetSourcei(m_alSource, AL_BUFFERS_PROCESSED, &buffersProcessed);
|
||||||
|
SetPlay(buffersProcessed!=0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::ProviderInit()
|
||||||
|
{
|
||||||
|
if ( m_bReset )
|
||||||
|
{
|
||||||
|
if ( Setup() )
|
||||||
|
{
|
||||||
|
SetPan(m_nPan);
|
||||||
|
SetVolume(m_nVolume);
|
||||||
|
SetPosMS(m_nPosBeforeReset);
|
||||||
|
if (m_bActive)
|
||||||
|
FillBuffers();
|
||||||
|
SetPlay(m_bActive);
|
||||||
|
if ( m_bPaused )
|
||||||
|
Pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_bReset = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStream::ProviderTerm()
|
||||||
|
{
|
||||||
|
m_bReset = true;
|
||||||
|
m_nPosBeforeReset = GetPosMS();
|
||||||
|
|
||||||
|
ClearBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
112
src/audio/oal/stream.h
Normal file
112
src/audio/oal/stream.h
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
#pragma once
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#include <AL/al.h>
|
||||||
|
|
||||||
|
#define NUM_STREAMBUFFERS 4
|
||||||
|
|
||||||
|
class IDecoder
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~IDecoder() { }
|
||||||
|
|
||||||
|
virtual bool IsOpened() = 0;
|
||||||
|
|
||||||
|
virtual uint32 GetSampleSize() = 0;
|
||||||
|
virtual uint32 GetSampleCount() = 0;
|
||||||
|
virtual uint32 GetSampleRate() = 0;
|
||||||
|
virtual uint32 GetChannels() = 0;
|
||||||
|
|
||||||
|
uint32 GetAvgSamplesPerSec()
|
||||||
|
{
|
||||||
|
return GetChannels() * GetSampleRate();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 ms2samples(uint32 ms)
|
||||||
|
{
|
||||||
|
return float(ms) / 1000.0f * float(GetChannels()) * float(GetSampleRate());
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 samples2ms(uint32 sm)
|
||||||
|
{
|
||||||
|
return float(sm) * 1000.0f / float(GetChannels()) / float(GetSampleRate());
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetBufferSamples()
|
||||||
|
{
|
||||||
|
//return (GetAvgSamplesPerSec() >> 2) - (GetSampleCount() % GetChannels());
|
||||||
|
return (GetAvgSamplesPerSec() / 4); // 250ms
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetBufferSize()
|
||||||
|
{
|
||||||
|
return GetBufferSamples() * GetSampleSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void Seek(uint32 milliseconds) = 0;
|
||||||
|
virtual uint32 Tell() = 0;
|
||||||
|
|
||||||
|
uint32 GetLength()
|
||||||
|
{
|
||||||
|
return float(GetSampleCount()) * 1000.0f / float(GetSampleRate());
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual uint32 Decode(void *buffer) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CStream
|
||||||
|
{
|
||||||
|
char m_aFilename[128];
|
||||||
|
ALuint &m_alSource;
|
||||||
|
ALuint (&m_alBuffers)[NUM_STREAMBUFFERS];
|
||||||
|
|
||||||
|
bool m_bPaused;
|
||||||
|
bool m_bActive;
|
||||||
|
|
||||||
|
void *m_pBuffer;
|
||||||
|
|
||||||
|
bool m_bReset;
|
||||||
|
uint32 m_nVolume;
|
||||||
|
uint8 m_nPan;
|
||||||
|
uint32 m_nPosBeforeReset;
|
||||||
|
|
||||||
|
IDecoder *m_pSoundFile;
|
||||||
|
|
||||||
|
bool HasSource();
|
||||||
|
void SetPosition(float x, float y, float z);
|
||||||
|
void SetPitch(float pitch);
|
||||||
|
void SetGain(float gain);
|
||||||
|
void Pause();
|
||||||
|
void SetPlay(bool state);
|
||||||
|
|
||||||
|
bool FillBuffer(ALuint alBuffer);
|
||||||
|
int32 FillBuffers();
|
||||||
|
void ClearBuffers();
|
||||||
|
public:
|
||||||
|
static void Initialise();
|
||||||
|
static void Terminate();
|
||||||
|
|
||||||
|
CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUFFERS]);
|
||||||
|
~CStream();
|
||||||
|
void Delete();
|
||||||
|
|
||||||
|
bool IsOpened();
|
||||||
|
bool IsPlaying();
|
||||||
|
void SetPause (bool bPause);
|
||||||
|
void SetVolume(uint32 nVol);
|
||||||
|
void SetPan (uint8 nPan);
|
||||||
|
void SetPosMS (uint32 nPos);
|
||||||
|
uint32 GetPosMS();
|
||||||
|
uint32 GetLengthMS();
|
||||||
|
|
||||||
|
bool Setup();
|
||||||
|
void Start();
|
||||||
|
void Stop();
|
||||||
|
void Update(void);
|
||||||
|
|
||||||
|
void ProviderInit();
|
||||||
|
void ProviderTerm();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,340 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "common.h"
|
|
||||||
#include "AudioSamples.h"
|
|
||||||
|
|
||||||
#define MAX_VOLUME 127
|
|
||||||
//#define MAX_FREQ 22050
|
|
||||||
#define MAX_FREQ 32000
|
|
||||||
|
|
||||||
struct tSample {
|
|
||||||
int32 nOffset;
|
|
||||||
uint32 nSize;
|
|
||||||
int32 nFrequency;
|
|
||||||
int32 nLoopStart;
|
|
||||||
int32 nLoopEnd;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
SAMPLEBANK_MAIN,
|
|
||||||
SAMPLEBANK_PED,
|
|
||||||
MAX_SAMPLEBANKS,
|
|
||||||
SAMPLEBANK_INVALID
|
|
||||||
};
|
|
||||||
|
|
||||||
#define MAX_PEDSFX 7
|
|
||||||
#define PED_BLOCKSIZE 79000
|
|
||||||
|
|
||||||
|
|
||||||
//#define MAXCHANNELS 21 android
|
|
||||||
#define MAXCHANNELS 28
|
|
||||||
#define MAX2DCHANNELS 1
|
|
||||||
#define CHANNEL2D MAXCHANNELS
|
|
||||||
|
|
||||||
#define MAX_STREAMS 2
|
|
||||||
|
|
||||||
struct ALCdevice_struct;
|
|
||||||
struct ALCcontext_struct;
|
|
||||||
typedef struct ALCdevice_struct ALCdevice;
|
|
||||||
typedef struct ALCcontext_struct ALCcontext;
|
|
||||||
|
|
||||||
class cSampleManager
|
|
||||||
{
|
|
||||||
int field_0;
|
|
||||||
ALCdevice *m_pDevice;
|
|
||||||
ALCcontext *m_pContext;
|
|
||||||
|
|
||||||
uint8 m_nEffectsVolume;
|
|
||||||
uint8 m_nMusicVolume;
|
|
||||||
uint8 m_nEffectsFadeVolume;
|
|
||||||
uint8 m_nMusicFadeVolume;
|
|
||||||
uint8 m_nMonoMode;
|
|
||||||
char _pad0[3];
|
|
||||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSampleManager(void);
|
|
||||||
~cSampleManager(void);
|
|
||||||
|
|
||||||
void SetSpeakerConfig(int32 nConfig);
|
|
||||||
uint32 GetMaximumSupportedChannels(void);
|
|
||||||
|
|
||||||
uint32 GetNum3DProvidersAvailable();
|
|
||||||
void SetNum3DProvidersAvailable(uint32 num);
|
|
||||||
|
|
||||||
char *Get3DProviderName(uint8 id);
|
|
||||||
void Set3DProviderName(uint8 id, char *name);
|
|
||||||
|
|
||||||
int8 GetCurrent3DProviderIndex(void);
|
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
|
||||||
|
|
||||||
bool IsMP3RadioChannelAvailable(void);
|
|
||||||
|
|
||||||
void ReleaseDigitalHandle (void);
|
|
||||||
void ReacquireDigitalHandle(void);
|
|
||||||
|
|
||||||
bool Initialise(void);
|
|
||||||
void Terminate (void);
|
|
||||||
|
|
||||||
void UpdateSoundBuffers(void);
|
|
||||||
|
|
||||||
bool CheckForAnAudioFileOnCD(void);
|
|
||||||
char GetCDAudioDriveLetter (void);
|
|
||||||
|
|
||||||
void UpdateEffectsVolume(void);
|
|
||||||
|
|
||||||
void SetEffectsMasterVolume(uint8 nVolume);
|
|
||||||
void SetMusicMasterVolume (uint8 nVolume);
|
|
||||||
void SetEffectsFadeVolume (uint8 nVolume);
|
|
||||||
void SetMusicFadeVolume (uint8 nVolume);
|
|
||||||
void SetMonoMode (uint8 nMode);
|
|
||||||
|
|
||||||
bool LoadSampleBank (uint8 nBank);
|
|
||||||
void UnloadSampleBank (uint8 nBank);
|
|
||||||
bool IsSampleBankLoaded(uint8 nBank);
|
|
||||||
|
|
||||||
bool IsPedCommentLoaded(uint32 nComment);
|
|
||||||
bool LoadPedComment (uint32 nComment);
|
|
||||||
int32 GetBankContainingSound(uint32 offset);
|
|
||||||
|
|
||||||
int32 _GetPedCommentSlot(uint32 nComment);
|
|
||||||
|
|
||||||
int32 GetSampleBaseFrequency (uint32 nSample);
|
|
||||||
int32 GetSampleLoopStartOffset(uint32 nSample);
|
|
||||||
int32 GetSampleLoopEndOffset (uint32 nSample);
|
|
||||||
uint32 GetSampleLength (uint32 nSample);
|
|
||||||
|
|
||||||
bool UpdateReverb(void);
|
|
||||||
|
|
||||||
void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
|
|
||||||
bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
|
|
||||||
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
|
||||||
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
|
||||||
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
|
||||||
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
|
|
||||||
void SetChannelPan (uint32 nChannel, uint32 nPan);
|
|
||||||
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
|
|
||||||
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
|
|
||||||
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
|
|
||||||
bool GetChannelUsedFlag (uint32 nChannel);
|
|
||||||
void StartChannel (uint32 nChannel);
|
|
||||||
void StopChannel (uint32 nChannel);
|
|
||||||
|
|
||||||
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
|
||||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
|
||||||
void StartPreloadedStreamedFile (uint8 nStream);
|
|
||||||
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
|
||||||
void StopStreamedFile (uint8 nStream);
|
|
||||||
int32 GetStreamedFilePosition (uint8 nStream);
|
|
||||||
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
|
||||||
int32 GetStreamedFileLength (uint8 nStream);
|
|
||||||
bool IsStreamPlaying (uint8 nStream);
|
|
||||||
void Service(void);
|
|
||||||
bool InitialiseSampleBanks(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
extern cSampleManager SampleManager;
|
|
||||||
extern int32 BankStartOffset[MAX_SAMPLEBANKS];
|
|
||||||
|
|
||||||
static char StreamedNameTable[][25]=
|
|
||||||
{
|
|
||||||
"AUDIO\\HEAD.MP3",
|
|
||||||
"AUDIO\\CLASS.MP3",
|
|
||||||
"AUDIO\\KJAH.MP3",
|
|
||||||
"AUDIO\\RISE.MP3",
|
|
||||||
"AUDIO\\LIPS.MP3",
|
|
||||||
"AUDIO\\GAME.MP3",
|
|
||||||
"AUDIO\\MSX.MP3",
|
|
||||||
"AUDIO\\FLASH.MP3",
|
|
||||||
"AUDIO\\CHAT.MP3",
|
|
||||||
"AUDIO\\HEAD.MP3",
|
|
||||||
"AUDIO\\POLICE.MP3",
|
|
||||||
"AUDIO\\CITY.MP3",
|
|
||||||
"AUDIO\\WATER.MP3",
|
|
||||||
"AUDIO\\COMOPEN.MP3",
|
|
||||||
"AUDIO\\SUBOPEN.MP3",
|
|
||||||
"AUDIO\\JB.MP3",
|
|
||||||
"AUDIO\\BET.MP3",
|
|
||||||
"AUDIO\\L1_LG.MP3",
|
|
||||||
"AUDIO\\L2_DSB.MP3",
|
|
||||||
"AUDIO\\L3_DM.MP3",
|
|
||||||
"AUDIO\\L4_PAP.MP3",
|
|
||||||
"AUDIO\\L5_TFB.MP3",
|
|
||||||
"AUDIO\\J0_DM2.MP3",
|
|
||||||
"AUDIO\\J1_LFL.MP3",
|
|
||||||
"AUDIO\\J2_KCL.MP3",
|
|
||||||
"AUDIO\\J3_VH.MP3",
|
|
||||||
"AUDIO\\J4_ETH.MP3",
|
|
||||||
"AUDIO\\J5_DST.MP3",
|
|
||||||
"AUDIO\\J6_TBJ.MP3",
|
|
||||||
"AUDIO\\T1_TOL.MP3",
|
|
||||||
"AUDIO\\T2_TPU.MP3",
|
|
||||||
"AUDIO\\T3_MAS.MP3",
|
|
||||||
"AUDIO\\T4_TAT.MP3",
|
|
||||||
"AUDIO\\T5_BF.MP3",
|
|
||||||
"AUDIO\\S0_MAS.MP3",
|
|
||||||
"AUDIO\\S1_PF.MP3",
|
|
||||||
"AUDIO\\S2_CTG.MP3",
|
|
||||||
"AUDIO\\S3_RTC.MP3",
|
|
||||||
"AUDIO\\S5_LRQ.MP3",
|
|
||||||
"AUDIO\\S4_BDBA.MP3",
|
|
||||||
"AUDIO\\S4_BDBB.MP3",
|
|
||||||
"AUDIO\\S2_CTG2.MP3",
|
|
||||||
"AUDIO\\S4_BDBD.MP3",
|
|
||||||
"AUDIO\\S5_LRQB.MP3",
|
|
||||||
"AUDIO\\S5_LRQC.MP3",
|
|
||||||
"AUDIO\\A1_SSO.MP3",
|
|
||||||
"AUDIO\\A2_PP.MP3",
|
|
||||||
"AUDIO\\A3_SS.MP3",
|
|
||||||
"AUDIO\\A4_PDR.MP3",
|
|
||||||
"AUDIO\\A5_K2FT.MP3",
|
|
||||||
"AUDIO\\K1_KBO.MP3",
|
|
||||||
"AUDIO\\K2_GIS.MP3",
|
|
||||||
"AUDIO\\K3_DS.MP3",
|
|
||||||
"AUDIO\\K4_SHI.MP3",
|
|
||||||
"AUDIO\\K5_SD.MP3",
|
|
||||||
"AUDIO\\R0_PDR2.MP3",
|
|
||||||
"AUDIO\\R1_SW.MP3",
|
|
||||||
"AUDIO\\R2_AP.MP3",
|
|
||||||
"AUDIO\\R3_ED.MP3",
|
|
||||||
"AUDIO\\R4_GF.MP3",
|
|
||||||
"AUDIO\\R5_PB.MP3",
|
|
||||||
"AUDIO\\R6_MM.MP3",
|
|
||||||
"AUDIO\\D1_STOG.MP3",
|
|
||||||
"AUDIO\\D2_KK.MP3",
|
|
||||||
"AUDIO\\D3_ADO.MP3",
|
|
||||||
"AUDIO\\D5_ES.MP3",
|
|
||||||
"AUDIO\\D7_MLD.MP3",
|
|
||||||
"AUDIO\\D4_GTA.MP3",
|
|
||||||
"AUDIO\\D4_GTA2.MP3",
|
|
||||||
"AUDIO\\D6_STS.MP3",
|
|
||||||
"AUDIO\\A6_BAIT.MP3",
|
|
||||||
"AUDIO\\A7_ETG.MP3",
|
|
||||||
"AUDIO\\A8_PS.MP3",
|
|
||||||
"AUDIO\\A9_ASD.MP3",
|
|
||||||
"AUDIO\\K4_SHI2.MP3",
|
|
||||||
"AUDIO\\C1_TEX.MP3",
|
|
||||||
"AUDIO\\EL_PH1.MP3",
|
|
||||||
"AUDIO\\EL_PH2.MP3",
|
|
||||||
"AUDIO\\EL_PH3.MP3",
|
|
||||||
"AUDIO\\EL_PH4.MP3",
|
|
||||||
"AUDIO\\YD_PH1.MP3",
|
|
||||||
"AUDIO\\YD_PH2.MP3",
|
|
||||||
"AUDIO\\YD_PH3.MP3",
|
|
||||||
"AUDIO\\YD_PH4.MP3",
|
|
||||||
"AUDIO\\HD_PH1.MP3",
|
|
||||||
"AUDIO\\HD_PH2.MP3",
|
|
||||||
"AUDIO\\HD_PH3.MP3",
|
|
||||||
"AUDIO\\HD_PH4.MP3",
|
|
||||||
"AUDIO\\HD_PH5.MP3",
|
|
||||||
"AUDIO\\MT_PH1.MP3",
|
|
||||||
"AUDIO\\MT_PH2.MP3",
|
|
||||||
"AUDIO\\MT_PH3.MP3",
|
|
||||||
"AUDIO\\MT_PH4.MP3",
|
|
||||||
"AUDIO\\MISCOM.MP3",
|
|
||||||
"AUDIO\\END.MP3",
|
|
||||||
"AUDIO\\lib_a1.MP3",
|
|
||||||
"AUDIO\\lib_a2.MP3",
|
|
||||||
"AUDIO\\lib_a.MP3",
|
|
||||||
"AUDIO\\lib_b.MP3",
|
|
||||||
"AUDIO\\lib_c.MP3",
|
|
||||||
"AUDIO\\lib_d.MP3",
|
|
||||||
"AUDIO\\l2_a.MP3",
|
|
||||||
"AUDIO\\j4t_1.MP3",
|
|
||||||
"AUDIO\\j4t_2.MP3",
|
|
||||||
"AUDIO\\j4t_3.MP3",
|
|
||||||
"AUDIO\\j4t_4.MP3",
|
|
||||||
"AUDIO\\j4_a.MP3",
|
|
||||||
"AUDIO\\j4_b.MP3",
|
|
||||||
"AUDIO\\j4_c.MP3",
|
|
||||||
"AUDIO\\j4_d.MP3",
|
|
||||||
"AUDIO\\j4_e.MP3",
|
|
||||||
"AUDIO\\j4_f.MP3",
|
|
||||||
"AUDIO\\j6_1.MP3",
|
|
||||||
"AUDIO\\j6_a.MP3",
|
|
||||||
"AUDIO\\j6_b.MP3",
|
|
||||||
"AUDIO\\j6_c.MP3",
|
|
||||||
"AUDIO\\j6_d.MP3",
|
|
||||||
"AUDIO\\t4_a.MP3",
|
|
||||||
"AUDIO\\s1_a.MP3",
|
|
||||||
"AUDIO\\s1_a1.MP3",
|
|
||||||
"AUDIO\\s1_b.MP3",
|
|
||||||
"AUDIO\\s1_c.MP3",
|
|
||||||
"AUDIO\\s1_c1.MP3",
|
|
||||||
"AUDIO\\s1_d.MP3",
|
|
||||||
"AUDIO\\s1_e.MP3",
|
|
||||||
"AUDIO\\s1_f.MP3",
|
|
||||||
"AUDIO\\s1_g.MP3",
|
|
||||||
"AUDIO\\s1_h.MP3",
|
|
||||||
"AUDIO\\s1_i.MP3",
|
|
||||||
"AUDIO\\s1_j.MP3",
|
|
||||||
"AUDIO\\s1_k.MP3",
|
|
||||||
"AUDIO\\s1_l.MP3",
|
|
||||||
"AUDIO\\s3_a.MP3",
|
|
||||||
"AUDIO\\s3_b.MP3",
|
|
||||||
"AUDIO\\el3_a.MP3",
|
|
||||||
"AUDIO\\mf1_a.MP3",
|
|
||||||
"AUDIO\\mf2_a.MP3",
|
|
||||||
"AUDIO\\mf3_a.MP3",
|
|
||||||
"AUDIO\\mf3_b.MP3",
|
|
||||||
"AUDIO\\mf3_b1.MP3",
|
|
||||||
"AUDIO\\mf3_c.MP3",
|
|
||||||
"AUDIO\\mf4_a.MP3",
|
|
||||||
"AUDIO\\mf4_b.MP3",
|
|
||||||
"AUDIO\\mf4_c.MP3",
|
|
||||||
"AUDIO\\a1_a.MP3",
|
|
||||||
"AUDIO\\a3_a.MP3",
|
|
||||||
"AUDIO\\a5_a.MP3",
|
|
||||||
"AUDIO\\a4_a.MP3",
|
|
||||||
"AUDIO\\a4_b.MP3",
|
|
||||||
"AUDIO\\a4_c.MP3",
|
|
||||||
"AUDIO\\a4_d.MP3",
|
|
||||||
"AUDIO\\k1_a.MP3",
|
|
||||||
"AUDIO\\k3_a.MP3",
|
|
||||||
"AUDIO\\r1_a.MP3",
|
|
||||||
"AUDIO\\r2_a.MP3",
|
|
||||||
"AUDIO\\r2_b.MP3",
|
|
||||||
"AUDIO\\r2_c.MP3",
|
|
||||||
"AUDIO\\r2_d.MP3",
|
|
||||||
"AUDIO\\r2_e.MP3",
|
|
||||||
"AUDIO\\r2_f.MP3",
|
|
||||||
"AUDIO\\r2_g.MP3",
|
|
||||||
"AUDIO\\r2_h.MP3",
|
|
||||||
"AUDIO\\r5_a.MP3",
|
|
||||||
"AUDIO\\r6_a.MP3",
|
|
||||||
"AUDIO\\r6_a1.MP3",
|
|
||||||
"AUDIO\\r6_b.MP3",
|
|
||||||
"AUDIO\\lo2_a.MP3",
|
|
||||||
"AUDIO\\lo6_a.MP3",
|
|
||||||
"AUDIO\\yd2_a.MP3",
|
|
||||||
"AUDIO\\yd2_b.MP3",
|
|
||||||
"AUDIO\\yd2_c.MP3",
|
|
||||||
"AUDIO\\yd2_c1.MP3",
|
|
||||||
"AUDIO\\yd2_d.MP3",
|
|
||||||
"AUDIO\\yd2_e.MP3",
|
|
||||||
"AUDIO\\yd2_f.MP3",
|
|
||||||
"AUDIO\\yd2_g.MP3",
|
|
||||||
"AUDIO\\yd2_h.MP3",
|
|
||||||
"AUDIO\\yd2_ass.MP3",
|
|
||||||
"AUDIO\\yd2_ok.MP3",
|
|
||||||
"AUDIO\\h5_a.MP3",
|
|
||||||
"AUDIO\\h5_b.MP3",
|
|
||||||
"AUDIO\\h5_c.MP3",
|
|
||||||
"AUDIO\\ammu_a.MP3",
|
|
||||||
"AUDIO\\ammu_b.MP3",
|
|
||||||
"AUDIO\\ammu_c.MP3",
|
|
||||||
"AUDIO\\door_1.MP3",
|
|
||||||
"AUDIO\\door_2.MP3",
|
|
||||||
"AUDIO\\door_3.MP3",
|
|
||||||
"AUDIO\\door_4.MP3",
|
|
||||||
"AUDIO\\door_5.MP3",
|
|
||||||
"AUDIO\\door_6.MP3",
|
|
||||||
"AUDIO\\t3_a.MP3",
|
|
||||||
"AUDIO\\t3_b.MP3",
|
|
||||||
"AUDIO\\t3_c.MP3",
|
|
||||||
"AUDIO\\k1_b.MP3",
|
|
||||||
"AUDIO\\cat1.MP3"
|
|
||||||
};
|
|
|
@ -1,7 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "common.h"
|
|
||||||
#ifndef OPENAL
|
|
||||||
#include "miles\sampman_mss.cpp"
|
|
||||||
#else
|
|
||||||
#include "openal\samp_oal.cpp"
|
|
||||||
#endif
|
|
|
@ -1,7 +1,345 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#ifndef OPENAL
|
#include "AudioSamples.h"
|
||||||
#include "miles\sampman_mss.h"
|
|
||||||
#else
|
#define MAX_VOLUME 127
|
||||||
#include "openal\samp_oal.h"
|
#define MAX_FREQ 22050
|
||||||
|
|
||||||
|
struct tSample {
|
||||||
|
int32 nOffset;
|
||||||
|
uint32 nSize;
|
||||||
|
int32 nFrequency;
|
||||||
|
int32 nLoopStart;
|
||||||
|
int32 nLoopEnd;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SAMPLEBANK_MAIN,
|
||||||
|
SAMPLEBANK_PED,
|
||||||
|
MAX_SAMPLEBANKS,
|
||||||
|
SAMPLEBANK_INVALID
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MAX_PEDSFX 7
|
||||||
|
#define PED_BLOCKSIZE 79000
|
||||||
|
|
||||||
|
#define MAXPROVIDERS 64
|
||||||
|
|
||||||
|
#define MAXCHANNELS 28
|
||||||
|
#define MAXCHANNELS_SURROUND 24
|
||||||
|
#define MAX2DCHANNELS 1
|
||||||
|
#define CHANNEL2D MAXCHANNELS
|
||||||
|
|
||||||
|
#define MAX_STREAMS 2
|
||||||
|
|
||||||
|
#define DIGITALRATE 32000
|
||||||
|
#define DIGITALBITS 16
|
||||||
|
#define DIGITALCHANNELS 2
|
||||||
|
|
||||||
|
#define MAX_DIGITAL_MIXER_CHANNELS 32
|
||||||
|
|
||||||
|
class cSampleManager
|
||||||
|
{
|
||||||
|
uint8 m_nEffectsVolume;
|
||||||
|
uint8 m_nMusicVolume;
|
||||||
|
uint8 m_nEffectsFadeVolume;
|
||||||
|
uint8 m_nMusicFadeVolume;
|
||||||
|
uint8 m_nMonoMode;
|
||||||
|
char unk;
|
||||||
|
char m_szCDRomRootPath[80];
|
||||||
|
bool m_bInitialised;
|
||||||
|
uint8 m_nNumberOfProviders;
|
||||||
|
char *m_aAudioProviders[MAXPROVIDERS];
|
||||||
|
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cSampleManager(void);
|
||||||
|
~cSampleManager(void);
|
||||||
|
|
||||||
|
void SetSpeakerConfig(int32 nConfig);
|
||||||
|
uint32 GetMaximumSupportedChannels(void);
|
||||||
|
|
||||||
|
uint32 GetNum3DProvidersAvailable(void);
|
||||||
|
void SetNum3DProvidersAvailable(uint32 num);
|
||||||
|
|
||||||
|
char *Get3DProviderName(uint8 id);
|
||||||
|
void Set3DProviderName(uint8 id, char *name);
|
||||||
|
|
||||||
|
int8 GetCurrent3DProviderIndex(void);
|
||||||
|
int8 SetCurrent3DProvider(uint8 which);
|
||||||
|
|
||||||
|
bool IsMP3RadioChannelAvailable(void);
|
||||||
|
|
||||||
|
void ReleaseDigitalHandle (void);
|
||||||
|
void ReacquireDigitalHandle(void);
|
||||||
|
|
||||||
|
bool Initialise(void);
|
||||||
|
void Terminate (void);
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
void UpdateSoundBuffers(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool CheckForAnAudioFileOnCD(void);
|
||||||
|
char GetCDAudioDriveLetter (void);
|
||||||
|
|
||||||
|
void UpdateEffectsVolume(void);
|
||||||
|
|
||||||
|
void SetEffectsMasterVolume(uint8 nVolume);
|
||||||
|
void SetMusicMasterVolume (uint8 nVolume);
|
||||||
|
void SetEffectsFadeVolume (uint8 nVolume);
|
||||||
|
void SetMusicFadeVolume (uint8 nVolume);
|
||||||
|
void SetMonoMode (uint8 nMode);
|
||||||
|
|
||||||
|
bool LoadSampleBank (uint8 nBank);
|
||||||
|
void UnloadSampleBank (uint8 nBank);
|
||||||
|
bool IsSampleBankLoaded(uint8 nBank);
|
||||||
|
|
||||||
|
bool IsPedCommentLoaded(uint32 nComment);
|
||||||
|
bool LoadPedComment (uint32 nComment);
|
||||||
|
int32 GetBankContainingSound(uint32 offset);
|
||||||
|
|
||||||
|
int32 _GetPedCommentSlot(uint32 nComment);
|
||||||
|
|
||||||
|
int32 GetSampleBaseFrequency (uint32 nSample);
|
||||||
|
int32 GetSampleLoopStartOffset(uint32 nSample);
|
||||||
|
int32 GetSampleLoopEndOffset (uint32 nSample);
|
||||||
|
uint32 GetSampleLength (uint32 nSample);
|
||||||
|
|
||||||
|
bool UpdateReverb(void);
|
||||||
|
|
||||||
|
void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
|
||||||
|
bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
|
||||||
|
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
||||||
|
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
||||||
|
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
||||||
|
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
|
||||||
|
void SetChannelPan (uint32 nChannel, uint32 nPan);
|
||||||
|
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
|
||||||
|
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
|
||||||
|
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
|
||||||
|
bool GetChannelUsedFlag (uint32 nChannel);
|
||||||
|
void StartChannel (uint32 nChannel);
|
||||||
|
void StopChannel (uint32 nChannel);
|
||||||
|
|
||||||
|
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
||||||
|
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
||||||
|
void StartPreloadedStreamedFile (uint8 nStream);
|
||||||
|
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
||||||
|
void StopStreamedFile (uint8 nStream);
|
||||||
|
int32 GetStreamedFilePosition (uint8 nStream);
|
||||||
|
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
||||||
|
int32 GetStreamedFileLength (uint8 nStream);
|
||||||
|
bool IsStreamPlaying (uint8 nStream);
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
void Service(void);
|
||||||
|
#endif
|
||||||
|
bool InitialiseSampleBanks(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
extern cSampleManager SampleManager;
|
||||||
|
extern uint32 BankStartOffset[MAX_SAMPLEBANKS];
|
||||||
|
|
||||||
|
static char StreamedNameTable[][25]=
|
||||||
|
{
|
||||||
|
"AUDIO\\HEAD.WAV",
|
||||||
|
"AUDIO\\CLASS.WAV",
|
||||||
|
"AUDIO\\KJAH.WAV",
|
||||||
|
"AUDIO\\RISE.WAV",
|
||||||
|
"AUDIO\\LIPS.WAV",
|
||||||
|
"AUDIO\\GAME.WAV",
|
||||||
|
"AUDIO\\MSX.WAV",
|
||||||
|
"AUDIO\\FLASH.WAV",
|
||||||
|
"AUDIO\\CHAT.WAV",
|
||||||
|
"AUDIO\\HEAD.WAV",
|
||||||
|
"AUDIO\\POLICE.WAV",
|
||||||
|
"AUDIO\\CITY.WAV",
|
||||||
|
"AUDIO\\WATER.WAV",
|
||||||
|
"AUDIO\\COMOPEN.WAV",
|
||||||
|
"AUDIO\\SUBOPEN.WAV",
|
||||||
|
"AUDIO\\JB.MP3",
|
||||||
|
"AUDIO\\BET.MP3",
|
||||||
|
"AUDIO\\L1_LG.MP3",
|
||||||
|
"AUDIO\\L2_DSB.MP3",
|
||||||
|
"AUDIO\\L3_DM.MP3",
|
||||||
|
"AUDIO\\L4_PAP.MP3",
|
||||||
|
"AUDIO\\L5_TFB.MP3",
|
||||||
|
"AUDIO\\J0_DM2.MP3",
|
||||||
|
"AUDIO\\J1_LFL.MP3",
|
||||||
|
"AUDIO\\J2_KCL.MP3",
|
||||||
|
"AUDIO\\J3_VH.MP3",
|
||||||
|
"AUDIO\\J4_ETH.MP3",
|
||||||
|
"AUDIO\\J5_DST.MP3",
|
||||||
|
"AUDIO\\J6_TBJ.MP3",
|
||||||
|
"AUDIO\\T1_TOL.MP3",
|
||||||
|
"AUDIO\\T2_TPU.MP3",
|
||||||
|
"AUDIO\\T3_MAS.MP3",
|
||||||
|
"AUDIO\\T4_TAT.MP3",
|
||||||
|
"AUDIO\\T5_BF.MP3",
|
||||||
|
"AUDIO\\S0_MAS.MP3",
|
||||||
|
"AUDIO\\S1_PF.MP3",
|
||||||
|
"AUDIO\\S2_CTG.MP3",
|
||||||
|
"AUDIO\\S3_RTC.MP3",
|
||||||
|
"AUDIO\\S5_LRQ.MP3",
|
||||||
|
"AUDIO\\S4_BDBA.MP3",
|
||||||
|
"AUDIO\\S4_BDBB.MP3",
|
||||||
|
"AUDIO\\S2_CTG2.MP3",
|
||||||
|
"AUDIO\\S4_BDBD.MP3",
|
||||||
|
"AUDIO\\S5_LRQB.MP3",
|
||||||
|
"AUDIO\\S5_LRQC.MP3",
|
||||||
|
"AUDIO\\A1_SSO.WAV",
|
||||||
|
"AUDIO\\A2_PP.WAV",
|
||||||
|
"AUDIO\\A3_SS.WAV",
|
||||||
|
"AUDIO\\A4_PDR.WAV",
|
||||||
|
"AUDIO\\A5_K2FT.WAV",
|
||||||
|
"AUDIO\\K1_KBO.MP3",
|
||||||
|
"AUDIO\\K2_GIS.MP3",
|
||||||
|
"AUDIO\\K3_DS.MP3",
|
||||||
|
"AUDIO\\K4_SHI.MP3",
|
||||||
|
"AUDIO\\K5_SD.MP3",
|
||||||
|
"AUDIO\\R0_PDR2.MP3",
|
||||||
|
"AUDIO\\R1_SW.MP3",
|
||||||
|
"AUDIO\\R2_AP.MP3",
|
||||||
|
"AUDIO\\R3_ED.MP3",
|
||||||
|
"AUDIO\\R4_GF.MP3",
|
||||||
|
"AUDIO\\R5_PB.MP3",
|
||||||
|
"AUDIO\\R6_MM.MP3",
|
||||||
|
"AUDIO\\D1_STOG.MP3",
|
||||||
|
"AUDIO\\D2_KK.MP3",
|
||||||
|
"AUDIO\\D3_ADO.MP3",
|
||||||
|
"AUDIO\\D5_ES.MP3",
|
||||||
|
"AUDIO\\D7_MLD.MP3",
|
||||||
|
"AUDIO\\D4_GTA.MP3",
|
||||||
|
"AUDIO\\D4_GTA2.MP3",
|
||||||
|
"AUDIO\\D6_STS.MP3",
|
||||||
|
"AUDIO\\A6_BAIT.WAV",
|
||||||
|
"AUDIO\\A7_ETG.WAV",
|
||||||
|
"AUDIO\\A8_PS.WAV",
|
||||||
|
"AUDIO\\A9_ASD.WAV",
|
||||||
|
"AUDIO\\K4_SHI2.MP3",
|
||||||
|
"AUDIO\\C1_TEX.MP3",
|
||||||
|
"AUDIO\\EL_PH1.MP3",
|
||||||
|
"AUDIO\\EL_PH2.MP3",
|
||||||
|
"AUDIO\\EL_PH3.MP3",
|
||||||
|
"AUDIO\\EL_PH4.MP3",
|
||||||
|
"AUDIO\\YD_PH1.MP3",
|
||||||
|
"AUDIO\\YD_PH2.MP3",
|
||||||
|
"AUDIO\\YD_PH3.MP3",
|
||||||
|
"AUDIO\\YD_PH4.MP3",
|
||||||
|
"AUDIO\\HD_PH1.MP3",
|
||||||
|
"AUDIO\\HD_PH2.MP3",
|
||||||
|
"AUDIO\\HD_PH3.MP3",
|
||||||
|
"AUDIO\\HD_PH4.MP3",
|
||||||
|
"AUDIO\\HD_PH5.MP3",
|
||||||
|
"AUDIO\\MT_PH1.MP3",
|
||||||
|
"AUDIO\\MT_PH2.MP3",
|
||||||
|
"AUDIO\\MT_PH3.MP3",
|
||||||
|
"AUDIO\\MT_PH4.MP3",
|
||||||
|
"AUDIO\\MISCOM.WAV",
|
||||||
|
"AUDIO\\END.MP3",
|
||||||
|
"AUDIO\\lib_a1.WAV",
|
||||||
|
"AUDIO\\lib_a2.WAV",
|
||||||
|
"AUDIO\\lib_a.WAV",
|
||||||
|
"AUDIO\\lib_b.WAV",
|
||||||
|
"AUDIO\\lib_c.WAV",
|
||||||
|
"AUDIO\\lib_d.WAV",
|
||||||
|
"AUDIO\\l2_a.WAV",
|
||||||
|
"AUDIO\\j4t_1.WAV",
|
||||||
|
"AUDIO\\j4t_2.WAV",
|
||||||
|
"AUDIO\\j4t_3.WAV",
|
||||||
|
"AUDIO\\j4t_4.WAV",
|
||||||
|
"AUDIO\\j4_a.WAV",
|
||||||
|
"AUDIO\\j4_b.WAV",
|
||||||
|
"AUDIO\\j4_c.WAV",
|
||||||
|
"AUDIO\\j4_d.WAV",
|
||||||
|
"AUDIO\\j4_e.WAV",
|
||||||
|
"AUDIO\\j4_f.WAV",
|
||||||
|
"AUDIO\\j6_1.WAV",
|
||||||
|
"AUDIO\\j6_a.WAV",
|
||||||
|
"AUDIO\\j6_b.WAV",
|
||||||
|
"AUDIO\\j6_c.WAV",
|
||||||
|
"AUDIO\\j6_d.WAV",
|
||||||
|
"AUDIO\\t4_a.WAV",
|
||||||
|
"AUDIO\\s1_a.WAV",
|
||||||
|
"AUDIO\\s1_a1.WAV",
|
||||||
|
"AUDIO\\s1_b.WAV",
|
||||||
|
"AUDIO\\s1_c.WAV",
|
||||||
|
"AUDIO\\s1_c1.WAV",
|
||||||
|
"AUDIO\\s1_d.WAV",
|
||||||
|
"AUDIO\\s1_e.WAV",
|
||||||
|
"AUDIO\\s1_f.WAV",
|
||||||
|
"AUDIO\\s1_g.WAV",
|
||||||
|
"AUDIO\\s1_h.WAV",
|
||||||
|
"AUDIO\\s1_i.WAV",
|
||||||
|
"AUDIO\\s1_j.WAV",
|
||||||
|
"AUDIO\\s1_k.WAV",
|
||||||
|
"AUDIO\\s1_l.WAV",
|
||||||
|
"AUDIO\\s3_a.WAV",
|
||||||
|
"AUDIO\\s3_b.WAV",
|
||||||
|
"AUDIO\\el3_a.WAV",
|
||||||
|
"AUDIO\\mf1_a.WAV",
|
||||||
|
"AUDIO\\mf2_a.WAV",
|
||||||
|
"AUDIO\\mf3_a.WAV",
|
||||||
|
"AUDIO\\mf3_b.WAV",
|
||||||
|
"AUDIO\\mf3_b1.WAV",
|
||||||
|
"AUDIO\\mf3_c.WAV",
|
||||||
|
"AUDIO\\mf4_a.WAV",
|
||||||
|
"AUDIO\\mf4_b.WAV",
|
||||||
|
"AUDIO\\mf4_c.WAV",
|
||||||
|
"AUDIO\\a1_a.WAV",
|
||||||
|
"AUDIO\\a3_a.WAV",
|
||||||
|
"AUDIO\\a5_a.WAV",
|
||||||
|
"AUDIO\\a4_a.WAV",
|
||||||
|
"AUDIO\\a4_b.WAV",
|
||||||
|
"AUDIO\\a4_c.WAV",
|
||||||
|
"AUDIO\\a4_d.WAV",
|
||||||
|
"AUDIO\\k1_a.WAV",
|
||||||
|
"AUDIO\\k3_a.WAV",
|
||||||
|
"AUDIO\\r1_a.WAV",
|
||||||
|
"AUDIO\\r2_a.WAV",
|
||||||
|
"AUDIO\\r2_b.WAV",
|
||||||
|
"AUDIO\\r2_c.WAV",
|
||||||
|
"AUDIO\\r2_d.WAV",
|
||||||
|
"AUDIO\\r2_e.WAV",
|
||||||
|
"AUDIO\\r2_f.WAV",
|
||||||
|
"AUDIO\\r2_g.WAV",
|
||||||
|
"AUDIO\\r2_h.WAV",
|
||||||
|
"AUDIO\\r5_a.WAV",
|
||||||
|
"AUDIO\\r6_a.WAV",
|
||||||
|
"AUDIO\\r6_a1.WAV",
|
||||||
|
"AUDIO\\r6_b.WAV",
|
||||||
|
"AUDIO\\lo2_a.WAV",
|
||||||
|
"AUDIO\\lo6_a.WAV",
|
||||||
|
"AUDIO\\yd2_a.WAV",
|
||||||
|
"AUDIO\\yd2_b.WAV",
|
||||||
|
"AUDIO\\yd2_c.WAV",
|
||||||
|
"AUDIO\\yd2_c1.WAV",
|
||||||
|
"AUDIO\\yd2_d.WAV",
|
||||||
|
"AUDIO\\yd2_e.WAV",
|
||||||
|
"AUDIO\\yd2_f.WAV",
|
||||||
|
"AUDIO\\yd2_g.WAV",
|
||||||
|
"AUDIO\\yd2_h.WAV",
|
||||||
|
"AUDIO\\yd2_ass.WAV",
|
||||||
|
"AUDIO\\yd2_ok.WAV",
|
||||||
|
"AUDIO\\h5_a.WAV",
|
||||||
|
"AUDIO\\h5_b.WAV",
|
||||||
|
"AUDIO\\h5_c.WAV",
|
||||||
|
"AUDIO\\ammu_a.WAV",
|
||||||
|
"AUDIO\\ammu_b.WAV",
|
||||||
|
"AUDIO\\ammu_c.WAV",
|
||||||
|
"AUDIO\\door_1.WAV",
|
||||||
|
"AUDIO\\door_2.WAV",
|
||||||
|
"AUDIO\\door_3.WAV",
|
||||||
|
"AUDIO\\door_4.WAV",
|
||||||
|
"AUDIO\\door_5.WAV",
|
||||||
|
"AUDIO\\door_6.WAV",
|
||||||
|
"AUDIO\\t3_a.WAV",
|
||||||
|
"AUDIO\\t3_b.WAV",
|
||||||
|
"AUDIO\\t3_c.WAV",
|
||||||
|
"AUDIO\\k1_b.WAV",
|
||||||
|
"AUDIO\\cat1.WAV"
|
||||||
|
};
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_MSS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shobjidl.h>
|
#include <shobjidl.h>
|
||||||
#include <shlguid.h>
|
#include <shlguid.h>
|
||||||
|
@ -8,7 +11,7 @@
|
||||||
#include "eax-util.h"
|
#include "eax-util.h"
|
||||||
#include "mss.h"
|
#include "mss.h"
|
||||||
|
|
||||||
#include "sampman_mss.h"
|
#include "sampman.h"
|
||||||
#include "AudioManager.h"
|
#include "AudioManager.h"
|
||||||
#include "MusicManager.h"
|
#include "MusicManager.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
|
@ -18,7 +21,7 @@
|
||||||
#pragma comment( lib, "mss32.lib" )
|
#pragma comment( lib, "mss32.lib" )
|
||||||
|
|
||||||
cSampleManager SampleManager;
|
cSampleManager SampleManager;
|
||||||
int32 BankStartOffset[MAX_SAMPLEBANKS];
|
uint32 BankStartOffset[MAX_SAMPLEBANKS];
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
char SampleBankDescFilename[] = "AUDIO\\SFX.SDT";
|
char SampleBankDescFilename[] = "AUDIO\\SFX.SDT";
|
||||||
|
@ -55,9 +58,9 @@ struct tMP3Entry
|
||||||
uint32 nNumMP3s;
|
uint32 nNumMP3s;
|
||||||
tMP3Entry *_pMP3List;
|
tMP3Entry *_pMP3List;
|
||||||
char _mp3DirectoryPath[MAX_PATH];
|
char _mp3DirectoryPath[MAX_PATH];
|
||||||
HSTREAM mp3Stream [MAX_MP3STREAMS];
|
HSTREAM mp3Stream [MAX_STREAMS];
|
||||||
int8 nStreamPan [MAX_MP3STREAMS];
|
int8 nStreamPan [MAX_STREAMS];
|
||||||
int8 nStreamVolume[MAX_MP3STREAMS];
|
int8 nStreamVolume[MAX_STREAMS];
|
||||||
uint32 _CurMP3Index;
|
uint32 _CurMP3Index;
|
||||||
int32 _CurMP3Pos;
|
int32 _CurMP3Pos;
|
||||||
bool _bIsMp3Active;
|
bool _bIsMp3Active;
|
||||||
|
@ -261,6 +264,17 @@ set_new_provider(S32 index)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cSampleManager::cSampleManager(void) :
|
||||||
|
m_nNumberOfProviders(0)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
cSampleManager::~cSampleManager(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetSpeakerConfig(int32 which)
|
cSampleManager::SetSpeakerConfig(int32 which)
|
||||||
{
|
{
|
||||||
|
@ -296,6 +310,26 @@ cSampleManager::GetMaximumSupportedChannels(void)
|
||||||
return _maxSamples;
|
return _maxSamples;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 cSampleManager::GetNum3DProvidersAvailable()
|
||||||
|
{
|
||||||
|
return m_nNumberOfProviders;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cSampleManager::SetNum3DProvidersAvailable(uint32 num)
|
||||||
|
{
|
||||||
|
m_nNumberOfProviders = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *cSampleManager::Get3DProviderName(uint8 id)
|
||||||
|
{
|
||||||
|
return m_aAudioProviders[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
void cSampleManager::Set3DProviderName(uint8 id, char *name)
|
||||||
|
{
|
||||||
|
m_aAudioProviders[id] = name;
|
||||||
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
cSampleManager::GetCurrent3DProviderIndex(void)
|
cSampleManager::GetCurrent3DProviderIndex(void)
|
||||||
{
|
{
|
||||||
|
@ -1084,7 +1118,7 @@ cSampleManager::Initialise(void)
|
||||||
|
|
||||||
TRACE("stream");
|
TRACE("stream");
|
||||||
{
|
{
|
||||||
for ( int32 i = 0; i < MAX_MP3STREAMS; i++ )
|
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
||||||
{
|
{
|
||||||
mp3Stream [i] = NULL;
|
mp3Stream [i] = NULL;
|
||||||
nStreamPan [i] = 63;
|
nStreamPan [i] = 63;
|
||||||
|
@ -1199,7 +1233,7 @@ cSampleManager::Initialise(void)
|
||||||
void
|
void
|
||||||
cSampleManager::Terminate(void)
|
cSampleManager::Terminate(void)
|
||||||
{
|
{
|
||||||
for ( int32 i = 0; i < MAX_MP3STREAMS; i++ )
|
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
||||||
{
|
{
|
||||||
if ( mp3Stream[i] )
|
if ( mp3Stream[i] )
|
||||||
{
|
{
|
||||||
|
@ -1366,6 +1400,12 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
|
||||||
m_nMusicFadeVolume = nVolume;
|
m_nMusicFadeVolume = nVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetMonoMode(uint8 nMode)
|
||||||
|
{
|
||||||
|
m_nMonoMode = nMode;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::LoadSampleBank(uint8 nBank)
|
cSampleManager::LoadSampleBank(uint8 nBank)
|
||||||
{
|
{
|
||||||
|
@ -1475,6 +1515,18 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32
|
||||||
|
cSampleManager::GetBankContainingSound(uint32 offset)
|
||||||
|
{
|
||||||
|
if ( offset >= BankStartOffset[SAMPLEBANK_PED] )
|
||||||
|
return SAMPLEBANK_PED;
|
||||||
|
|
||||||
|
if ( offset >= BankStartOffset[SAMPLEBANK_MAIN] )
|
||||||
|
return SAMPLEBANK_MAIN;
|
||||||
|
|
||||||
|
return SAMPLEBANK_INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
cSampleManager::GetSampleBaseFrequency(uint32 nSample)
|
cSampleManager::GetSampleBaseFrequency(uint32 nSample)
|
||||||
{
|
{
|
||||||
|
@ -2255,3 +2307,5 @@ cSampleManager::InitialiseSampleBanks(void)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
1404
src/audio/sampman_oal.cpp
Normal file
1404
src/audio/sampman_oal.cpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -133,3 +133,5 @@ public:
|
||||||
float GetCruiseSpeed(void) { return m_nCruiseSpeed * m_fCruiseSpeedMultiplier; }
|
float GetCruiseSpeed(void) { return m_nCruiseSpeed * m_fCruiseSpeedMultiplier; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VALIDATE_SIZE(CAutoPilot, 0x70);
|
||||||
|
|
|
@ -86,7 +86,7 @@ public:
|
||||||
CVehicle* RestoreCar();
|
CVehicle* RestoreCar();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CStoredCar) == 0x28, "CStoredCar");
|
VALIDATE_SIZE(CStoredCar, 0x28);
|
||||||
|
|
||||||
#define SWITCH_GARAGE_DISTANCE_CLOSE 40.0f
|
#define SWITCH_GARAGE_DISTANCE_CLOSE 40.0f
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ class CGarage
|
||||||
friend class CCamera;
|
friend class CCamera;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CGarage) == 140, "CGarage");
|
VALIDATE_SIZE(CGarage, 140);
|
||||||
|
|
||||||
class CGarages
|
class CGarages
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
void ProcessForDisplayCounter();
|
void ProcessForDisplayCounter();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(COnscreenTimerEntry) == 0x74, "COnscreenTimerEntry: error");
|
VALIDATE_SIZE(COnscreenTimerEntry, 0x74);
|
||||||
|
|
||||||
class COnscreenTimer
|
class COnscreenTimer
|
||||||
{
|
{
|
||||||
|
@ -46,4 +46,4 @@ public:
|
||||||
void AddClock(uint32 offset, char* text);
|
void AddClock(uint32 offset, char* text);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(COnscreenTimer) == 0x78, "COnscreenTimer: error");
|
VALIDATE_SIZE(COnscreenTimer, 0x78);
|
||||||
|
|
|
@ -38,7 +38,8 @@ struct CPedPathNode
|
||||||
CPedPathNode* prev;
|
CPedPathNode* prev;
|
||||||
CPedPathNode* next;
|
CPedPathNode* next;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CPedPathNode) == 0x10, "CPedPathNode: error");
|
|
||||||
|
VALIDATE_SIZE(CPedPathNode, 0x10);
|
||||||
|
|
||||||
class CPedPath {
|
class CPedPath {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
~CPhone() { }
|
~CPhone() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CPhone) == 0x34, "CPhone: error");
|
VALIDATE_SIZE(CPhone, 0x34);
|
||||||
|
|
||||||
class CPhoneInfo {
|
class CPhoneInfo {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -51,7 +51,7 @@ private:
|
||||||
void Remove();
|
void Remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CPickup) == 0x1C, "CPickup: error");
|
VALIDATE_SIZE(CPickup, 0x1C);
|
||||||
|
|
||||||
struct tPickupMessage
|
struct tPickupMessage
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,7 +108,8 @@ class CReplay
|
||||||
CMatrix camera_pos;
|
CMatrix camera_pos;
|
||||||
CVector player_pos;
|
CVector player_pos;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tGeneralPacket) == 88, "tGeneralPacket: error");
|
|
||||||
|
VALIDATE_SIZE(tGeneralPacket, 88);
|
||||||
|
|
||||||
struct tClockPacket
|
struct tClockPacket
|
||||||
{
|
{
|
||||||
|
@ -118,7 +119,7 @@ class CReplay
|
||||||
private:
|
private:
|
||||||
uint8 __align;
|
uint8 __align;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tClockPacket) == 4, "tClockPacket: error");
|
VALIDATE_SIZE(tClockPacket, 4);
|
||||||
|
|
||||||
struct tWeatherPacket
|
struct tWeatherPacket
|
||||||
{
|
{
|
||||||
|
@ -127,14 +128,14 @@ class CReplay
|
||||||
uint8 new_weather;
|
uint8 new_weather;
|
||||||
float interpolation;
|
float interpolation;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tWeatherPacket) == 8, "tWeatherPacket: error");
|
VALIDATE_SIZE(tWeatherPacket, 8);
|
||||||
|
|
||||||
struct tTimerPacket
|
struct tTimerPacket
|
||||||
{
|
{
|
||||||
uint8 type;
|
uint8 type;
|
||||||
uint32 timer;
|
uint32 timer;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tTimerPacket) == 8, "tTimerPacket: error");
|
VALIDATE_SIZE(tTimerPacket, 8);
|
||||||
|
|
||||||
struct tPedHeaderPacket
|
struct tPedHeaderPacket
|
||||||
{
|
{
|
||||||
|
@ -145,7 +146,7 @@ class CReplay
|
||||||
private:
|
private:
|
||||||
uint8 __align[3];
|
uint8 __align[3];
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tPedHeaderPacket) == 8, "tPedHeaderPacket: error");
|
VALIDATE_SIZE(tPedHeaderPacket, 8);
|
||||||
|
|
||||||
struct tBulletTracePacket
|
struct tBulletTracePacket
|
||||||
{
|
{
|
||||||
|
@ -156,7 +157,7 @@ class CReplay
|
||||||
CVector inf;
|
CVector inf;
|
||||||
CVector sup;
|
CVector sup;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tBulletTracePacket) == 28, "tBulletTracePacket: error");
|
VALIDATE_SIZE(tBulletTracePacket, 28);
|
||||||
|
|
||||||
struct tEndOfFramePacket
|
struct tEndOfFramePacket
|
||||||
{
|
{
|
||||||
|
@ -164,7 +165,7 @@ class CReplay
|
||||||
private:
|
private:
|
||||||
uint8 __align[3];
|
uint8 __align[3];
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tEndOfFramePacket) == 4, "tEndOfFramePacket: error");
|
VALIDATE_SIZE(tEndOfFramePacket, 4);
|
||||||
|
|
||||||
struct tPedUpdatePacket
|
struct tPedUpdatePacket
|
||||||
{
|
{
|
||||||
|
@ -177,7 +178,7 @@ class CReplay
|
||||||
int8 assoc_group_id;
|
int8 assoc_group_id;
|
||||||
uint8 weapon_model;
|
uint8 weapon_model;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tPedUpdatePacket) == 40, "tPedUpdatePacket: error");
|
VALIDATE_SIZE(tPedUpdatePacket, 40);
|
||||||
|
|
||||||
struct tVehicleUpdatePacket
|
struct tVehicleUpdatePacket
|
||||||
{
|
{
|
||||||
|
@ -202,7 +203,7 @@ class CReplay
|
||||||
uint8 primary_color;
|
uint8 primary_color;
|
||||||
uint8 secondary_color;
|
uint8 secondary_color;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(tVehicleUpdatePacket) == 48, "tVehicleUpdatePacket: error");
|
VALIDATE_SIZE(tVehicleUpdatePacket, 48);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static uint8 Mode;
|
static uint8 Mode;
|
||||||
|
|
|
@ -68,7 +68,9 @@ static const char* pCommandStrings[] = {
|
||||||
"Save Movie", "Load Movie", "Play Movie", "END"
|
"Save Movie", "Load Movie", "Play Movie", "END"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
static_assert(ARRAY_SIZE(pCommandStrings) == CSceneEdit::MOVIE_TOTAL_COMMANDS, "Scene edit: not all commands have names");
|
static_assert(ARRAY_SIZE(pCommandStrings) == CSceneEdit::MOVIE_TOTAL_COMMANDS, "Scene edit: not all commands have names");
|
||||||
|
#endif
|
||||||
|
|
||||||
static int32 NextValidModelId(int32 mi, int32 step)
|
static int32 NextValidModelId(int32 mi, int32 step)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11611,7 +11611,9 @@ INITSAVEBUF
|
||||||
WriteSaveBuf(buf, varSpace);
|
WriteSaveBuf(buf, varSpace);
|
||||||
for (uint32 i = 0; i < varSpace; i++)
|
for (uint32 i = 0; i < varSpace; i++)
|
||||||
WriteSaveBuf(buf, ScriptSpace[i]);
|
WriteSaveBuf(buf, ScriptSpace[i]);
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
static_assert(SCRIPT_DATA_SIZE == 968, "CTheScripts::SaveAllScripts");
|
static_assert(SCRIPT_DATA_SIZE == 968, "CTheScripts::SaveAllScripts");
|
||||||
|
#endif
|
||||||
uint32 script_data_size = SCRIPT_DATA_SIZE;
|
uint32 script_data_size = SCRIPT_DATA_SIZE;
|
||||||
WriteSaveBuf(buf, script_data_size);
|
WriteSaveBuf(buf, script_data_size);
|
||||||
WriteSaveBuf(buf, OnAMissionFlag);
|
WriteSaveBuf(buf, OnAMissionFlag);
|
||||||
|
@ -12037,12 +12039,16 @@ void CRunningScript::Save(uint8*& buf)
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
WriteSaveBuf<char>(buf, m_abScriptName[i]);
|
WriteSaveBuf<char>(buf, m_abScriptName[i]);
|
||||||
WriteSaveBuf<uint32>(buf, m_nIp);
|
WriteSaveBuf<uint32>(buf, m_nIp);
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
|
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
|
||||||
|
#endif
|
||||||
for (int i = 0; i < MAX_STACK_DEPTH; i++)
|
for (int i = 0; i < MAX_STACK_DEPTH; i++)
|
||||||
WriteSaveBuf<uint32>(buf, m_anStack[i]);
|
WriteSaveBuf<uint32>(buf, m_anStack[i]);
|
||||||
WriteSaveBuf<uint16>(buf, m_nStackPointer);
|
WriteSaveBuf<uint16>(buf, m_nStackPointer);
|
||||||
SkipSaveBuf(buf, 2);
|
SkipSaveBuf(buf, 2);
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
|
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
|
||||||
|
#endif
|
||||||
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
||||||
WriteSaveBuf<int32>(buf, m_anLocalVariables[i]);
|
WriteSaveBuf<int32>(buf, m_anLocalVariables[i]);
|
||||||
WriteSaveBuf<bool>(buf, m_bCondResult);
|
WriteSaveBuf<bool>(buf, m_bCondResult);
|
||||||
|
@ -12068,12 +12074,16 @@ void CRunningScript::Load(uint8*& buf)
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
m_abScriptName[i] = ReadSaveBuf<char>(buf);
|
m_abScriptName[i] = ReadSaveBuf<char>(buf);
|
||||||
m_nIp = ReadSaveBuf<uint32>(buf);
|
m_nIp = ReadSaveBuf<uint32>(buf);
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
|
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
|
||||||
|
#endif
|
||||||
for (int i = 0; i < MAX_STACK_DEPTH; i++)
|
for (int i = 0; i < MAX_STACK_DEPTH; i++)
|
||||||
m_anStack[i] = ReadSaveBuf<uint32>(buf);
|
m_anStack[i] = ReadSaveBuf<uint32>(buf);
|
||||||
m_nStackPointer = ReadSaveBuf<uint16>(buf);
|
m_nStackPointer = ReadSaveBuf<uint16>(buf);
|
||||||
SkipSaveBuf(buf, 2);
|
SkipSaveBuf(buf, 2);
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
|
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
|
||||||
|
#endif
|
||||||
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
||||||
m_anLocalVariables[i] = ReadSaveBuf<int32>(buf);
|
m_anLocalVariables[i] = ReadSaveBuf<int32>(buf);
|
||||||
m_bCondResult = ReadSaveBuf<bool>(buf);
|
m_bCondResult = ReadSaveBuf<bool>(buf);
|
||||||
|
|
|
@ -28,7 +28,7 @@ struct intro_script_rectangle
|
||||||
~intro_script_rectangle() { }
|
~intro_script_rectangle() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(intro_script_rectangle) == 0x18, "Script.h: error");
|
VALIDATE_SIZE(intro_script_rectangle, 0x18);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SCRIPT_TEXT_MAX_LENGTH = 500
|
SCRIPT_TEXT_MAX_LENGTH = 500
|
||||||
|
@ -79,7 +79,7 @@ struct intro_text_line
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(intro_text_line) == 0x414, "Script.h: error");
|
VALIDATE_SIZE(intro_text_line, 0x414);
|
||||||
|
|
||||||
struct script_sphere_struct
|
struct script_sphere_struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -4539,6 +4539,9 @@ CCam::Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrient
|
||||||
Rotating = false;
|
Rotating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(TheCamera.m_bUseTransitionBeta)
|
||||||
|
Beta = CGeneral::GetATanOfXY(-Cos(m_fTransitionBeta), -Sin(m_fTransitionBeta));
|
||||||
|
|
||||||
if(TheCamera.m_bUseTransitionBeta)
|
if(TheCamera.m_bUseTransitionBeta)
|
||||||
Beta = CGeneral::GetATanOfXY(-Cos(m_fTransitionBeta), -Sin(m_fTransitionBeta));
|
Beta = CGeneral::GetATanOfXY(-Cos(m_fTransitionBeta), -Sin(m_fTransitionBeta));
|
||||||
|
|
||||||
|
|
|
@ -260,9 +260,8 @@ public:
|
||||||
void Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrientation, float, float);
|
void Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||||
void Process_FollowCar_SA(const CVector &CameraTarget, float TargetOrientation, float, float);
|
void Process_FollowCar_SA(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CCam) == 0x1A4, "CCam: wrong size");
|
|
||||||
static_assert(offsetof(CCam, Alpha) == 0xA8, "CCam: error");
|
VALIDATE_SIZE(CCam, 0x1A4);
|
||||||
static_assert(offsetof(CCam, Front) == 0x140, "CCam: error");
|
|
||||||
|
|
||||||
class CCamPathSplines
|
class CCamPathSplines
|
||||||
{
|
{
|
||||||
|
@ -637,19 +636,8 @@ uint32 unknown; // some counter having to do with music
|
||||||
bool IsSphereVisible(const CVector ¢er, float radius);
|
bool IsSphereVisible(const CVector ¢er, float radius);
|
||||||
bool IsBoxVisible(RwV3d *box, const CMatrix *mat);
|
bool IsBoxVisible(RwV3d *box, const CMatrix *mat);
|
||||||
};
|
};
|
||||||
static_assert(offsetof(CCamera, DistanceToWater) == 0xe4, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_WideScreenOn) == 0x70, "CCamera: error");
|
VALIDATE_SIZE(CCamera, 0xE9D8);
|
||||||
static_assert(offsetof(CCamera, WorldViewerBeingUsed) == 0x75, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_uiNumberOfTrainCamNodes) == 0x84, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_uiTransitionState) == 0x89, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_uiTimeTransitionStart) == 0x94, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_BlurBlue) == 0x9C, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, Cams) == 0x1A4, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, pToGarageWeAreIn) == 0x690, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_PreviousCameraPosition) == 0x6B0, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_vecCutSceneOffset) == 0x6F8, "CCamera: error");
|
|
||||||
static_assert(offsetof(CCamera, m_arrPathArray) == 0x7a8, "CCamera: error");
|
|
||||||
static_assert(sizeof(CCamera) == 0xE9D8, "CCamera: wrong size");
|
|
||||||
|
|
||||||
extern CCamera TheCamera;
|
extern CCamera TheCamera;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ struct CdReadInfo
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
OVERLAPPED Overlapped;
|
OVERLAPPED Overlapped;
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CdReadInfo, 0x30);
|
VALIDATE_SIZE(CdReadInfo, 0x30);
|
||||||
|
|
||||||
char gCdImageNames[MAX_CDIMAGES+1][64];
|
char gCdImageNames[MAX_CDIMAGES+1][64];
|
||||||
|
|
|
@ -27,7 +27,6 @@ struct Queue
|
||||||
|
|
||||||
VALIDATE_SIZE(Queue, 0x10);
|
VALIDATE_SIZE(Queue, 0x10);
|
||||||
|
|
||||||
|
|
||||||
void CdStreamInitThread(void);
|
void CdStreamInitThread(void);
|
||||||
void CdStreamInit(int32 numChannels);
|
void CdStreamInit(int32 numChannels);
|
||||||
uint32 GetGTA3ImgSize(void);
|
uint32 GetGTA3ImgSize(void);
|
||||||
|
|
|
@ -660,7 +660,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef IMPROVED_VIDEOMODE
|
#ifndef IMPROVED_VIDEOMODE
|
||||||
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
VALIDATE_SIZE(CMenuManager, 0x564);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern CMenuManager FrontEndMenuManager;
|
extern CMenuManager FrontEndMenuManager;
|
||||||
|
|
|
@ -221,22 +221,9 @@ bool CGame::InitialiseOnceAfterRW(void)
|
||||||
if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
|
if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
|
||||||
{
|
{
|
||||||
CMenuManager::m_PrefsSpeakers = 0;
|
CMenuManager::m_PrefsSpeakers = 0;
|
||||||
|
int8 provider = DMAudio.AutoDetect3DProviders();
|
||||||
for ( int32 i = 0; i < DMAudio.GetNum3DProvidersAvailable(); i++ )
|
if ( provider != -1 )
|
||||||
{
|
FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider;
|
||||||
wchar buff[64];
|
|
||||||
|
|
||||||
char *name = DMAudio.Get3DProviderName(i);
|
|
||||||
AsciiToUnicode(name, buff);
|
|
||||||
char *providername = UnicodeToAscii(buff);
|
|
||||||
strupr(providername);
|
|
||||||
|
|
||||||
if ( !strcmp(providername, "MILES FAST 2D POSITIONAL AUDIO") )
|
|
||||||
{
|
|
||||||
FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
||||||
|
|
|
@ -31,4 +31,5 @@ public:
|
||||||
bool IsWithinArea(float x1, float y1, float x2, float y2);
|
bool IsWithinArea(float x1, float y1, float x2, float y2);
|
||||||
bool IsWithinArea(float x1, float y1, float z1, float x2, float y2, float z2);
|
bool IsWithinArea(float x1, float y1, float z1, float x2, float y2, float z2);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CPlaceable) == 0x4C, "CPlaceable: error");
|
|
||||||
|
VALIDATE_SIZE(CPlaceable, 0x4C);
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct sRadarTrace
|
||||||
uint16 m_eBlipDisplay; // eBlipDisplay
|
uint16 m_eBlipDisplay; // eBlipDisplay
|
||||||
uint16 m_eRadarSprite; // eRadarSprite
|
uint16 m_eRadarSprite; // eRadarSprite
|
||||||
};
|
};
|
||||||
static_assert(sizeof(sRadarTrace) == 0x30, "sRadarTrace: error");
|
VALIDATE_SIZE(sRadarTrace, 0x30);
|
||||||
|
|
||||||
// Values for screen space
|
// Values for screen space
|
||||||
#define RADAR_LEFT (40.0f)
|
#define RADAR_LEFT (40.0f)
|
||||||
|
|
|
@ -55,4 +55,4 @@ public:
|
||||||
static void SetMaximumWantedLevel(int32 level);
|
static void SetMaximumWantedLevel(int32 level);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CWanted) == 0x204, "CWanted: error");
|
VALIDATE_SIZE(CWanted, 0x204);
|
||||||
|
|
|
@ -45,7 +45,8 @@ class CSector
|
||||||
public:
|
public:
|
||||||
CPtrList m_lists[NUMSECTORENTITYLISTS];
|
CPtrList m_lists[NUMSECTORENTITYLISTS];
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CSector) == 0x28, "CSector: error");
|
|
||||||
|
VALIDATE_SIZE(CSector, 0x28);
|
||||||
|
|
||||||
class CEntity;
|
class CEntity;
|
||||||
struct CColPoint;
|
struct CColPoint;
|
||||||
|
|
|
@ -213,6 +213,7 @@ void mysrand(unsigned int seed);
|
||||||
void re3_debug(const char *format, ...);
|
void re3_debug(const char *format, ...);
|
||||||
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
|
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
|
||||||
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func);
|
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func);
|
||||||
|
void re3_usererror(const char *format, ...);
|
||||||
|
|
||||||
#define DEBUGBREAK() __debugbreak();
|
#define DEBUGBREAK() __debugbreak();
|
||||||
|
|
||||||
|
@ -220,6 +221,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||||
#define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__)
|
#define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__)
|
||||||
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
||||||
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
|
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
|
||||||
|
#define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__)
|
||||||
|
|
||||||
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
||||||
#define ASSERT assert
|
#define ASSERT assert
|
||||||
|
@ -227,7 +229,11 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||||
#define _TODO(x)
|
#define _TODO(x)
|
||||||
#define _TODOCONST(x) (x)
|
#define _TODOCONST(x) (x)
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
|
#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
|
||||||
|
#else
|
||||||
|
#define VALIDATE_SIZE(struc, size)
|
||||||
|
#endif
|
||||||
#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
|
#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
|
||||||
|
|
||||||
#define PERCENT(x, p) ((float(x) * (float(p) / 100.0f)))
|
#define PERCENT(x, p) ((float(x) * (float(p) / 100.0f)))
|
||||||
|
|
|
@ -199,7 +199,8 @@ enum Config {
|
||||||
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||||
//#define USE_TEXTURE_POOL
|
//#define USE_TEXTURE_POOL
|
||||||
//#define OPENAL
|
//#define AUDIO_OAL
|
||||||
|
#define AUDIO_MSS
|
||||||
|
|
||||||
// Particle
|
// Particle
|
||||||
//#define PC_PARTICLE
|
//#define PC_PARTICLE
|
||||||
|
|
|
@ -465,6 +465,20 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
|
||||||
OutputDebugStringA(buff);
|
OutputDebugStringA(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void re3_usererror(const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
va_start(va, format);
|
||||||
|
vsprintf_s(re3_buff, re3_buffsize, format, va);
|
||||||
|
va_end(va);
|
||||||
|
|
||||||
|
::MessageBoxA(nil, re3_buff, "RE3 Error!",
|
||||||
|
MB_OK|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL);
|
||||||
|
|
||||||
|
raise(SIGABRT);
|
||||||
|
_exit(3);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef VALIDATE_SAVE_SIZE
|
#ifdef VALIDATE_SAVE_SIZE
|
||||||
int32 _saveBufCount;
|
int32 _saveBufCount;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@ enum ModelInfoType : uint8
|
||||||
MITYPE_XTRACOMPS, // unused but still in enum
|
MITYPE_XTRACOMPS, // unused but still in enum
|
||||||
MITYPE_HAND // xbox and mobile
|
MITYPE_HAND // xbox and mobile
|
||||||
};
|
};
|
||||||
static_assert(sizeof(ModelInfoType) == 1, "ModeInfoType: error");
|
VALIDATE_SIZE(ModelInfoType, 1);
|
||||||
|
|
||||||
class C2dEffect;
|
class C2dEffect;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ public:
|
||||||
uint8 m_nSpecialCollisionResponseCases;
|
uint8 m_nSpecialCollisionResponseCases;
|
||||||
bool m_bCameraToAvoidThisObject;
|
bool m_bCameraToAvoidThisObject;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CObjectInfo) == 0x20, "CObjectInfo: error");
|
VALIDATE_SIZE(CObjectInfo, 0x20);
|
||||||
|
|
||||||
class CObjectData
|
class CObjectData
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,5 +12,5 @@ public:
|
||||||
void ProcessControl(void);
|
void ProcessControl(void);
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(sizeof(CCivilianPed) == 0x53C, "CCivilianPed: error");
|
VALIDATE_SIZE(CCivilianPed, 0x53C);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,5 +38,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(sizeof(CCopPed) == 0x558, "CCopPed: error");
|
VALIDATE_SIZE(CCopPed, 0x558);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,5 +37,5 @@ public:
|
||||||
void MedicAI(void);
|
void MedicAI(void);
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(sizeof(CEmergencyPed) == 0x554, "CEmergencyPed: error");
|
VALIDATE_SIZE(CEmergencyPed, 0x554);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,7 +10,7 @@ struct CGangInfo
|
||||||
CGangInfo();
|
CGangInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CGangInfo) == 0x10, "CGangInfo: error");
|
VALIDATE_SIZE(CGangInfo, 0x10);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GANG_MAFIA = 0,
|
GANG_MAFIA = 0,
|
||||||
|
|
|
@ -82,7 +82,7 @@ struct FightMove
|
||||||
uint8 damage;
|
uint8 damage;
|
||||||
uint8 flags;
|
uint8 flags;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(FightMove) == 0x18, "FightMove: error");
|
VALIDATE_SIZE(FightMove, 0x18);
|
||||||
|
|
||||||
// TODO: This is eFightState on mobile.
|
// TODO: This is eFightState on mobile.
|
||||||
enum PedFightMoves
|
enum PedFightMoves
|
||||||
|
@ -899,16 +899,5 @@ public:
|
||||||
void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
|
void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
|
||||||
|
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
|
VALIDATE_SIZE(CPed, 0x53C);
|
||||||
static_assert(offsetof(CPed, m_pCurSurface) == 0x2FC, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_pMyVehicle) == 0x310, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_nPedType) == 0x32C, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_pCollidingEntity) == 0x34C, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_weapons) == 0x35C, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_currentWeapon) == 0x498, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_lookTimer) == 0x4CC, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_bodyPartBleeding) == 0x4F2, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_pedInObjective) == 0x16C, "CPed: error");
|
|
||||||
static_assert(offsetof(CPed, m_pEventEntity) == 0x19C, "CPed: error");
|
|
||||||
static_assert(sizeof(CPed) == 0x53C, "CPed: error");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,4 +64,5 @@ public:
|
||||||
bool LookAtPosition(CVector const& pos);
|
bool LookAtPosition(CVector const& pos);
|
||||||
bool RestoreLookAt(void);
|
bool RestoreLookAt(void);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CPedIK) == 0x28, "CPedIK: error");
|
|
||||||
|
VALIDATE_SIZE(CPedIK, 0x28);
|
||||||
|
|
|
@ -81,4 +81,5 @@ public:
|
||||||
static void LoadPedStats(void);
|
static void LoadPedStats(void);
|
||||||
static ePedStats GetPedStatType(char *name);
|
static ePedStats GetPedStatType(char *name);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CPedStats) == 0x34, "CPedStats: error");
|
|
||||||
|
VALIDATE_SIZE(CPedStats, 0x34);
|
||||||
|
|
|
@ -91,4 +91,4 @@ public:
|
||||||
static bool IsThreat(int type, int threat) { return ms_apPedType[type]->m_threats & threat; }
|
static bool IsThreat(int type, int threat) { return ms_apPedType[type]->m_threats & threat; }
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CPedType) == 0x20, "CPedType: error");
|
VALIDATE_SIZE(CPedType, 0x20);
|
||||||
|
|
|
@ -85,5 +85,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef PED_SKIN
|
#ifndef PED_SKIN
|
||||||
static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error");
|
VALIDATE_SIZE(CPlayerPed, 0x5F0);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -89,4 +89,5 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
static_assert(sizeof(C2dEffect) == 0x34, "C2dEffect: error");
|
|
||||||
|
VALIDATE_SIZE(C2dEffect, 0x34);
|
||||||
|
|
|
@ -38,7 +38,8 @@ struct CRegisteredCorona
|
||||||
|
|
||||||
void Update(void);
|
void Update(void);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CRegisteredCorona) == 0x80, "CRegisteredCorona: error");
|
|
||||||
|
VALIDATE_SIZE(CRegisteredCorona, 0x80);
|
||||||
|
|
||||||
class CCoronas
|
class CCoronas
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,8 +64,10 @@ struct tParticleSystemData
|
||||||
RwRaster **m_ppRaster;
|
RwRaster **m_ppRaster;
|
||||||
CParticle *m_pParticles;
|
CParticle *m_pParticles;
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(tParticleSystemData, 0x88);
|
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
|
VALIDATE_SIZE(tParticleSystemData, 0x88);
|
||||||
|
#endif
|
||||||
|
|
||||||
class cParticleSystemMgr
|
class cParticleSystemMgr
|
||||||
{
|
{
|
||||||
|
@ -125,6 +127,8 @@ public:
|
||||||
void RangeCheck(tParticleSystemData *pData) { }
|
void RangeCheck(tParticleSystemData *pData) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
VALIDATE_SIZE(cParticleSystemMgr, 0x2420);
|
VALIDATE_SIZE(cParticleSystemMgr, 0x2420);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern cParticleSystemMgr mod_ParticleSystemManager;
|
extern cParticleSystemMgr mod_ParticleSystemManager;
|
|
@ -13,7 +13,7 @@ public:
|
||||||
int8 fogType;
|
int8 fogType;
|
||||||
bool castExtraShadows;
|
bool castExtraShadows;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(CRegisteredPointLight) == 0x2C, "CRegisteredPointLight: error");
|
VALIDATE_SIZE(CRegisteredPointLight, 0x2C);
|
||||||
|
|
||||||
class CPointLights
|
class CPointLights
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,10 @@ public:
|
||||||
CStoredShadow()
|
CStoredShadow()
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
VALIDATE_SIZE(CStoredShadow, 0x30);
|
VALIDATE_SIZE(CStoredShadow, 0x30);
|
||||||
|
#endif
|
||||||
|
|
||||||
class CPolyBunch
|
class CPolyBunch
|
||||||
{
|
{
|
||||||
|
@ -65,7 +68,10 @@ public:
|
||||||
CPolyBunch()
|
CPolyBunch()
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
VALIDATE_SIZE(CPolyBunch, 0x6C);
|
VALIDATE_SIZE(CPolyBunch, 0x6C);
|
||||||
|
#endif
|
||||||
|
|
||||||
class CStaticShadow
|
class CStaticShadow
|
||||||
{
|
{
|
||||||
|
@ -93,7 +99,10 @@ public:
|
||||||
|
|
||||||
void Free();
|
void Free();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CHECK_STRUCT_SIZES
|
||||||
VALIDATE_SIZE(CStaticShadow, 0x40);
|
VALIDATE_SIZE(CStaticShadow, 0x40);
|
||||||
|
#endif
|
||||||
|
|
||||||
class CPermanentShadow
|
class CPermanentShadow
|
||||||
{
|
{
|
||||||
|
@ -115,6 +124,7 @@ public:
|
||||||
CPermanentShadow()
|
CPermanentShadow()
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CPermanentShadow, 0x38);
|
VALIDATE_SIZE(CPermanentShadow, 0x38);
|
||||||
|
|
||||||
class CPtrList;
|
class CPtrList;
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
void PushPeds(void);
|
void PushPeds(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CWaterCannon) == 412, "CWaterCannon: error");
|
VALIDATE_SIZE(CWaterCannon, 412);
|
||||||
|
|
||||||
class CWaterCannons
|
class CWaterCannons
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,8 +12,9 @@ struct CKeyEntry
|
||||||
wchar *value;
|
wchar *value;
|
||||||
char key[8];
|
char key[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
// If this fails, CKeyArray::Load will have to be fixed
|
// If this fails, CKeyArray::Load will have to be fixed
|
||||||
static_assert(sizeof(CKeyEntry) == 12, "CKeyEntry: error");
|
VALIDATE_SIZE(CKeyEntry, 12);
|
||||||
|
|
||||||
class CKeyArray
|
class CKeyArray
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,7 @@ public:
|
||||||
float GetHeightToDropoffHeight() { return m_fDropoffHeight + (m_bIsCrusher ? 7.0f : 2.0f); }
|
float GetHeightToDropoffHeight() { return m_fDropoffHeight + (m_bIsCrusher ? 7.0f : 2.0f); }
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CCrane) == 128, "CCrane: error");
|
VALIDATE_SIZE(CCrane, 128);
|
||||||
|
|
||||||
class CCranes
|
class CCranes
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,4 +46,4 @@ public:
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CWeaponInfo) == 0x54, "CWeaponInfo: error");
|
VALIDATE_SIZE(CWeaponInfo, 0x54);
|
Loading…
Reference in a new issue