Alut hides Device and Context allocation through Alc, and adds means to load or generate sound data. We will use Alut for all examples, until OpenTK includes a wrapper.
Alut.Init() will initialize the default Device and Context and makes it current. Calling Alut.Exit() at the end of the program will destroy the Device and Context.
Buffers
Buffers in OpenAL are merely the storage for audio data in raw format, a Buffer Name (often called Handle) must be generated using AL.GenBuffers(). This buffer can now be filled using AL.BufferData(), or using the Alut.CreateBufferFromFile (which loads a file from disk) or Alut.CreateBufferWaveform (which generates noise through parameters). The Alut functions imply the step of using AL.BufferData() to pass the raw sound data into OpenAL's memory.
X-Ram
The X-Ram Extension allows to manually assign Buffers a storage space, it's use is optional and not required. To use the Extension, the XRam wrapper must be instantiated (per used Device), which will take care of most ugly things with Extensions for you. The instantiated object contains a bool that returns if the Extension is usable, which should be checked before calling one of the Extension's Methods.
Example code:
A description of the sound data in the Buffer can be queried using AL.GetBuffer().
Now that the Buffer Handle has been assigned a sound, we need to attach it to a Source for playback.