forked from LemonHaze420/DCMoHo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbpamsetup.cpp
More file actions
69 lines (59 loc) · 2.21 KB
/
Copy pathbpamsetup.cpp
File metadata and controls
69 lines (59 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//-----------------------------------------------------------------------------
//
// FILE: bpamsetup.c
//
// DESC: Boilerplate for Audio64 AM layer initialization.
//
// HISTORY: 2000.01.xx Reworked samples/boilerplates for R10 release.
//
//-----------------------------------------------------------------------------
// COPYRIGHT (C) SEGA OF AMERICA DREAMCAST, INC. 1998, 1999, 2000
// All rights reserved.
//
// Information and source code samples contained herein are provided "as-is",
// without representations or warranties, and are subject to change without
// notice.
//
// SEGA OF AMERICA DREAMCAST, INC. cannot support modifications or derivative
// works created from the sample source code provided. Developers may use,
// reproduce, and modify portions or entire sections of the sample source
// code for the purposes of creating Dreamcast applications.
//
// Sample source code contained herein may not be appropriate for use under
// all circumstances. Please consult Developer documentation provided along
// with your Dreamcast unit for additional information and suggestions.
//-----------------------------------------------------------------------------
#include "bpacsetup.h"
#include "bpamsetup.h"
//--------------------------------------------------------------------------
AM_ERROR *bpAmError = KTNULL;
//--------------------------------------------------------------------------
// Setup the AM system
//--------------------------------------------------------------------------
KTBOOL bpAmSetup(AC_DRIVER_TYPE driverType, KTBOOL usePolling,
AC_CALLBACK_HANDLER theCallback)
{
// Initialize the AC layer
if (!bpAcSetup(driverType, usePolling, theCallback))
{
// check acErrorGetLast() and/or amErrorGetLast()
return (KTFALSE);
}
// Get error message pointers
bpAmError = amErrorGetLast();
// Initialize the AM layer
if (!amInit())
{
// check acErrorGetLast() and/or amErrorGetLast()
return (KTFALSE);
}
return (KTTRUE);
}
//--------------------------------------------------------------------------
// Shutdown the AM system
//--------------------------------------------------------------------------
void bpAmShutdown(void)
{
// internally amShutdown() calls acSystemShutdown()
amShutdown();
}