Changeset 10577 in orxonox.OLD for branches/cleanup/src
- Timestamp:
- Feb 7, 2007, 9:31:36 PM (18 years ago)
- Location:
- branches/cleanup/src/lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cleanup/src/lib/sound/ogg_player.cc
r9869 r10577 79 79 bool OggPlayer::open(const std::string& fileName) 80 80 { 81 OrxThread::MutexLock musicLock(&this->musicMutex);81 OrxThread::MutexLocker musicLock(&this->musicMutex); 82 82 // release old Ogg-File (if loaded) 83 83 if (this->state & OggPlayer::FileOpened) … … 212 212 if (this->state & OggPlayer::FileOpened) 213 213 { 214 OrxThread::MutexLock musicLock(&this->musicMutex);214 OrxThread::MutexLocker musicLock(&this->musicMutex); 215 215 ov_time_seek(&this->oggStream, timeCode); 216 216 } … … 263 263 { 264 264 { 265 OrxThread::MutexLock musicLock(&ogg->musicMutex);265 OrxThread::MutexLocker musicLock(&ogg->musicMutex); 266 266 ogg->update(); 267 267 } … … 286 286 this->state |= OggPlayer::Playing; 287 287 288 OrxThread::MutexLock musicLock(&this->musicMutex);288 OrxThread::MutexLocker musicLock(&this->musicMutex); 289 289 if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1])) 290 290 { -
branches/cleanup/src/lib/sound/ogg_player.h
r10575 r10577 13 13 #include <ogg/ogg.h> 14 14 #include <vorbis/vorbisfile.h> 15 #include "util/threads/ threading.h"15 #include "util/threads/mutex_locker.h" 16 16 17 17 struct File; -
branches/cleanup/src/lib/util/debug_buffer.cc
r10575 r10577 20 20 #include "debug.h" 21 21 #include "compiler.h" 22 #include "threads/ threading.h"22 #include "threads/mutex_locker.h" 23 23 24 24 /** … … 64 64 static OrxThread::Mutex DebugBuffer__bufferMutex; 65 65 66 OrxThread::MutexLock bufferLock(&DebugBuffer__bufferMutex);66 OrxThread::MutexLocker bufferLock(&DebugBuffer__bufferMutex); 67 67 68 68 va_list arguments; -
branches/cleanup/src/lib/util/filesys/net_link.cc
r9406 r10577 17 17 #include "debug.h" 18 18 19 #include "threads/mutex_locker.h" 19 20 20 21 #ifdef __OSX__ … … 45 46 int NetLink::openupInBrowser(void* url) 46 47 { 47 OrxThread::MutexLock lock(&NetLink::_mutex);48 OrxThread::MutexLocker lock(&NetLink::_mutex); 48 49 49 50 std::string URL = *(std::string*)url; … … 69 70 void NetLink::setDefaultBrowser(const std::string& browserName) 70 71 { 71 OrxThread::MutexLock lock(&NetLink::_mutex);72 OrxThread::MutexLocker lock(&NetLink::_mutex); 72 73 NetLink::_defaultBrowser = browserName; 73 74 } -
branches/cleanup/src/lib/util/filesys/net_link.h
r10575 r10577 19 19 #include <list> 20 20 21 #include "threads/ threading.h"21 #include "threads/mutex.h" 22 22 23 23 //! NetLink is a File and Link executer for Internet Links -
branches/cleanup/src/lib/util/threads/mutex_locker.h
r10576 r10577 8 8 9 9 //! A Class that locks a Mutex within its scope 10 class MutexLock 10 class MutexLocker 11 11 { 12 12 public: 13 13 //! Locks the Mutex mutex in this Scope. 14 MutexLock (Mutex* mutex) { SDL_mutexP(mutex->getMutex()); this->mutex = mutex; };15 ~MutexLock () { SDL_mutexV(mutex->getMutex()); };14 MutexLocker(Mutex* mutex) { SDL_mutexP(mutex->getMutex()); this->mutex = mutex; }; 15 ~MutexLocker() { SDL_mutexV(mutex->getMutex()); }; 16 16 private: 17 17 Mutex* mutex; //!< The Mutex to lock.
Note: See TracChangeset
for help on using the changeset viewer.