Class AudioLayer
Wrapper around OpenAL
public class AudioLayer
- Inheritance
-
AudioLayer
Methods
BufferCreate(int)
public static extern AudioLayer.Buffer BufferCreate(int maxBufferSizeBytes)
Parameters
maxBufferSizeBytes
int
Returns
BufferDestroy(Buffer)
public static extern void BufferDestroy(AudioLayer.Buffer buffer)
Parameters
buffer
AudioLayer.Buffer
BufferFill(Buffer, IntPtr, int, int, bool)
public static extern void BufferFill(AudioLayer.Buffer buffer, IntPtr pcm, int bufferSize, int sampleRate, bool mono)
Parameters
Create(string, DeviceFlags)
public static extern AudioLayer.Device Create(string deviceName, AudioLayer.DeviceFlags flags)
Parameters
deviceName
stringflags
AudioLayer.DeviceFlags
Returns
Destroy(Device)
public static extern void Destroy(AudioLayer.Device device)
Parameters
device
AudioLayer.Device
Init()
public static extern bool Init()
Returns
ListenerCreate(Device)
public static extern AudioLayer.Listener ListenerCreate(AudioLayer.Device device)
Parameters
device
AudioLayer.Device
Returns
ListenerDestroy(Listener)
public static extern void ListenerDestroy(AudioLayer.Listener listener)
Parameters
listener
AudioLayer.Listener
ListenerDisable(Listener)
public static extern void ListenerDisable(AudioLayer.Listener listener)
Parameters
listener
AudioLayer.Listener
ListenerEnable(Listener)
public static extern bool ListenerEnable(AudioLayer.Listener listener)
Parameters
listener
AudioLayer.Listener
Returns
ListenerPush3D(Listener, ref Vector3, ref Vector3, ref Vector3, ref Vector3, ref Matrix)
public static extern void ListenerPush3D(AudioLayer.Listener listener, ref Vector3 pos, ref Vector3 forward, ref Vector3 up, ref Vector3 vel, ref Matrix worldTransform)
Parameters
listener
AudioLayer.Listenerpos
Vector3forward
Vector3up
Vector3vel
Vector3worldTransform
Matrix
SetMasterVolume(Device, float)
public static extern void SetMasterVolume(AudioLayer.Device device, float volume)
Parameters
device
AudioLayer.Devicevolume
float
SourceCreate(Listener, int, int, bool, bool, bool, bool, float, HrtfEnvironment)
public static extern AudioLayer.Source SourceCreate(AudioLayer.Listener listener, int sampleRate, int maxNumberOfBuffers, bool mono, bool spatialized, bool streamed, bool hrtf, float hrtfDirectionFactor, HrtfEnvironment environment)
Parameters
listener
AudioLayer.ListenersampleRate
intmaxNumberOfBuffers
intmono
boolspatialized
boolstreamed
boolhrtf
boolhrtfDirectionFactor
floatenvironment
HrtfEnvironment
Returns
SourceDestroy(Source)
public static extern void SourceDestroy(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
SourceFlushBuffers(Source)
public static extern void SourceFlushBuffers(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
SourceGetFreeBuffer(Source)
public static extern AudioLayer.Buffer SourceGetFreeBuffer(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
Returns
SourceGetPosition(Source)
public static extern double SourceGetPosition(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
Returns
SourceIsPlaying(Source)
public static extern bool SourceIsPlaying(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
Returns
SourcePause(Source)
public static extern void SourcePause(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
SourcePlay(Source)
public static extern void SourcePlay(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
SourcePush3D(Source, ref Vector3, ref Vector3, ref Vector3, ref Vector3, ref Matrix)
public static extern void SourcePush3D(AudioLayer.Source source, ref Vector3 pos, ref Vector3 forward, ref Vector3 up, ref Vector3 vel, ref Matrix worldTransform)
Parameters
SourceQueueBuffer(Source, Buffer, IntPtr, int, BufferType)
public static extern void SourceQueueBuffer(AudioLayer.Source source, AudioLayer.Buffer buffer, IntPtr pcm, int bufferSize, AudioLayer.BufferType streamType)
Parameters
source
AudioLayer.Sourcebuffer
AudioLayer.Bufferpcm
IntPtrbufferSize
intstreamType
AudioLayer.BufferType
SourceSetBuffer(Source, Buffer)
public static extern void SourceSetBuffer(AudioLayer.Source source, AudioLayer.Buffer buffer)
Parameters
source
AudioLayer.Sourcebuffer
AudioLayer.Buffer
SourceSetGain(Source, float)
public static extern void SourceSetGain(AudioLayer.Source source, float gain)
Parameters
source
AudioLayer.Sourcegain
float
SourceSetLooping(Source, bool)
public static extern void SourceSetLooping(AudioLayer.Source source, bool looped)
Parameters
source
AudioLayer.Sourcelooped
bool
SourceSetPan(Source, float)
public static extern void SourceSetPan(AudioLayer.Source source, float pan)
Parameters
source
AudioLayer.Sourcepan
float
SourceSetPitch(Source, float)
public static extern void SourceSetPitch(AudioLayer.Source source, float pitch)
Parameters
source
AudioLayer.Sourcepitch
float
SourceSetRange(Source, double, double)
public static extern void SourceSetRange(AudioLayer.Source source, double startTime, double stopTime)
Parameters
source
AudioLayer.SourcestartTime
doublestopTime
double
SourceStop(Source)
public static extern void SourceStop(AudioLayer.Source source)
Parameters
source
AudioLayer.Source
Update(Device)
public static extern void Update(AudioLayer.Device device)
Parameters
device
AudioLayer.Device