Mercurial > audlegacy-plugins
comparison src/alsa-ng/alsa-debug.h @ 3162:e387614b9be9
alsa-ng: Import rewritten ALSA plugin. This is still woefully incomplete, but supports basic playback.
This driver uses the "safe" ALSA API subset, including use of blocking I/O.
Right now, it is hardcoded to use "default".
Do not complain about bugs in this plugin.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 14 May 2009 21:05:11 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3161:6dd886b5c72b | 3162:e387614b9be9 |
---|---|
1 /* | |
2 * Copyright (C) 2005 Ralf Ertzinger | |
3 * | |
4 * This program is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program; if not, write to the Free Software | |
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
17 */ | |
18 #ifndef DEBUG_H | |
19 #define DEBUG_H | |
20 | |
21 #include <stdio.h> | |
22 | |
23 #define _ENTER _DEBUG("enter") | |
24 #define _LEAVE _DEBUG("leave"); return | |
25 #define _MESSAGE(tag, string, ...) do { fprintf(stderr, "%s: ALSA: %s:%d (%s): " string "\n", \ | |
26 tag, __FILE__, __LINE__, __func__, ##__VA_ARGS__); } while(0) | |
27 | |
28 #define _ERROR(...) _MESSAGE("ERROR", __VA_ARGS__) | |
29 | |
30 #ifdef ALSA_DEBUG | |
31 #define _DEBUG(...) _MESSAGE("DEBUG", __VA_ARGS__) | |
32 #else | |
33 #define _DEBUG(...) {} | |
34 #endif | |
35 | |
36 #endif |