C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguySound.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  **
30  *t diguySound
31  **
32  */
33 
34 #ifndef __diguySound_H
35 #define __diguySound_H
36 
37 
38 #ifdef SWIG
39 %module diguySound
40 #else
41 #define CPLUSPLUS_ONLY
42 #endif
43 
44 #ifdef CPLUSPLUS_ONLY
45 class bdiSound;
46 #endif
47 
48 
49 #include <declspec_diguy.h>
50 
51 /****************************************************************************/
63 class BDI_DECLSPEC_diguy diguySound
64 {
65 
66 public:
67 
68  /*l
69  **
70  *b Returns:
71  **
72  ** name of this object
73  */
74  const char* get_name();
75 
76  /*l
77  *b Returns:
78  **
79  ** type name of the object; this value will never be NULL
80  */
81  const char* get_type_name();
82 
83  /*l
84  *b Description:
85  **
86  ** This function sets the name of the file that contains the waveform
87  ** data for the sound. The file should typically be located in the
88  ** $(DIGUY)/sfx or $(DIGUY)/custom/sfx directory.
89  **
90  *b Arguments:
91  **
92  *a sound_filename - name of file containing waveform data
93  **
94  *b Returns:
95  **
96  ** 0 on success, -1 on failure
97  */
98  int set_sound_filename(const char* sound_filename);
99 
100  /*l
101  *b Returns:
102  **
103  ** name of file containing waveform data for sound as set by
104  ** set_sound_filename(); will never be NULL, but may be the empty
105  ** string ""
106  */
107  const char* get_sound_filename();
108 
109  /*l
110  *b Description:
111  **
112  ** This function sets the name of the file that contains the phoneme
113  ** data for the sound. The file should typically be located in the
114  ** same place as its waveform counterpart.
115  **
116  ** Phoneme files are optional.
117  **
118  *b Arguments:
119  **
120  *a phoneme_filename - name of file containing phoneme data
121  **
122  *b Returns:
123  **
124  ** 0 on success, -1 on failure
125  */
126  int set_phoneme_filename(const char* phoneme_filename);
127 
128  /*l
129  *b Returns:
130  **
131  ** name of file containing phoneme data as set
132  ** by set_phoneme_filename()
133  */
134  const char* get_phoneme_filename();
135 
136  /*l
137  *b Returns:
138  **
139  ** the length of the sound in seconds
140  */
141  float get_duration();
142 
143  /*l
144  *b Returns:
145  **
146  ** the number of samples per second
147  */
148  int get_samples_per_second();
149 
150  /*l
151  *b Returns:
152  **
153  ** the number of sound channels either 1 (mono) or 2 (stereo)
154  */
155  int get_number_of_channels();
157  /*l
158  *b Returns:
159  **
160  ** the bit depth of a sound, either 8 or 16
161  */
162  int get_bit_depth();
163 
168 #ifdef CPLUSPLUS_ONLY
169 
170  bdiSound* get_scripted_object() {return m_scripted_object;}
171 
172 private:
173 
174  friend class bdiSound;
176  /*l
177  ** A private constructor.
178  */
179  diguySound(bdiSound* scripted_object);
180 
181  /*l
182  ** A private destructor.
183  */
184  virtual ~diguySound();
185 
186  /*l
187  ** A pointer to internal data.
188  */
189  bdiSound* m_scripted_object;
190 
191 #endif
192 
193 };
194 
195 
196 #endif /* __diguySound_H */
197 
198 
199 /*
200  * Copyright (C) 1992-2013 Boston Dynamics
201  * ALL RIGHTS RESERVED.
202  *
203  * These coded instructions, statements, and computer programs
204  * contain unpublished proprietary information of Boston Dynamics
205  * and are protected by Copyright Laws of the United States.
206  * They may not be used, duplicated, or disclosed in any form, in
207  * whole or in part, without the prior written consent from Boston
208  * Dynamics.
209  *
210  * RESTRICTED RIGHTS LEGEND
211  * Use, duplication, or disclosure by the government is subject
212  * to restrictions as set forth in FAR 52.227.19(c)(2) or
213  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
214  * Computer Software clause at DFARS 252.227-7013 and/or in
215  * similar or successor clauses in the FAR, or the DOD or NASA
216  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
217  * Commercial Computer Software--Restricted Rights at 48 CFR
218  * 52.227-19, as applicable. Unpublished-rights reserved under
219  * the Copyright Laws of the United States.
220  * Contractor/Manufacturer is:
221  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
222  */
223