upstream version 1.2.2
[debian/freetts] / javadoc / com / sun / speech / freetts / audio / NullAudioPlayer.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
2 <!--NewPage-->\r
3 <HTML>\r
4 <HEAD>\r
5 <!-- Generated by javadoc (build 1.4.2_16) on Mon Mar 09 18:20:29 CET 2009 -->\r
6 <TITLE>\r
7 NullAudioPlayer (FreeTTS 1.2)\r
8 </TITLE>\r
9 \r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.audio.NullAudioPlayer class">\r
11 \r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">\r
13 \r
14 <SCRIPT type="text/javascript">\r
15 function windowTitle()\r
16 {\r
17     parent.document.title="NullAudioPlayer (FreeTTS 1.2)";\r
18 }\r
19 </SCRIPT>\r
20 \r
21 </HEAD>\r
22 \r
23 <BODY BGCOLOR="white" onload="windowTitle();">\r
24 \r
25
26 <!-- ========= START OF TOP NAVBAR ======= -->\r
27 <A NAME="navbar_top"><!-- --></A>
28 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">\r
30 <TR>\r
31 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">\r
32 <A NAME="navbar_top_firstrow"><!-- --></A>
33 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">\r
34   <TR ALIGN="center" VALIGN="top">\r
35   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>\r
36   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>\r
37   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>\r
38   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>\r
39   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>\r
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>\r
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>\r
42   </TR>\r
43 </TABLE>\r
44 </TD>\r
45 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>\r
46 </EM>\r
47 </TD>\r
48 </TR>\r
49 \r
50 <TR>\r
51 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
52 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/audio/MultiFileAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>PREV CLASS</B></A>&nbsp;\r
53 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/audio/RawFileAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>NEXT CLASS</B></A></FONT></TD>\r
54 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
55   <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;\r
56 &nbsp;<A HREF="NullAudioPlayer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;\r
57 &nbsp;<SCRIPT type="text/javascript">\r
58   <!--\r
59   if(window==top) {\r
60     document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');\r
61   }\r
62   //-->\r
63 </SCRIPT>\r
64 <NOSCRIPT>\r
65   <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>\r
66 </NOSCRIPT>
67 \r
68 </FONT></TD>\r
69 </TR>\r
70 <TR>\r
71 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
72   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
74 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>\r
75 </TR>\r
76 </TABLE>\r
77 <A NAME="skip-navbar_top"></A>
78 <!-- ========= END OF TOP NAVBAR ========= -->\r
79 \r
80 <HR>\r
81 <!-- ======== START OF CLASS DATA ======== -->\r
82 <H2>\r
83 <FONT SIZE="-1">\r
84 com.sun.speech.freetts.audio</FONT>\r
85 <BR>\r
86 Class NullAudioPlayer</H2>\r
87 <PRE>\r
88 java.lang.Object\r
89   <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.freetts.audio.NullAudioPlayer</B>\r
90 </PRE>\r
91 <DL>\r
92 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></DD>\r
93 </DL>\r
94 <HR>\r
95 <DL>\r
96 <DT>public class <B>NullAudioPlayer</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></DL>\r
97 \r
98 <P>\r
99 Provides an implementation of <code>AudioPlayer</code> that sends
100  all audio data to the bit bucket. The <code>NullAudioPlayer</code>
101  is instrumented to provide timing metrics.\r
102 <P>\r
103 \r
104 <P>\r
105 <HR>\r
106 \r
107 <P>\r
108 <!-- ======== NESTED CLASS SUMMARY ======== -->\r
109 \r
110 \r
111 <!-- =========== FIELD SUMMARY =========== -->\r
112 \r
113 \r
114 <!-- ======== CONSTRUCTOR SUMMARY ======== -->\r
115 \r
116 <A NAME="constructor_summary"><!-- --></A>
117 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
118 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
119 <TD COLSPAN=2><FONT SIZE="+2">\r
120 <B>Constructor Summary</B></FONT></TD>\r
121 </TR>\r
122 <TR BGCOLOR="white" CLASS="TableRowColor">\r
123 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#NullAudioPlayer()">NullAudioPlayer</A></B>()</CODE>\r
124 \r
125 <BR>\r
126 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a NullAudioPlayer</TD>\r
127 </TR>\r
128 </TABLE>\r
129 &nbsp;\r
130 <!-- ========== METHOD SUMMARY =========== -->\r
131 \r
132 <A NAME="method_summary"><!-- --></A>
133 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
134 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
135 <TD COLSPAN=2><FONT SIZE="+2">\r
136 <B>Method Summary</B></FONT></TD>\r
137 </TR>\r
138 <TR BGCOLOR="white" CLASS="TableRowColor">\r
139 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
140 <CODE>&nbsp;void</CODE></FONT></TD>\r
141 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#begin(int)">begin</A></B>(int&nbsp;size)</CODE>\r
142 \r
143 <BR>\r
144 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the output of a set of data</TD>\r
145 </TR>\r
146 <TR BGCOLOR="white" CLASS="TableRowColor">\r
147 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
148 <CODE>&nbsp;void</CODE></FONT></TD>\r
149 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#cancel()">cancel</A></B>()</CODE>\r
150 \r
151 <BR>\r
152 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cancels all queued output. </TD>\r
153 </TR>\r
154 <TR BGCOLOR="white" CLASS="TableRowColor">\r
155 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
156 <CODE>&nbsp;void</CODE></FONT></TD>\r
157 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#close()">close</A></B>()</CODE>\r
158 \r
159 <BR>\r
160 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Waits for all audio playback to stop, and closes this AudioPlayer.</TD>\r
161 </TR>\r
162 <TR BGCOLOR="white" CLASS="TableRowColor">\r
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
164 <CODE>&nbsp;boolean</CODE></FONT></TD>\r
165 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#drain()">drain</A></B>()</CODE>\r
166 \r
167 <BR>\r
168 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Waits for all queued audio to be played</TD>\r
169 </TR>\r
170 <TR BGCOLOR="white" CLASS="TableRowColor">\r
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
172 <CODE>&nbsp;boolean</CODE></FONT></TD>\r
173 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#end()">end</A></B>()</CODE>\r
174 \r
175 <BR>\r
176 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marks the end of a set of data</TD>\r
177 </TR>\r
178 <TR BGCOLOR="white" CLASS="TableRowColor">\r
179 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
180 <CODE>&nbsp;javax.sound.sampled.AudioFormat</CODE></FONT></TD>\r
181 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#getAudioFormat()">getAudioFormat</A></B>()</CODE>\r
182 \r
183 <BR>\r
184 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the audio format for this player</TD>\r
185 </TR>\r
186 <TR BGCOLOR="white" CLASS="TableRowColor">\r
187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
188 <CODE>&nbsp;long</CODE></FONT></TD>\r
189 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#getTime()">getTime</A></B>()</CODE>\r
190 \r
191 <BR>\r
192 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the amount of played since the last resetTime
193  Currently not supported.</TD>\r
194 </TR>\r
195 <TR BGCOLOR="white" CLASS="TableRowColor">\r
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
197 <CODE>&nbsp;float</CODE></FONT></TD>\r
198 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#getVolume()">getVolume</A></B>()</CODE>\r
199 \r
200 <BR>\r
201 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current volume.</TD>\r
202 </TR>\r
203 <TR BGCOLOR="white" CLASS="TableRowColor">\r
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
205 <CODE>&nbsp;void</CODE></FONT></TD>\r
206 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#pause()">pause</A></B>()</CODE>\r
207 \r
208 <BR>\r
209 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pauses the audio output</TD>\r
210 </TR>\r
211 <TR BGCOLOR="white" CLASS="TableRowColor">\r
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
213 <CODE>&nbsp;void</CODE></FONT></TD>\r
214 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#reset()">reset</A></B>()</CODE>\r
215 \r
216 <BR>\r
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prepares for another batch of output. </TD>\r
218 </TR>\r
219 <TR BGCOLOR="white" CLASS="TableRowColor">\r
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
221 <CODE>&nbsp;void</CODE></FONT></TD>\r
222 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#resetTime()">resetTime</A></B>()</CODE>\r
223 \r
224 <BR>\r
225 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the audio clock</TD>\r
226 </TR>\r
227 <TR BGCOLOR="white" CLASS="TableRowColor">\r
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
229 <CODE>&nbsp;void</CODE></FONT></TD>\r
230 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#resume()">resume</A></B>()</CODE>\r
231 \r
232 <BR>\r
233 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resumes audio output</TD>\r
234 </TR>\r
235 <TR BGCOLOR="white" CLASS="TableRowColor">\r
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
237 <CODE>&nbsp;void</CODE></FONT></TD>\r
238 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#setAudioFormat(javax.sound.sampled.AudioFormat)">setAudioFormat</A></B>(javax.sound.sampled.AudioFormat&nbsp;format)</CODE>\r
239 \r
240 <BR>\r
241 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the audio format for this player</TD>\r
242 </TR>\r
243 <TR BGCOLOR="white" CLASS="TableRowColor">\r
244 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
245 <CODE>&nbsp;void</CODE></FONT></TD>\r
246 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#setVolume(float)">setVolume</A></B>(float&nbsp;volume)</CODE>\r
247 \r
248 <BR>\r
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current volume.</TD>\r
250 </TR>\r
251 <TR BGCOLOR="white" CLASS="TableRowColor">\r
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
253 <CODE>&nbsp;void</CODE></FONT></TD>\r
254 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#showMetrics()">showMetrics</A></B>()</CODE>\r
255 \r
256 <BR>\r
257 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shows metrics for this audio player</TD>\r
258 </TR>\r
259 <TR BGCOLOR="white" CLASS="TableRowColor">\r
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
261 <CODE>&nbsp;void</CODE></FONT></TD>\r
262 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#startFirstSampleTimer()">startFirstSampleTimer</A></B>()</CODE>\r
263 \r
264 <BR>\r
265 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the first sample timer</TD>\r
266 </TR>\r
267 <TR BGCOLOR="white" CLASS="TableRowColor">\r
268 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
269 <CODE>&nbsp;boolean</CODE></FONT></TD>\r
270 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#write(byte[])">write</A></B>(byte[]&nbsp;audioData)</CODE>\r
271 \r
272 <BR>\r
273 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the given bytes to the audio stream</TD>\r
274 </TR>\r
275 <TR BGCOLOR="white" CLASS="TableRowColor">\r
276 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
277 <CODE>&nbsp;boolean</CODE></FONT></TD>\r
278 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/NullAudioPlayer.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;bytes,
279       int&nbsp;offset,
280       int&nbsp;size)</CODE>\r
281 \r
282 <BR>\r
283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the given bytes to the audio stream</TD>\r
284 </TR>\r
285 </TABLE>\r
286 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
287 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
288 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">\r
289 <TD><B>Methods inherited from class java.lang.Object</B></TD>\r
290 </TR>\r
291 <TR BGCOLOR="white" CLASS="TableRowColor">\r
292 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>\r
293 </TR>\r
294 </TABLE>\r
295 &nbsp;\r
296 <P>\r
297 \r
298 <!-- ============ FIELD DETAIL =========== -->\r
299 \r
300 \r
301 <!-- ========= CONSTRUCTOR DETAIL ======== -->\r
302 \r
303 <A NAME="constructor_detail"><!-- --></A>
304 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
305 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
306 <TD COLSPAN=1><FONT SIZE="+2">\r
307 <B>Constructor Detail</B></FONT></TD>\r
308 </TR>\r
309 </TABLE>\r
310 \r
311 <A NAME="NullAudioPlayer()"><!-- --></A><H3>\r
312 NullAudioPlayer</H3>\r
313 <PRE>\r
314 public <B>NullAudioPlayer</B>()</PRE>\r
315 <DL>\r
316 <DD>Constructs a NullAudioPlayer\r
317 <P>\r
318 </DL>\r
319 \r
320 <!-- ============ METHOD DETAIL ========== -->\r
321 \r
322 <A NAME="method_detail"><!-- --></A>
323 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
324 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
325 <TD COLSPAN=1><FONT SIZE="+2">\r
326 <B>Method Detail</B></FONT></TD>\r
327 </TR>\r
328 </TABLE>\r
329 \r
330 <A NAME="setAudioFormat(javax.sound.sampled.AudioFormat)"><!-- --></A><H3>\r
331 setAudioFormat</H3>\r
332 <PRE>\r
333 public void <B>setAudioFormat</B>(javax.sound.sampled.AudioFormat&nbsp;format)</PRE>\r
334 <DL>\r
335 <DD>Sets the audio format for this player\r
336 <P>\r
337 <DD><DL>\r
338 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#setAudioFormat(javax.sound.sampled.AudioFormat)">setAudioFormat</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
339 </DD>\r
340 <DD><DL>\r
341 <DT><B>Parameters:</B><DD><CODE>format</CODE> - the audio format</DL>\r
342 </DD>\r
343 </DL>\r
344 <HR>\r
345 \r
346 <A NAME="getAudioFormat()"><!-- --></A><H3>\r
347 getAudioFormat</H3>\r
348 <PRE>\r
349 public javax.sound.sampled.AudioFormat <B>getAudioFormat</B>()</PRE>\r
350 <DL>\r
351 <DD>Retrieves the audio format for this player\r
352 <P>\r
353 <DD><DL>\r
354 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#getAudioFormat()">getAudioFormat</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
355 </DD>\r
356 <DD><DL>\r
357
358 <DT><B>Returns:</B><DD>the current audio format.</DL>\r
359 </DD>\r
360 </DL>\r
361 <HR>\r
362 \r
363 <A NAME="cancel()"><!-- --></A><H3>\r
364 cancel</H3>\r
365 <PRE>\r
366 public void <B>cancel</B>()</PRE>\r
367 <DL>\r
368 <DD>Cancels all queued output. Current 'write' call will return
369  false\r
370 <P>\r
371 <DD><DL>\r
372 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#cancel()">cancel</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
373 </DD>\r
374 <DD><DL>\r
375 </DL>\r
376 </DD>\r
377 </DL>\r
378 <HR>\r
379 \r
380 <A NAME="pause()"><!-- --></A><H3>\r
381 pause</H3>\r
382 <PRE>\r
383 public void <B>pause</B>()</PRE>\r
384 <DL>\r
385 <DD>Pauses the audio output\r
386 <P>\r
387 <DD><DL>\r
388 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#pause()">pause</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
389 </DD>\r
390 <DD><DL>\r
391 </DL>\r
392 </DD>\r
393 </DL>\r
394 <HR>\r
395 \r
396 <A NAME="reset()"><!-- --></A><H3>\r
397 reset</H3>\r
398 <PRE>\r
399 public void <B>reset</B>()</PRE>\r
400 <DL>\r
401 <DD>Prepares for another batch of output. Larger groups of output
402  (such as all output associated with a single FreeTTSSpeakable)
403  should be grouped between a reset/drain pair.\r
404 <P>\r
405 <DD><DL>\r
406 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#reset()">reset</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
407 </DD>\r
408 <DD><DL>\r
409 </DL>\r
410 </DD>\r
411 </DL>\r
412 <HR>\r
413 \r
414 <A NAME="resume()"><!-- --></A><H3>\r
415 resume</H3>\r
416 <PRE>\r
417 public void <B>resume</B>()</PRE>\r
418 <DL>\r
419 <DD>Resumes audio output\r
420 <P>\r
421 <DD><DL>\r
422 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#resume()">resume</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
423 </DD>\r
424 <DD><DL>\r
425 </DL>\r
426 </DD>\r
427 </DL>\r
428 <HR>\r
429 \r
430 <A NAME="close()"><!-- --></A><H3>\r
431 close</H3>\r
432 <PRE>\r
433 public void <B>close</B>()</PRE>\r
434 <DL>\r
435 <DD>Waits for all audio playback to stop, and closes this AudioPlayer.\r
436 <P>\r
437 <DD><DL>\r
438 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#close()">close</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
439 </DD>\r
440 <DD><DL>\r
441 </DL>\r
442 </DD>\r
443 </DL>\r
444 <HR>\r
445 \r
446 <A NAME="getVolume()"><!-- --></A><H3>\r
447 getVolume</H3>\r
448 <PRE>\r
449 public float <B>getVolume</B>()</PRE>\r
450 <DL>\r
451 <DD>Returns the current volume.\r
452 <P>\r
453 <DD><DL>\r
454 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#getVolume()">getVolume</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
455 </DD>\r
456 <DD><DL>\r
457
458 <DT><B>Returns:</B><DD>the current volume (between 0 and 1)</DL>\r
459 </DD>\r
460 </DL>\r
461 <HR>\r
462 \r
463 <A NAME="setVolume(float)"><!-- --></A><H3>\r
464 setVolume</H3>\r
465 <PRE>\r
466 public void <B>setVolume</B>(float&nbsp;volume)</PRE>\r
467 <DL>\r
468 <DD>Sets the current volume.\r
469 <P>\r
470 <DD><DL>\r
471 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#setVolume(float)">setVolume</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
472 </DD>\r
473 <DD><DL>\r
474 <DT><B>Parameters:</B><DD><CODE>volume</CODE> - the current volume (between 0 and 1)</DL>\r
475 </DD>\r
476 </DL>\r
477 <HR>\r
478 \r
479 <A NAME="write(byte[])"><!-- --></A><H3>\r
480 write</H3>\r
481 <PRE>\r
482 public boolean <B>write</B>(byte[]&nbsp;audioData)</PRE>\r
483 <DL>\r
484 <DD>Writes the given bytes to the audio stream\r
485 <P>\r
486 <DD><DL>\r
487 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#write(byte[])">write</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
488 </DD>\r
489 <DD><DL>\r
490 <DT><B>Parameters:</B><DD><CODE>audioData</CODE> - array of audio data
491 <DT><B>Returns:</B><DD><code>true</code> of the write completed successfully, 
492         <code> false </code>if the write was cancelled.</DL>\r
493 </DD>\r
494 </DL>\r
495 <HR>\r
496 \r
497 <A NAME="begin(int)"><!-- --></A><H3>\r
498 begin</H3>\r
499 <PRE>\r
500 public void <B>begin</B>(int&nbsp;size)</PRE>\r
501 <DL>\r
502 <DD>Starts the output of a set of data\r
503 <P>\r
504 <DD><DL>\r
505 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#begin(int)">begin</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
506 </DD>\r
507 <DD><DL>\r
508 <DT><B>Parameters:</B><DD><CODE>size</CODE> - the size of data between now and the end</DL>\r
509 </DD>\r
510 </DL>\r
511 <HR>\r
512 \r
513 <A NAME="end()"><!-- --></A><H3>\r
514 end</H3>\r
515 <PRE>\r
516 public boolean <B>end</B>()</PRE>\r
517 <DL>\r
518 <DD>Marks the end of a set of data\r
519 <P>\r
520 <DD><DL>\r
521 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#end()">end</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
522 </DD>\r
523 <DD><DL>\r
524
525 <DT><B>Returns:</B><DD><code>true</code> if the audio was output properly, 
526                 <code> false</code> if the output was canceled 
527                 or interrupted.</DL>\r
528 </DD>\r
529 </DL>\r
530 <HR>\r
531 \r
532 <A NAME="write(byte[], int, int)"><!-- --></A><H3>\r
533 write</H3>\r
534 <PRE>\r
535 public boolean <B>write</B>(byte[]&nbsp;bytes,
536                      int&nbsp;offset,
537                      int&nbsp;size)</PRE>\r
538 <DL>\r
539 <DD>Writes the given bytes to the audio stream\r
540 <P>\r
541 <DD><DL>\r
542 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#write(byte[], int, int)">write</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
543 </DD>\r
544 <DD><DL>\r
545 <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - audio data to write to the device<DD><CODE>offset</CODE> - the offset into the buffer<DD><CODE>size</CODE> - the size into the buffer
546 <DT><B>Returns:</B><DD><code>true</code> of the write completed successfully, 
547         <code> false </code>if the write was cancelled.</DL>\r
548 </DD>\r
549 </DL>\r
550 <HR>\r
551 \r
552 <A NAME="startFirstSampleTimer()"><!-- --></A><H3>\r
553 startFirstSampleTimer</H3>\r
554 <PRE>\r
555 public void <B>startFirstSampleTimer</B>()</PRE>\r
556 <DL>\r
557 <DD>Starts the first sample timer\r
558 <P>\r
559 <DD><DL>\r
560 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#startFirstSampleTimer()">startFirstSampleTimer</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
561 </DD>\r
562 <DD><DL>\r
563 </DL>\r
564 </DD>\r
565 </DL>\r
566 <HR>\r
567 \r
568 <A NAME="drain()"><!-- --></A><H3>\r
569 drain</H3>\r
570 <PRE>\r
571 public boolean <B>drain</B>()</PRE>\r
572 <DL>\r
573 <DD>Waits for all queued audio to be played\r
574 <P>\r
575 <DD><DL>\r
576 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#drain()">drain</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
577 </DD>\r
578 <DD><DL>\r
579
580 <DT><B>Returns:</B><DD><code>true</code> if the audio played to completion,
581         <code> false </code>if the audio was stopped</DL>\r
582 </DD>\r
583 </DL>\r
584 <HR>\r
585 \r
586 <A NAME="getTime()"><!-- --></A><H3>\r
587 getTime</H3>\r
588 <PRE>\r
589 public long <B>getTime</B>()</PRE>\r
590 <DL>\r
591 <DD>Gets the amount of played since the last resetTime
592  Currently not supported.\r
593 <P>\r
594 <DD><DL>\r
595 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#getTime()">getTime</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
596 </DD>\r
597 <DD><DL>\r
598
599 <DT><B>Returns:</B><DD>the amount of audio in milliseconds</DL>\r
600 </DD>\r
601 </DL>\r
602 <HR>\r
603 \r
604 <A NAME="resetTime()"><!-- --></A><H3>\r
605 resetTime</H3>\r
606 <PRE>\r
607 public void <B>resetTime</B>()</PRE>\r
608 <DL>\r
609 <DD>Resets the audio clock\r
610 <P>\r
611 <DD><DL>\r
612 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#resetTime()">resetTime</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
613 </DD>\r
614 <DD><DL>\r
615 </DL>\r
616 </DD>\r
617 </DL>\r
618 <HR>\r
619 \r
620 <A NAME="showMetrics()"><!-- --></A><H3>\r
621 showMetrics</H3>\r
622 <PRE>\r
623 public void <B>showMetrics</B>()</PRE>\r
624 <DL>\r
625 <DD>Shows metrics for this audio player\r
626 <P>\r
627 <DD><DL>\r
628 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html#showMetrics()">showMetrics</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/audio/AudioPlayer.html" title="interface in com.sun.speech.freetts.audio">AudioPlayer</A></CODE></DL>\r
629 </DD>\r
630 <DD><DL>\r
631 </DL>\r
632 </DD>\r
633 </DL>\r
634 <!-- ========= END OF CLASS DATA ========= -->\r
635 <HR>\r
636 \r
637
638 <!-- ======= START OF BOTTOM NAVBAR ====== -->\r
639 <A NAME="navbar_bottom"><!-- --></A>
640 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
641 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">\r
642 <TR>\r
643 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">\r
644 <A NAME="navbar_bottom_firstrow"><!-- --></A>
645 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">\r
646   <TR ALIGN="center" VALIGN="top">\r
647   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>\r
648   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>\r
649   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>\r
650   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>\r
651   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>\r
652   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>\r
653   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>\r
654   </TR>\r
655 </TABLE>\r
656 </TD>\r
657 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>\r
658 </EM>\r
659 </TD>\r
660 </TR>\r
661 \r
662 <TR>\r
663 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
664 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/audio/MultiFileAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>PREV CLASS</B></A>&nbsp;\r
665 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/audio/RawFileAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>NEXT CLASS</B></A></FONT></TD>\r
666 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
667   <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;\r
668 &nbsp;<A HREF="NullAudioPlayer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;\r
669 &nbsp;<SCRIPT type="text/javascript">\r
670   <!--\r
671   if(window==top) {\r
672     document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');\r
673   }\r
674   //-->\r
675 </SCRIPT>\r
676 <NOSCRIPT>\r
677   <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>\r
678 </NOSCRIPT>
679 \r
680 </FONT></TD>\r
681 </TR>\r
682 <TR>\r
683 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
684   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>\r
685 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
686 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>\r
687 </TR>\r
688 </TABLE>\r
689 <A NAME="skip-navbar_bottom"></A>
690 <!-- ======== END OF BOTTOM NAVBAR ======= -->\r
691 \r
692 <HR>\r
693 \r
694 </BODY>\r
695 </HTML>\r