diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-29 09:52:14 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-29 09:52:14 (GMT) |
commit | 442204d0f510cb033cb75a542b010f4f90cbd2a3 (patch) | |
tree | a243159f780aa77d53d2523a0dea7a365613ae21 /src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp | |
parent | afda86c8ba1f2ce3dc89a56bf9bccc62c52ff240 (diff) | |
download | uscxml-442204d0f510cb033cb75a542b010f4f90cbd2a3.zip uscxml-442204d0f510cb033cb75a542b010f4f90cbd2a3.tar.gz uscxml-442204d0f510cb033cb75a542b010f4f90cbd2a3.tar.bz2 |
Some bug-fixes and enhancements to build-process
Diffstat (limited to 'src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp')
-rw-r--r-- | src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp b/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp index a5f90b8..64fa70a 100644 --- a/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp +++ b/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp @@ -83,7 +83,7 @@ OpenALPlayer::~OpenALPlayer() { } alDeleteBuffers(_nrBuffers, _bufferIds); for (int i = 0; i < _nrBuffers; i++) { - assert(!alIsBuffer(_bufferIds[i])); +// assert(!alIsBuffer(_bufferIds[i])); } free(_buffers); free(_bufferIds); @@ -160,28 +160,27 @@ void OpenALPlayer::init() { } // set our position and various flags to meaningful defaults + alSourcei (_alId, AL_SOURCE_RELATIVE, AL_TRUE); + checkOpenALError(__LINE__); alSourcei(_alId, AL_LOOPING, AL_FALSE); checkOpenALError(__LINE__); alSourcefv(_alId, AL_POSITION, _position); checkOpenALError(__LINE__); - alSourcef(_alId,AL_REFERENCE_DISTANCE, 5.0f); - checkOpenALError(__LINE__); -// alDistanceModel(AL_LINEAR_DISTANCE); -// checkOpenALError(__LINE__); -// alSourcefv(_alId, AL_VELOCITY, _velocity); -// checkOpenALError(__LINE__); -// alSourcefv(_alId, AL_DIRECTION, _direction); +// alSourcef(_alId,AL_REFERENCE_DISTANCE, 5.0f); // checkOpenALError(__LINE__); + alDistanceModel(AL_LINEAR_DISTANCE); + checkOpenALError(__LINE__); + alSourcefv(_alId, AL_VELOCITY, _velocity); + checkOpenALError(__LINE__); + alSourcefv(_alId, AL_DIRECTION, _direction); + checkOpenALError(__LINE__); // alSourcef (_alId, AL_ROLLOFF_FACTOR, 1.0); // checkOpenALError(__LINE__); - alSourcef(_alId,AL_REFERENCE_DISTANCE, 5.0f); - checkOpenALError(__LINE__); +// alSourcef(_alId,AL_REFERENCE_DISTANCE, 5.0f); +// checkOpenALError(__LINE__); // float listener[] = { 0.0, 0.0, 0.0 }; // alListenerfv(AL_POSITION, listener); // checkOpenALError(__LINE__); - - alSourcei (_alId, AL_SOURCE_RELATIVE, AL_TRUE); - checkOpenALError(__LINE__); } /** |