mirror of
https://github.com/morgan9e/VolumeControl
synced 2026-04-14 00:04:05 +09:00
51 lines
1.5 KiB
C
51 lines
1.5 KiB
C
// This file is part of Background Music.
|
|
//
|
|
// Background Music is free software: you can redistribute it and/or
|
|
// modify it under the terms of the GNU General Public License as
|
|
// published by the Free Software Foundation, either version 2 of the
|
|
// License, or (at your option) any later version.
|
|
//
|
|
// Background Music is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Background Music. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//
|
|
// VCDebugLogging.c
|
|
// PublicUtility
|
|
//
|
|
// Copyright © 2020, 2024 Kyle Neideck
|
|
//
|
|
|
|
// Self Include
|
|
#include "VCDebugLogging.h"
|
|
|
|
|
|
#pragma clang assume_nonnull begin
|
|
|
|
// It's probably not ideal to use a global variable for this, but it's a lot easier.
|
|
#if DEBUG || CoreAudio_Debug
|
|
// Enable debug logging by default in debug builds.
|
|
int gDebugLoggingIsEnabled = 1;
|
|
#else
|
|
int gDebugLoggingIsEnabled = 0;
|
|
#endif
|
|
|
|
// We don't bother synchronising accesses of gDebugLoggingIsEnabled because it isn't really
|
|
// necessary and would complicate code that accesses it on realtime threads.
|
|
int VCDebugLoggingIsEnabled(void)
|
|
{
|
|
return gDebugLoggingIsEnabled;
|
|
}
|
|
|
|
void VCSetDebugLoggingEnabled(int inEnabled)
|
|
{
|
|
gDebugLoggingIsEnabled = inEnabled;
|
|
}
|
|
|
|
#pragma clang assume_nonnull end
|
|
|