📄 altypes.pas
字号:
{********************************************************************}
{ OpenAL cross platform audio library }
{ Copyright (C) 1999-2000 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., 59 Temple Place - Suite 330, }
{ Boston, MA 02111-1307, USA. }
{ Or go to http://www.gnu.org/copyleft/lgpl.html }
{ }
{********************************************************************}
{********************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ Copyright (c) 1995,2001 Borland International }
{ Created by Project JEDI }
{ }
{ The original Pascal code is: ALTypes.pas }
{ The initial developer of the Pascal code is Tom Nuydens }
{ }
{ }
{ Portions created by Tom Nuydens are }
{ Copyright (C) 2001 Tom Nuydens (delphi3d@gamedeveloper.org) }
{ }
{ }
{ Portions created by Dean Ellis are }
{ Copyright (C) 2001 Dean Ellis (dean.ellis@sxmedia.co.uk) }
{ }
{ Portions created by Amresh Ramachandran are }
{ Copyright (C) 2001 Amresh Ramachandran (amreshr@hotmail.com) }
{ }
{ }
{ Portions created by Pranav Joshi are }
{ Copyright (C) 2001 Pranav Joshi (pranavjosh@yahoo.com) }
{ }
{ Contributor(s): Tom Nuydens }
{ Dean Ellis }
{ Amresh Ramachandran }
{ Pranav Joshi }
{ }
{ Obtained through: }
{ }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the "License"); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{********************************************************************}
unit ALTypes;
{***************************************************************
*
* Unit Name : ALTypes
* Purpose :
* This is an interface unit for the use of OpenAL from within Delphi and
* contains the translations of altypes.h
* Author : Amresh Ramachandran amreshr@hotmail.com
* - first translation from Tom Nuydens and Dean Ellis.
* - previous versions from Amresh Ramachandran and Pranav Joshi
* - Amresh Ramachandran
* Project name : OpenAL Delphi Translation
* Created : 12-Oct-2001
* History :
* Saturday, October 20, 2001 16:17
* Included this header
*
****************************************************************}
interface
type
//** OpenAL boolean type.
TALboolean = Boolean;
PALboolean = ^TALboolean;
//** OpenAL 8bit signed byte.
TALbyte = ShortInt;
PALbyte = ^TALbyte;
//** OpenAL 8bit unsigned byte.
TALuByte = Char;
PALuByte = PChar;
//** OpenAL 16bit signed short integer type.
TALshort = SmallInt;
PALshort = ^TALshort;
//** OpenAL 16bit unsigned short integer type.
TALushort = Word;
PALushort = ^TALushort;
//** OpenAL 32bit unsigned integer type.
TALuint = Cardinal;
PALuint = ^TALuint;
//** OpenAL 32bit signed integer type.
TALint = Integer;
PALint = ^TALint;
//** OpenAL 32bit floating point type.
TALfloat = Single;
PALfloat = ^TALfloat;
//** OpenAL 64bit double point type.
TALdouble = Double;
PALdouble = ^TALdouble;
//** OpenAL 32bit type.
TALsizei = Cardinal;
PALsizei = ^TALsizei;
//** OpenAL void type
TALvoid = Pointer;
PALvoid = ^TALvoid;
PPALvoid = ^PALvoid;
//** OpenAL enumerations.
TALenum = Integer;
PALenum = ^TALenum;
//** OpenAL bitfields.
TALbitfield = Cardinal;
PALbitfield = ^TALbitfield;
//** OpenAL clamped float.
TALclampf = TALfloat;
PALclampf = ^TALclampf;
//** Openal clamped double. */
TALclampd = TALdouble;
PALclampd = ^TALclampd;
const
// Bad value.
AL_INVALID = -1;
// Disable value
AL_NONE = 0;
// Boolean False.
AL_FALSE = 0;
// Boolean True.
AL_TRUE = 1;
(**
* Indicate the type of AL_SOURCE.
* Sources can be spatialized
*)
AL_SOURCE_TYPE = $200;
// Indicate Source has absolute coordinates.
AL_SOURCE_ABSOLUTE = $201;
// Indicate Source has listener relative coordinates.
AL_SOURCE_RELATIVE = $202;
(**
* Multichannel Sources bypass OpenAl completely, and get
* handled by the hardware. No other source type will handle 2
* or more channel sounds, although stereo sound samples
* can get mixed into mono for simplicity.
*)
AL_SOURCE_MULTICHANNEL = $204;
(**
* Aureal's Area source, oh my....
*)
AL_SOURCE_POINT = $205;
(**
* Directional source, inner cone angle, in degrees.
* Range: [0-360]
* Default: 360
*)
AL_CONE_INNER_ANGLE = $1001;
(**
* Directional source, outer cone angle, in degrees.
* Range: [0-360]
* Default: 360
*)
AL_CONE_OUTER_ANGLE = $1002;
(**
* Specify the pitch to be applied, either at source,
* or on mixer results, at listener.
* Range: [0.5-2.0]
* Default: 1.0
*)
AL_PITCH = $1003;
(**
* Specify the current 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.
* Listener position is always in the world coordinate system.
*)
AL_POSITION = $1004;
(** Specify the current direction as forward vector. *)
AL_DIRECTION = $1005;
(** Specify the current velocity in three dimensional space. *)
AL_VELOCITY = $1006;
(**
* Indicate whether source is looping.
* Type: ALboolean?
* Range: [AL_TRUE, AL_FALSE]
* Default: FALSE.
*)
AL_LOOPING = $1007;
(**
* Indicate whether source is meant to be streaming.
* Type: ALboolean?
* Range: [AL_TRUE, AL_FALSE]
* Default: FALSE.
*)
AL_STREAMING = $1008;
(**
* Indicate the rolloff factor for the source.
* Type: ALfloat
* Range: [0.0 - ]
* Default: 1.0
AL_ROLLOFF_FACTOR = $1008;
*)
(**
* Indicate the buffer to provide sound samples.
* Type: ALuint.
* Range: any valid Buffer id.
*)
AL_BUFFER = $1009;
(**
* Indicate the gain (volume amplification) applied.
* Type: ALfloat.
* Range: ]0.0- ]
* A value of 1.0 means un-attenuated/unchanged.
* Each division by 2 equals an attenuation of -6dB.
* Each multiplicaton with 2 equals an amplification of +6dB.
* A value of 0.0 is meaningless with respect to a logarithmic
* scale; it is interpreted as zero volume - the channel
* is effectively disabled.
*)
AL_GAIN = $100A;
(**
* Indicate Source is ambient (not localized by application).
* It is up to the driver how it wants to handle this case.
* Ideally, the (human) listener should be unable to localize
* this one. Easy :-).
*)
AL_SOURCE_AMBIENT = $100B;
(* byte offset into source (in canon format). -1 if source
* is not playing. Don't set this, get this.
*
* Type: ALint
* Range: -1 - +inf
*)
AL_BYTE_LOKI = $100C;
(*
* Indicate minimum source attenuation
* Type: ALfloat
* Range: [0.0 - 1.0]
*
* Logarthmic
*)
AL_MIN_GAIN = $100D;
(**
* Indicate maximum source attenuation
* Type: ALfloat
* Range: [0.0 - 1.0]
*
* Logarthmic
*)
AL_MAX_GAIN = $100E;
(**
* Indicate listener orientation.
*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -