source: golgotha/src/i4/sound/dsound/ds_error.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 2.8 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifdef DEBUG
10#include "file/file.hh"
11
12static int i4_dsound_check(HRESULT err)
13//{{{
14{
15  if (err==DS_OK) return 1;
16 
17  i4_debug->printf("Direct Sound:");
18  switch (err)
19  {
20    case DSERR_ALLOCATED:
21      i4_warning(" The call failed because resources (such as a priority level)");
22      i4_warning(" were already being used by another caller.");
23      break;
24
25    case DSERR_CONTROLUNAVAIL:
26      i4_warning(" The control (vol,pan,etc.) requested by the caller is not available.");
27      break;
28
29    case DSERR_INVALIDPARAM:
30      i4_warning(" An invalid parameter was passed to the returning function");
31      break;
32
33    case DSERR_INVALIDCALL:
34      i4_warning(" This call is not valid for the current state of this object");
35      break;
36
37    case DSERR_GENERIC:
38      i4_warning(" An undetermined error occured inside the DirectSound subsystem");
39      break;
40
41    case DSERR_PRIOLEVELNEEDED:
42      i4_warning(" The caller does not have the priority level required for the function to");
43      i4_warning(" succeed.");
44      break;
45
46    case DSERR_OUTOFMEMORY:
47      i4_warning(" Not enough free memory is available to complete the operation");
48      break;
49
50    case DSERR_BADFORMAT:
51      i4_warning(" The specified WAVE format is not supported");
52      break;
53
54    case DSERR_UNSUPPORTED:
55      i4_warning(" The function called is not supported at this time");
56      break;
57
58    case DSERR_NODRIVER:
59      i4_warning(" No sound driver is available for use");
60      break;
61
62    case DSERR_ALREADYINITIALIZED:
63      i4_warning(" This object is already initialized");
64      break;
65
66    case DSERR_NOAGGREGATION:
67      i4_warning(" This object does not support aggregation");
68      break;
69
70    case DSERR_BUFFERLOST:
71      i4_warning(" The buffer memory has been lost, and must be restored.");
72      break;
73
74    case DSERR_OTHERAPPHASPRIO:
75      i4_warning(" Another app has a higher priority level, preventing this call from");
76      i4_warning(" succeeding.");
77      break;
78
79    case DSERR_UNINITIALIZED:
80      i4_warning(" This object has not been initialized");
81      break;
82
83    case DSERR_NOINTERFACE:
84      i4_warning(" The requested COM interface is not available");
85      break;     
86  }
87  return 0;
88}
89
90#else
91
92#define i4_dsound_check(x) ((x)==DS_OK)?(1):(0)
93
94#endif
Note: See TracBrowser for help on using the repository browser.