Changeset 7314 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Apr 17, 2006, 1:19:20 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_buffer.cc
r6222 r7314 42 42 43 43 ShellBuffer* ShellBuffer::singletonRef = NULL; 44 SDL_mutex* ShellBuffer::bufferMutex = NULL; 44 45 45 46 /** … … 52 53 53 54 this->flush(); 55 56 if (ShellBuffer::bufferMutex != NULL) 57 SDL_DestroyMutex(ShellBuffer::bufferMutex); 58 ShellBuffer::bufferMutex = NULL; 54 59 55 60 ShellBuffer::singletonRef = NULL; … … 103 108 va_start(arguments, line); 104 109 110 if (ShellBuffer::bufferMutex == NULL) 111 ShellBuffer::bufferMutex = SDL_CreateMutex(); 112 113 SDL_mutexP(ShellBuffer::bufferMutex); 105 114 #if DEBUG < 3 106 115 if (ShellBuffer::singletonRef == NULL) 107 116 #endif 108 109 117 vprintf(line, arguments); 110 118 #if DEBUG < 3 … … 114 122 #endif 115 123 ShellBuffer::singletonRef->addBufferLine(line, arguments); 124 SDL_mutexV(ShellBuffer::bufferMutex); 116 125 return true; 117 126 } -
trunk/src/lib/shell/shell_buffer.h
r5784 r7314 10 10 #include <stdarg.h> 11 11 #include <list> 12 #include <SDL_thread.h> 12 13 13 14 #define SHELL_BUFFER_SIZE 16384 //!< The Size of the input-buffers (should be large enough to carry any kind of input) … … 60 61 61 62 unsigned long lineCount; //!< how many Lines have been written out so far. 63 64 static SDL_mutex* bufferMutex; //!< Only one thread may write into the ShellBuffer at a time. 62 65 }; 63 66 -
trunk/src/lib/sound/ogg_player.cc
r7313 r7314 13 13 co-programmer: ... 14 14 15 Beware: 16 The Ogg-Player is a __Threaded__ Stream, this means, that invoking play() 17 creates a Thread, that loops through the Music-File. The Thread seems 18 to be safe, but it is not guarantied. 15 19 16 20 ------------------------------------------------------------------- 17 The source of this file comes stright fromhttp://www.devmaster.net21 A Simple Version of this can be found at http://www.devmaster.net 18 22 Thanks a lot for the nice work, and the easy portability to our Project. 19 23 */ 20 21 24 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SOUND 22 25
Note: See TracChangeset
for help on using the changeset viewer.