ReactOS 0.4.17-dev-923-g4c9a150
debug.c
Go to the documentation of this file.
1/* Debug and Helper Functions
2 *
3 * Copyright (C) 2004 Rok Mandeljc
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20
21#include "dmloader_private.h"
22
23/* figures out whether given FOURCC is valid DirectMusic form ID */
25 if ((chunkID == DMUS_FOURCC_AUDIOPATH_FORM) || (chunkID == DMUS_FOURCC_BAND_FORM) || (chunkID == DMUS_FOURCC_CHORDMAP_FORM)
26 || (chunkID == DMUS_FOURCC_CONTAINER_FORM) || (chunkID == FOURCC_DLS) || (chunkID == DMUS_FOURCC_SCRIPT_FORM)
27 || (chunkID == DMUS_FOURCC_SEGMENT_FORM) || (chunkID == DMUS_FOURCC_STYLE_FORM) || (chunkID == DMUS_FOURCC_TOOLGRAPH_FORM)
28 || (chunkID == DMUS_FOURCC_TRACK_FORM) || (chunkID == mmioFOURCC('W','A','V','E'))) return TRUE;
29 else return FALSE;
30}
31
32/* translate STREAM_SEEK flag to string */
34 switch (flag) {
35 case STREAM_SEEK_SET:
36 return wine_dbg_sprintf ("STREAM_SEEK_SET");
37 case STREAM_SEEK_CUR:
38 return wine_dbg_sprintf ("STREAM_SEEK_CUR");
39 case STREAM_SEEK_END:
40 return wine_dbg_sprintf ("STREAM_SEEK_END");
41 default:
42 return wine_dbg_sprintf ("()");
43 }
44}
45
47 if (pHeader) {
48 char buffer[1024], *ptr = buffer;
49
50 ptr += sprintf(ptr, "DMUS_IO_CONTAINER_HEADER (%p):", pHeader);
51 ptr += sprintf(ptr, "\n - dwFlags = %#lx%s", pHeader->dwFlags,
52 pHeader->dwFlags & DMUS_CONTAINER_NOLOADS ? " (DMUS_CONTAINER_NOLOADS)" : "");
53
54 return wine_dbg_sprintf("%s", buffer);
55 } else {
56 return wine_dbg_sprintf("(NULL)");
57 }
58}
59
61 if (pHeader) {
62 char buffer[1024], *ptr = buffer;
63
64 ptr += sprintf(ptr, "DMUS_IO_CONTAINED_OBJECT_HEADER (%p):", pHeader);
65 ptr += sprintf(ptr, "\n - guidClassID = %s", debugstr_dmguid(&pHeader->guidClassID));
66 ptr += sprintf(ptr, "\n - dwFlags = %#lx%s", pHeader->dwFlags,
67 pHeader->dwFlags & DMUS_CONTAINED_OBJF_KEEP ? " (DMUS_CONTAINED_OBJF_KEEP)" : "");
68 ptr += sprintf(ptr, "\n - ckid = %s", debugstr_fourcc (pHeader->ckid));
69 ptr += sprintf(ptr, "\n - fccType = %s", debugstr_fourcc (pHeader->fccType));
70
71 return wine_dbg_sprintf("%s", buffer);
72 } else {
73 return wine_dbg_sprintf("(NULL)");
74 }
75}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL IS_VALID_DMFORM(FOURCC chunkID)
Definition: debug.c:24
const char * debugstr_DMUS_IO_CONTAINER_HEADER(LPDMUS_IO_CONTAINER_HEADER pHeader)
Definition: debug.c:46
const char * resolve_STREAM_SEEK(DWORD flag)
Definition: debug.c:33
const char * debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER(LPDMUS_IO_CONTAINED_OBJECT_HEADER pHeader)
Definition: debug.c:60
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
#define FOURCC_DLS
Definition: dls1.h:33
DWORD FOURCC
Definition: dmdls.h:25
const char * debugstr_dmguid(const GUID *id)
Definition: dmobject.c:36
#define DMUS_FOURCC_BAND_FORM
Definition: dmusicf.h:63
#define DMUS_FOURCC_TRACK_FORM
Definition: dmusicf.h:141
#define DMUS_FOURCC_SEGMENT_FORM
Definition: dmusicf.h:114
#define DMUS_FOURCC_AUDIOPATH_FORM
Definition: dmusicf.h:53
#define DMUS_FOURCC_CHORDMAP_FORM
Definition: dmusicf.h:68
#define DMUS_CONTAINER_NOLOADS
Definition: dmusicf.h:235
#define DMUS_FOURCC_SCRIPT_FORM
Definition: dmusicf.h:108
#define DMUS_FOURCC_TOOLGRAPH_FORM
Definition: dmusicf.h:138
#define DMUS_FOURCC_CONTAINER_FORM
Definition: dmusicf.h:85
#define DMUS_FOURCC_STYLE_FORM
Definition: dmusicf.h:118
#define DMUS_CONTAINED_OBJF_KEEP
Definition: dmusicf.h:233
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint buffer
Definition: glext.h:5915
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
FxContextHeader * pHeader
Definition: handleapi.cpp:604
#define mmioFOURCC(c0, c1, c2, c3)
Definition: mmsystem.h:38
static PVOID ptr
Definition: dispmode.c:27
#define sprintf
Definition: sprintf.c:45
static __inline const char * debugstr_fourcc(unsigned int cc)
Definition: debug.h:397