# File Loading

Summary

File Loading |
Functions |
alureCreateBufferFromFile | Loads the given file into a new OpenAL buffer object.
alureCreateBufferFromMemory | Loads a file image from memory into a new OpenAL buffer object, similar to alureCreateBufferFromFile.
alureBufferDataFromFile | Loads the given file into an existing OpenAL buffer object.
alureBufferDataFromMemory | Loads a file image from memory into an existing OpenAL buffer object, similar to alureBufferDataFromFile.

### Functions

### alureCreateBufferFromFile

> ALURE_API ALuint ALURE_APIENTRY alureCreateBufferFromFile( | const | ALchar | * | fname | )

Loads the given file into a new OpenAL buffer object. The formats supported depend on the options the library was compiled with, what libraries are available at runtime, and the installed decode callbacks. Requires an active context.

#### Returns

A new buffer ID with the loaded sound, or AL_NONE on error.

#### See Also

alureBufferDataFromFile

### alureCreateBufferFromMemory

> ALURE_API ALuint ALURE_APIENTRY alureCreateBufferFromMemory(
> | const | ALubyte | * | fdata,
> |  | ALsizei |  | length
> )

Loads a file image from memory into a new OpenAL buffer object, similar to alureCreateBufferFromFile. Requires an active context.

#### Returns

A new buffer ID with the loaded sound, or AL_NONE on error.

#### See Also

alureBufferDataFromMemory

### alureBufferDataFromFile

> ALURE_API ALboolean ALURE_APIENTRY alureBufferDataFromFile(
> | const | ALchar | * | fname,
> |  | ALuint |  | buffer
> )

Loads the given file into an existing OpenAL buffer object. The previous contents of the buffer are replaced. Requires an active context.

#### Returns

AL_FALSE on error.

#### See Also

alureCreateBufferFromFile

### alureBufferDataFromMemory

> ALURE_API ALboolean ALURE_APIENTRY alureBufferDataFromMemory(
> | const | ALubyte | * | fdata,
> |  | ALsizei |  | length,
> |  | ALuint |  | buffer
> )

Loads a file image from memory into an existing OpenAL buffer object, similar to alureBufferDataFromFile. Requires an active context.

#### Returns

AL_FALSE on error.

#### See Also

alureCreateBufferFromMemory

> ALURE_API ALuint ALURE_APIENTRY alureCreateBufferFromFile( | const | ALchar | * | fname | )

Loads the given file into a new OpenAL buffer object.

> ALURE_API ALuint ALURE_APIENTRY alureCreateBufferFromMemory(
> | const | ALubyte | * | fdata,
> |  | ALsizei |  | length
> )

Loads a file image from memory into a new OpenAL buffer object, similar to alureCreateBufferFromFile.

> ALURE_API ALboolean ALURE_APIENTRY alureBufferDataFromFile(
> | const | ALchar | * | fname,
> |  | ALuint |  | buffer
> )

Loads the given file into an existing OpenAL buffer object.

> ALURE_API ALboolean ALURE_APIENTRY alureBufferDataFromMemory(
> | const | ALubyte | * | fdata,
> |  | ALsizei |  | length,
> |  | ALuint |  | buffer
> )

Loads a file image from memory into an existing OpenAL buffer object, similar to alureBufferDataFromFile.
Close