isndsys/ss_eventrecorder.h
00001 /* 00002 Copyright (C) 2006 by Andrew Mann 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef CS_SNDSYS_EVENTRECORDER_H 00020 #define CS_SNDSYS_EVENTRECORDER_H 00021 00022 struct iSndSysEventRecorder; 00023 00024 00025 typedef enum 00026 { 00027 SSEL_BUG, // This event is surely a bug in our code - think of it like a loggable assertion 00028 SSEL_CRITICAL, // This event is so important you must absolutely know about it. It may or may not be a bug in our code. 00029 SSEL_ERROR, // Something bad happened for sure, but we can deal with it 00030 SSEL_WARNING, // Something bad _might_ be happening 00031 SSEL_DEBUG // General information that's really good to know for debugging purposes 00032 } SndSysEventLevel; 00033 00034 typedef enum 00035 { 00036 SSEC_DRIVER, // Event is related to the driver 00037 SSEC_RENDERER, // Event is related to the renderer, but not particularly a source or stream 00038 SSEC_SOURCE, // Event is related to a particular source 00039 SSEC_STREAM, // Event is related to a particular stream element 00040 SSEC_DATA // Event is relayed to a data element 00041 } SndSysEventCategory; 00042 00043 00044 00045 00046 00048 // 00049 // Important events in the sound system happen many times per second. Logging or reporting such a massive amount 00050 // of data can be unweildy (and annoying if you're not debugging the sound system). 00051 // 00052 // Additionally, sound events are often time critical - just knowing that a buffer was filled after some other action 00053 // is frequently not enough. A frequent requirement is to know the exact time between two events - as precise as possible. 00054 // 00055 // This interface provides these services for the sound system. 00056 struct iSndSysEventRecorder : public virtual iBase 00057 { 00059 SCF_INTERFACE (iSndSysEventRecorder, 1, 0, 0); 00060 00062 virtual void RecordEvent(SndSysEventCategory, SndSysEventLevel, const char* Description, ...) CS_GNUC_PRINTF(4, 5) = 0; 00063 00065 virtual void RecordEventV(SndSysEventCategory, SndSysEventLevel, const char* Description, va_list) CS_GNUC_PRINTF(4, 0) = 0; 00066 00067 }; 00068 00069 00070 #endif // #ifndef CS_SNDSYS_EVENTRECORDER_H 00071 00072
Generated for Crystal Space by doxygen 1.4.7