C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguy_module_sound_openal.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 1992-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 /*********************************************************************
28  **
29  *t DI-Guy API, OpenAL Sound Module
30  **
31  *b Link against: libdiguy_module_sound_openal
32  **
33  **
34  *============================================================================
35  **
36  *b Regarding Ogg Vorbis software used in this library:
37  **
38  ** Copyright (c) 2002, Xiph.org Foundation
39  **
40  ** Redistribution and use in source and binary forms, with or without
41  ** modification, are permitted provided that the following conditions
42  ** are met:
43  **
44  ** - Redistributions of source code must retain the above copyright
45  ** notice, this list of conditions and the following disclaimer.
46  **
47  ** - Redistributions in binary form must reproduce the above copyright
48  ** notice, this list of conditions and the following disclaimer in the
49  ** documentation and/or other materials provided with the distribution.
50  **
51  ** - Neither the name of the Xiph.org Foundation nor the names of its
52  ** contributors may be used to endorse or promote products derived from
53  ** this software without specific prior written permission.
54  **
55  ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
56  ** ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
57  ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
58  ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
59  ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
60  ** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
61  ** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
62  ** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
63  ** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
64  ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
65  ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66  **
67  *============================================================================
68  **
69  */
70 
71 #ifndef __diguy_module_sound_openal_H
72 #define __diguy_module_sound_openal_H
73 
74 #include <declspec_diguy.h>
75 
76 extern "C" {
77 
78 /*
79  * The definition of this struct is in bdiSoundInitOpenAL.h
80  */
81 struct bdiSoundInitOpenAL;
82 
83 /*****************************************************************************
84  **
85  *2 Functions
86  **
87  */
88 
89 /*l
90  *b Description:
91  **
92  ** This function tells DI-Guy that it should use the OpenAL API for
93  ** playing back sounds.
94  **
95  ** This function must be called before a scenario is created.
96  **
97  ** This function must be called after the main DI-Guy initialize call
98  ** (e.g., diguy_ogl_initialize()).
99  **
100  *b Returns:
101  **
102  ** 0 on success, -1 on failure
103  **
104  *b Example:
105  **
106  *e bdiSoundInitOpenAL init;
107  *e
108  *e diguy_ogl_initialize(NULL);
109  *e diguy_script_perl_initialize();
110  *e diguy_sound_openal_get_defaults(&init);
111  *e diguy_sound_openal_initialize(&init);
112  *e
113  *e diguyScenario* scenario = diguy_create_scenario();
114  */
115 BDI_DECLSPEC_diguy
117 
118 /*l
119  *b Description:
120  **
121  ** Fills out the init structure with default values. Selected entries can
122  ** then be changed before calling diguy_ogl_initialize().
123  **
124  *b Arguments:
125  **
126  *a init - pointer to type bdiGraphicsInitOgl
127  **
128  *b Returns:
129  **
130  ** 0 on success, -1 on failure
131  */
132 BDI_DECLSPEC_diguy
134 
135 /*l
136  *b Description:
137  **
138  ** This function tells DI-Guy to shut down the OpenAL DirectSound API for
139  ** playing back sounds.
140  **
141  *b Returns:
142  **
143  ** 0 on success, -1 on failure
144  **
145  */
146 BDI_DECLSPEC_diguy
148 
149 
150 } /* end extern "C" */
151 
152 
153 #endif /* __diguy_module_sound_openal_H */
154