Playlist Generator
1.0
|
00001 /* Copyright © 2007 Apple Inc. All Rights Reserved. 00002 00003 Disclaimer: IMPORTANT: This Apple software is supplied to you by 00004 Apple Inc. ("Apple") in consideration of your agreement to the 00005 following terms, and your use, installation, modification or 00006 redistribution of this Apple software constitutes acceptance of these 00007 terms. If you do not agree with these terms, please do not use, 00008 install, modify or redistribute this Apple software. 00009 00010 In consideration of your agreement to abide by the following terms, and 00011 subject to these terms, Apple grants you a personal, non-exclusive 00012 license, under Apple's copyrights in this original Apple software (the 00013 "Apple Software"), to use, reproduce, modify and redistribute the Apple 00014 Software, with or without modifications, in source and/or binary forms; 00015 provided that if you redistribute the Apple Software in its entirety and 00016 without modifications, you must retain this notice and the following 00017 text and disclaimers in all such redistributions of the Apple Software. 00018 Neither the name, trademarks, service marks or logos of Apple Inc. 00019 may be used to endorse or promote products derived from the Apple 00020 Software without specific prior written permission from Apple. Except 00021 as expressly stated in this notice, no other rights or licenses, express 00022 or implied, are granted by Apple herein, including but not limited to 00023 any patent rights that may be infringed by your derivative works or by 00024 other works in which the Apple Software may be incorporated. 00025 00026 The Apple Software is provided by Apple on an "AS IS" basis. APPLE 00027 MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 00028 THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 00029 FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 00030 OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 00031 00032 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 00033 OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00034 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00035 INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 00036 MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 00037 AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 00038 STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 00039 POSSIBILITY OF SUCH DAMAGE. 00040 */ 00041 #if !defined(__CADebugPrintf_h__) 00042 #define __CADebugPrintf_h__ 00043 00044 //============================================================================= 00045 // Includes 00046 //============================================================================= 00047 00048 #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) 00049 #include <CoreAudio/CoreAudioTypes.h> 00050 #else 00051 #include "CoreAudioTypes.h" 00052 #endif 00053 00054 //============================================================================= 00055 // Macros to redirect debugging output to various logging services 00056 //============================================================================= 00057 00058 //#define CoreAudio_UseSysLog 1 00059 //#define CoreAudio_UseSideFile "/CoreAudio-%d.txt" 00060 00061 #if DEBUG || CoreAudio_Debug 00062 00063 #if TARGET_OS_WIN32 00064 #if defined(__cplusplus) 00065 extern "C" 00066 #endif 00067 extern int CAWin32DebugPrintf(char* inFormat, ...); 00068 #define DebugPrintfRtn CAWin32DebugPrintf 00069 #define DebugPrintfFile 00070 #define DebugPrintfLineEnding "\n" 00071 #define DebugPrintfFileComma 00072 #else 00073 #if CoreAudio_UseSysLog 00074 #include <sys/syslog.h> 00075 #define DebugPrintfRtn syslog 00076 #define DebugPrintfFile LOG_NOTICE 00077 #define DebugPrintfLineEnding "" 00078 #define DebugPrintfFileComma DebugPrintfFile, 00079 #elif defined(CoreAudio_UseSideFile) 00080 #include <stdio.h> 00081 #if defined(__cplusplus) 00082 extern "C" 00083 #endif 00084 void OpenDebugPrintfSideFile(); 00085 extern FILE* sDebugPrintfSideFile; 00086 #define DebugPrintfRtn fprintf 00087 #define DebugPrintfFile ((sDebugPrintfSideFile != NULL) ? sDebugPrintfSideFile : stderr) 00088 #define DebugPrintfLineEnding "\n" 00089 #define DebugPrintfFileComma DebugPrintfFile, 00090 #else 00091 #include <stdio.h> 00092 #define DebugPrintfRtn fprintf 00093 #define DebugPrintfFile stderr 00094 #define DebugPrintfLineEnding "\n" 00095 #define DebugPrintfFileComma DebugPrintfFile, 00096 #endif 00097 #endif 00098 00099 #else 00100 #define DebugPrintfRtn 00101 #define DebugPrintfFile 00102 #define DebugPrintfLineEnding 00103 #define DebugPrintfFileComma 00104 #endif 00105 00106 00107 #endif