The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Types | Public Member Functions | Properties | List of all members
OpenTK.Audio.OpenAL.XRamExtension Class Reference

The X-Ram Extension is provided on the top-end Sound Blaster X-Fi solutions (Sound Blaster X-Fi Fatal1ty, Sound Blaster X-Fi Elite Pro, or later). These products feature 64MB of X-Ram that can only be used for audio purposes, which can be controlled by this Extension. /summary> More...

Public Types

enum  XRamStorage : byte { XRamStorage.Automatic = 0, XRamStorage.Hardware = 1, XRamStorage.Accessible = 2 }
 This enum is used to abstract the need of using AL.GetEnumValue() with the Extension. The values do NOT correspond to AL_STORAGE_* tokens! More...
 

Public Member Functions

 XRamExtension ()
 Constructs a new XRamExtension instance. More...
 
bool SetBufferMode (int n, ref uint buffer, XRamStorage mode)
 This function is used to set the storage Mode of an array of OpenAL Buffers. More...
 
bool SetBufferMode (int n, ref int buffer, XRamStorage mode)
 This function is used to set the storage Mode of an array of OpenAL Buffers. More...
 
XRamStorage GetBufferMode (ref uint buffer)
 This function is used to retrieve the storage Mode of a single OpenAL Buffer. More...
 
XRamStorage GetBufferMode (ref int buffer)
 This function is used to retrieve the storage Mode of a single OpenAL Buffer. More...
 

Properties

bool IsInitialized [get]
 Returns True if the X-Ram Extension has been found and could be initialized. More...
 
int GetRamSize [get]
 Query total amount of X-RAM in bytes. More...
 
int GetRamFree [get]
 Query free X-RAM available in bytes. More...
 

Detailed Description

The X-Ram Extension is provided on the top-end Sound Blaster X-Fi solutions (Sound Blaster X-Fi Fatal1ty, Sound Blaster X-Fi Elite Pro, or later). These products feature 64MB of X-Ram that can only be used for audio purposes, which can be controlled by this Extension. /summary>

Member Enumeration Documentation

This enum is used to abstract the need of using AL.GetEnumValue() with the Extension. The values do NOT correspond to AL_STORAGE_* tokens!

Enumerator
Automatic 

Put an Open AL Buffer into X-RAM if memory is available, otherwise use host RAM. This is the default mode.

Hardware 

Force an Open AL Buffer into X-RAM, good for non-streaming buffers.

Accessible 

Force an Open AL Buffer into 'accessible' (currently host) RAM, good for streaming buffers.

Constructor & Destructor Documentation

OpenTK.Audio.OpenAL.XRamExtension.XRamExtension ( )

Constructs a new XRamExtension instance.

Member Function Documentation

XRamStorage OpenTK.Audio.OpenAL.XRamExtension.GetBufferMode ( ref uint  buffer)

This function is used to retrieve the storage Mode of a single OpenAL Buffer.

Parameters
bufferThe handle of an OpenAL Buffer.
Returns
The current Mode of the Buffer.
XRamStorage OpenTK.Audio.OpenAL.XRamExtension.GetBufferMode ( ref int  buffer)

This function is used to retrieve the storage Mode of a single OpenAL Buffer.

Parameters
bufferThe handle of an OpenAL Buffer.
Returns
The current Mode of the Buffer.
bool OpenTK.Audio.OpenAL.XRamExtension.SetBufferMode ( int  n,
ref uint  buffer,
XRamStorage  mode 
)

This function is used to set the storage Mode of an array of OpenAL Buffers.

Parameters
nThe number of OpenAL Buffers pointed to by buffer.
bufferAn array of OpenAL Buffer handles.
modeThe storage mode that should be used for all the given buffers. Should be the value of one of the following enum names: XRamStorage.Automatic, XRamStorage.Hardware, XRamStorage.Accessible
Returns
True if all the Buffers were successfully set to the requested storage mode, False otherwise.
bool OpenTK.Audio.OpenAL.XRamExtension.SetBufferMode ( int  n,
ref int  buffer,
XRamStorage  mode 
)

This function is used to set the storage Mode of an array of OpenAL Buffers.

Parameters
nThe number of OpenAL Buffers pointed to by buffer.
bufferAn array of OpenAL Buffer handles.
modeThe storage mode that should be used for all the given buffers. Should be the value of one of the following enum names: XRamStorage.Automatic, XRamStorage.Hardware, XRamStorage.Accessible
Returns
True if all the Buffers were successfully set to the requested storage mode, False otherwise.

Property Documentation

int OpenTK.Audio.OpenAL.XRamExtension.GetRamFree
get

Query free X-RAM available in bytes.

int OpenTK.Audio.OpenAL.XRamExtension.GetRamSize
get

Query total amount of X-RAM in bytes.

bool OpenTK.Audio.OpenAL.XRamExtension.IsInitialized
get

Returns True if the X-Ram Extension has been found and could be initialized.