4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1993-2001 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #pragma ident "%Z%%M% %I% %E% SMI"
29 // XXX - all this either goes away or gets repackaged
34 #include <AudioDebug.h>
36 // Global debugging level variable
55 // Default error printing routine
58 const Audio
* cp
, // object pointer
59 AudioError code
, // error code
60 AudioSeverity sev
, // error severity
61 char *str
) // additional message string
71 case InitMessage
: // virtual function table not ready
73 name
= cp
->Audio::GetName();
81 (void) fprintf(stderr
, _MGET_("%d: %s (%s) %s\n"),
82 id
, str
, name
, code
.msg());
85 (void) fprintf(stderr
, _MGET_("Warning: %s: %s %s\n"),
86 name
, code
.msg(), str
);
91 (void) fprintf(stderr
, _MGET_("Error: %s: %s %s\n"),
92 name
, code
.msg(), str
);
97 (void) fprintf(stderr
,
98 _MGET_("Audio Consistency Error: %s: %s %s\n"),
99 name
, str
, code
.msg());
105 (void) fprintf(stderr
,
106 _MGET_("Audio Internal Error: %s: %s %s\n"),
107 name
, str
, code
.msg());
124 if (Audio_debug
>= level
) {
126 vfprintf(stderr
, fmt
, ap
);