[XAudio2] avoid leak + fix voice creation for closest match
[xbmc.git] / xbmc / commons / ilog.h
blob9fe074af4140b669e79b254fc0cd6731166ecda2
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 constexpr int LOG_LEVEL_NONE = -1; // nothing at all is logged
12 constexpr int LOG_LEVEL_NORMAL = 0; // shows notice, error, severe and fatal
13 constexpr int LOG_LEVEL_DEBUG = 1; // shows all
14 constexpr int LOG_LEVEL_DEBUG_FREEMEM = 2; // shows all + shows freemem on screen
15 constexpr int LOG_LEVEL_MAX = LOG_LEVEL_DEBUG_FREEMEM;
17 // ones we use in the code
18 constexpr int LOGDEBUG = 0;
19 constexpr int LOGINFO = 1;
20 constexpr int LOGWARNING = 2;
21 constexpr int LOGERROR = 3;
22 constexpr int LOGFATAL = 4;
23 constexpr int LOGNONE = 5;
25 // extra masks - from bit 5
26 constexpr int LOGMASKBIT = 5;
27 constexpr int LOGMASK = ((1 << LOGMASKBIT) - 1);
29 constexpr int LOGSAMBA = (1 << (LOGMASKBIT + 0));
30 constexpr int LOGCURL = (1 << (LOGMASKBIT + 1));
31 constexpr int LOGFFMPEG = (1 << (LOGMASKBIT + 2));
32 constexpr int LOGDBUS = (1 << (LOGMASKBIT + 4));
33 constexpr int LOGJSONRPC = (1 << (LOGMASKBIT + 5));
34 constexpr int LOGAUDIO = (1 << (LOGMASKBIT + 6));
35 constexpr int LOGAIRTUNES = (1 << (LOGMASKBIT + 7));
36 constexpr int LOGUPNP = (1 << (LOGMASKBIT + 8));
37 constexpr int LOGCEC = (1 << (LOGMASKBIT + 9));
38 constexpr int LOGVIDEO = (1 << (LOGMASKBIT + 10));
39 constexpr int LOGWEBSERVER = (1 << (LOGMASKBIT + 11));
40 constexpr int LOGDATABASE = (1 << (LOGMASKBIT + 12));
41 constexpr int LOGAVTIMING = (1 << (LOGMASKBIT + 13));
42 constexpr int LOGWINDOWING = (1 << (LOGMASKBIT + 14));
43 constexpr int LOGPVR = (1 << (LOGMASKBIT + 15));
44 constexpr int LOGEPG = (1 << (LOGMASKBIT + 16));
45 constexpr int LOGANNOUNCE = (1 << (LOGMASKBIT + 17));
46 constexpr int LOGWSDISCOVERY = (1 << (LOGMASKBIT + 18));
47 constexpr int LOGADDONS = (1 << (LOGMASKBIT + 19));