Author: muggenhor
Date: Thu Mar 22 19:56:35 2007
New Revision: 922
URL: http://svn.gna.org/viewcvs/warzone?rev=922&view=rev
Log:
* move OpenAL device enumeration from class soundDevice to a singleton class
soundDeviceList (openal/devicelist.[ch]pp)
* was already singleton, but turned it into a class of its own for better
encapsulation
* make all copy constructors and copy assignment operators of classes
representing OpenAL objects private
* this because the OpenAL API provides no copy semantics, so providing copy
semantics to class users would go at a significant overhead
* change soundBuffer::bufferData to take a `const char*` as buffer instead of
a smartpointer (boost::shared_array<char>) because the additional safety
provided by a smart pointer is not needed (i.e. the buffer does not need to be
destroyed upon function exit or class destruction, nor does it take, or should,
take ownership of the buffer)
* move creation of C style array of strings from C-interace (interface.cpp) to
sub/memberclass of soundDeviceList -> soundDeviceList::_CArray
* while at it, modified that piece of code to use the iterator idiom rather
than subscript access functions (template instantiation will turn it into
regular pointer arithmatic, so it won't be any slower)
* improve sound_Destroy2DStream to not only destroy the soundStream object,
but also the smart pointer to it
Added:
branches/sound/lib/sound/openal/devicelist.cpp
- copied, changed from r921, branches/sound/lib/sound/openal/device.cpp
branches/sound/lib/sound/openal/devicelist.hpp
- copied, changed from r921, branches/sound/lib/sound/openal/device.hpp
Modified:
branches/sound/lib/sound/Makefile.raw
branches/sound/lib/sound/interface.cpp
branches/sound/lib/sound/openal/buffer.cpp
branches/sound/lib/sound/openal/buffer.hpp
branches/sound/lib/sound/openal/context.hpp
branches/sound/lib/sound/openal/device.cpp
branches/sound/lib/sound/openal/device.hpp
branches/sound/lib/sound/openal/source.hpp
branches/sound/lib/sound/stream.cpp
_______________________________________________
Warzone-commits mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-commits