Back to index

libsfml  1.6+dfsg2
Classes | Functions
sf::priv Namespace Reference


class  AudioDevice
 AudioDevice is the high-level wrapper around the audio API, it manages creation and destruction of the audio device and context and stores the device capabilities /////////////////////////////////////////////////////////. More...
class  SoundFile
 SoundFile is the abstract base class for loading and saving different sound file formats /////////////////////////////////////////////////////////. More...
class  SoundFileDefault
 Specialization of SoundFile that can handle a lot of sound formats (see libsndfile homepage for a complete list) /////////////////////////////////////////////////////////. More...
class  SoundFileOgg
 Specialization of SoundFile that handles ogg-vorbis files (.ogg) (does not support variable bitrate / channels and writing) /////////////////////////////////////////////////////////. More...
class  FontLoader
 FontLoader loads and saves character fonts /////////////////////////////////////////////////////////. More...
class  GraphicsContext
 RAII class ensuring a valid shared OpenGL context is bound to the current thread for all the lifetime of the instance. It also ensures all third party libraries (like GLEW) are properly initialized This class is for internal use only, it is required to solve tricky problems involving multi-threading /////////////////////////////////////////////////////////. More...
class  ImageLoader
 ImageLoader load and save images from files ; Supported formats are : bmp, dds, jpg, png, tga, psd /////////////////////////////////////////////////////////. More...
class  Platform
 Unix implementation fo Platform Give access to various global system functions /////////////////////////////////////////////////////////. More...
class  Joystick
 ****** implementation of Joystick (unknown implementation kind for now) ///////////////////////////////////////////////////////// More...
class  VideoModeSupport
 Cocoa implementation of VideoModeSupport Give access to video mode related OS-specific functions /////////////////////////////////////////////////////////. More...
class  WindowImplCocoa
 WindowImplCocoa is the Cocoa implementation of WindowImpl /////////////////////////////////////////////////////////. More...
struct  JoystickState
 Structure holding the joystick state's parameters /////////////////////////////////////////////////////////. More...
class  WindowImplX11
 WindowImplX11 is the Linux (X11) implementation of WindowImpl /////////////////////////////////////////////////////////. More...
class  WindowImplXXX
 WindowImplXXX is the XXX implementation of WindowImpl /////////////////////////////////////////////////////////. More...
class  WindowImplWin32
 WindowImplWin32 is the Win32 implementation of WindowImpl /////////////////////////////////////////////////////////. More...
class  WindowImpl
 Abstract base class for OS-specific window implementation /////////////////////////////////////////////////////////. More...


void ALCheckError (const std::string &File, unsigned int Line)
 Check last OpenAL error.

Function Documentation

void sf::priv::ALCheckError ( const std::string &  File,
unsigned int  Line 
) [inline]

Check last OpenAL error.


Definition at line 71 of file OpenAL.hpp.

    // Get the last error
    ALenum ErrorCode = alGetError();

    if (ErrorCode != AL_NO_ERROR)
        std::string Error, Desc;

        // Decode the error code
        switch (ErrorCode)
            case AL_INVALID_NAME :
                Error = "AL_INVALID_NAME";
                Desc  = "an unacceptable name has been specified";

            case AL_INVALID_ENUM :
                Error = "AL_INVALID_ENUM";
                Desc  = "an unacceptable value has been specified for an enumerated argument";

            case AL_INVALID_VALUE :
                Error = "AL_INVALID_VALUE";
                Desc  = "a numeric argument is out of range";

            case AL_INVALID_OPERATION :
                Error = "AL_INVALID_OPERATION";
                Desc  = "the specified operation is not allowed in the current state";

            case AL_OUT_OF_MEMORY :
                Error = "AL_OUT_OF_MEMORY";
                Desc  = "there is not enough memory left to execute the command";

        // Log the error
        std::cerr << "An internal OpenAL call failed in "
                  << File.substr(File.find_last_of("\\/") + 1) << " (" << Line << ") : "
                  << Error << ", " << Desc
                  << std::endl;