7 #ifndef __openal_AudioAL_h__ 8 #define __openal_AudioAL_h__ 10 #define FE_RETURN_AL_ERROR(text) \ 11 { Result al_result=checkError(text); \ 12 if(failure(al_result)) return al_result; } 36 virtual Result flush(
void);
41 ALuint lookup(
String name)
const;
47 typedef HashMap<String,ALuint,hash_string,eq_string> BufferMap;
50 ALCcontext* m_pContext;
52 BufferMap m_bufferMap;
57 inline ALuint AudioAL::lookup(
String name)
const 59 BufferMap::const_iterator it=m_bufferMap.find(name);
60 if(it==m_bufferMap.end())
70 ALuint error=alGetError();
76 feLog(
"AudioAL::checkError AL_INVALID_NAME (%s)\n",text.
c_str());
77 return e_invalidHandle;
79 feLog(
"AudioAL::checkError AL_INVALID_ENUM (%s)\n",text.
c_str());
81 case AL_INVALID_VALUE:
82 feLog(
"AudioAL::checkError AL_INVALID_VALUE (%s)\n",text.
c_str());
83 return e_invalidRange;
84 case AL_INVALID_OPERATION:
85 feLog(
"AudioAL::checkError AL_INVALID_OPERATION (%s)\n",
88 case AL_OUT_OF_MEMORY:
89 feLog(
"AudioAL::checkError AL_OUT_OF_MEMORY (%s)\n",text.
c_str());
92 feLog(
"AudioAL::checkError undefined error (%s)\n",text.
c_str());
93 return e_undefinedFailure;
Fully Bidirectional Doubly-Linked List.
Definition: List.h:496
const FESTRING_I8 * c_str(void) const
Return the contents of the 8-bit buffer cast as signed bytes.
Definition: String.h:352
kernel
Definition: namespace.dox:3
Automatically reference-counted string container.
Definition: String.h:128
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
const String & name(void) const
Return the components chosen name.
Definition: Component.h:77
Audio handling using OpenAL.
Definition: AudioAL.h:25
Sound system.
Definition: AudioI.h:19
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192