1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.4.2_16) on Mon Mar 09 18:20:29 CET 2009 -->
\r
7 JavaClipAudioPlayer (FreeTTS 1.2)
\r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.audio.JavaClipAudioPlayer class">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 parent.document.title="JavaClipAudioPlayer (FreeTTS 1.2)";
\r
23 <BODY BGCOLOR="white" onload="windowTitle();">
\r
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
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> </TD>
\r
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
45 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
51 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
52 PREV CLASS
\r
53 <A HREF="../../../../../com/sun/speech/freetts/audio/JavaStreamingAudioPlayer.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>
\r
56 <A HREF="JavaClipAudioPlayer.html" target="_top"><B>NO FRAMES</B></A>
\r
57 <SCRIPT type="text/javascript">
\r
60 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
65 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
71 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
72 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
74 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
77 <A NAME="skip-navbar_top"></A>
78 <!-- ========= END OF TOP NAVBAR ========= -->
\r
81 <!-- ======== START OF CLASS DATA ======== -->
\r
84 com.sun.speech.freetts.audio</FONT>
\r
86 Class JavaClipAudioPlayer</H2>
\r
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.freetts.audio.JavaClipAudioPlayer</B>
\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
96 <DT>public class <B>JavaClipAudioPlayer</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
99 Provides an implementation of <code>AudioPlayer</code> that creates
100 javax.sound.sampled audio clips and outputs them via the
101 javax.sound API. The interface provides a highly reliable audio
102 output package. Since audio is batched and not sent to the audio
103 layer until an entire utterance has been processed, this player has
104 higher latency (50 msecs for a typical 4 second utterance).
\r
111 <!-- ======== NESTED CLASS SUMMARY ======== -->
\r
114 <!-- =========== FIELD SUMMARY =========== -->
\r
117 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
119 <A NAME="constructor_summary"><!-- --></A>
120 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
121 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
122 <TD COLSPAN=2><FONT SIZE="+2">
\r
123 <B>Constructor Summary</B></FONT></TD>
\r
125 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
126 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#JavaClipAudioPlayer()">JavaClipAudioPlayer</A></B>()</CODE>
\r
129 Constructs a default JavaClipAudioPlayer</TD>
\r
133 <!-- ========== METHOD SUMMARY =========== -->
\r
135 <A NAME="method_summary"><!-- --></A>
136 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
137 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
138 <TD COLSPAN=2><FONT SIZE="+2">
\r
139 <B>Method Summary</B></FONT></TD>
\r
141 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
142 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
143 <CODE> void</CODE></FONT></TD>
\r
144 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#begin(int)">begin</A></B>(int size)</CODE>
\r
147 Starts the output of a set of data. </TD>
\r
149 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
150 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
151 <CODE> void</CODE></FONT></TD>
\r
152 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#cancel()">cancel</A></B>()</CODE>
\r
155 Cancels all queued audio. </TD>
\r
157 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
158 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
159 <CODE> void</CODE></FONT></TD>
\r
160 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#close()">close</A></B>()</CODE>
\r
163 Closes this audio player
166 The javax.sound.sampled drain is almost working properly. </TD>
\r
168 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
169 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
170 <CODE> boolean</CODE></FONT></TD>
\r
171 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#drain()">drain</A></B>()</CODE>
\r
174 Waits for all queued audio to be played</TD>
\r
176 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
177 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
178 <CODE> boolean</CODE></FONT></TD>
\r
179 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#end()">end</A></B>()</CODE>
\r
182 Marks the end a set of data. </TD>
\r
184 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
185 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
186 <CODE> javax.sound.sampled.AudioFormat</CODE></FONT></TD>
\r
187 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#getAudioFormat()">getAudioFormat</A></B>()</CODE>
\r
190 Retrieves the audio format for this player</TD>
\r
192 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
193 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
194 <CODE> long</CODE></FONT></TD>
\r
195 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#getTime()">getTime</A></B>()</CODE>
\r
198 Returns the current position in the output stream since the
199 last <code>resetTime</code>
201 Currently not supported.</TD>
\r
203 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
205 <CODE> float</CODE></FONT></TD>
\r
206 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#getVolume()">getVolume</A></B>()</CODE>
\r
209 Returns the current volume.</TD>
\r
211 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
213 <CODE> void</CODE></FONT></TD>
\r
214 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#pause()">pause</A></B>()</CODE>
\r
217 Pauses audio output. </TD>
\r
219 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
221 <CODE> void</CODE></FONT></TD>
\r
222 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#reset()">reset</A></B>()</CODE>
\r
225 Prepares for another batch of output. </TD>
\r
227 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
229 <CODE> void</CODE></FONT></TD>
\r
230 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#resetTime()">resetTime</A></B>()</CODE>
\r
233 Resets the time for this audio stream to zero</TD>
\r
235 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
237 <CODE> void</CODE></FONT></TD>
\r
238 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#resume()">resume</A></B>()</CODE>
\r
241 Resumes playing audio after a pause.</TD>
\r
243 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
244 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
245 <CODE> void</CODE></FONT></TD>
\r
246 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#setAudioFormat(javax.sound.sampled.AudioFormat)">setAudioFormat</A></B>(javax.sound.sampled.AudioFormat format)</CODE>
\r
249 Sets the audio format for this player</TD>
\r
251 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
253 <CODE> void</CODE></FONT></TD>
\r
254 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#setVolume(float)">setVolume</A></B>(float volume)</CODE>
\r
257 Sets the current volume.</TD>
\r
259 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
261 <CODE> void</CODE></FONT></TD>
\r
262 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#showMetrics()">showMetrics</A></B>()</CODE>
\r
265 Shows metrics for this audio player</TD>
\r
267 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
268 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
269 <CODE> void</CODE></FONT></TD>
\r
270 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#startFirstSampleTimer()">startFirstSampleTimer</A></B>()</CODE>
\r
273 Starts the first sample timer</TD>
\r
275 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
276 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
277 <CODE> java.lang.String</CODE></FONT></TD>
\r
278 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#toString()">toString</A></B>()</CODE>
\r
281 Returns the name of this audio player</TD>
\r
283 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
284 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
285 <CODE> boolean</CODE></FONT></TD>
\r
286 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#write(byte[])">write</A></B>(byte[] audioData)</CODE>
\r
289 Writes the given bytes to the audio stream</TD>
\r
291 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
292 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
293 <CODE> boolean</CODE></FONT></TD>
\r
294 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/JavaClipAudioPlayer.html#write(byte[], int, int)">write</A></B>(byte[] bytes,
296 int size)</CODE>
\r
299 Writes the given bytes to the audio stream</TD>
\r
302 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
303 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
304 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
305 <TD><B>Methods inherited from class java.lang.Object</B></TD>
\r
307 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
308 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
\r
314 <!-- ============ FIELD DETAIL =========== -->
\r
317 <!-- ========= CONSTRUCTOR DETAIL ======== -->
\r
319 <A NAME="constructor_detail"><!-- --></A>
320 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
321 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
322 <TD COLSPAN=1><FONT SIZE="+2">
\r
323 <B>Constructor Detail</B></FONT></TD>
\r
327 <A NAME="JavaClipAudioPlayer()"><!-- --></A><H3>
\r
328 JavaClipAudioPlayer</H3>
\r
330 public <B>JavaClipAudioPlayer</B>()</PRE>
\r
332 <DD>Constructs a default JavaClipAudioPlayer
\r
336 <!-- ============ METHOD DETAIL ========== -->
\r
338 <A NAME="method_detail"><!-- --></A>
339 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
340 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
341 <TD COLSPAN=1><FONT SIZE="+2">
\r
342 <B>Method Detail</B></FONT></TD>
\r
346 <A NAME="setAudioFormat(javax.sound.sampled.AudioFormat)"><!-- --></A><H3>
\r
347 setAudioFormat</H3>
\r
349 public void <B>setAudioFormat</B>(javax.sound.sampled.AudioFormat format)</PRE>
\r
351 <DD>Sets the audio format for this player
\r
354 <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
357 <DT><B>Parameters:</B><DD><CODE>format</CODE> - the audio format
359 <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the line cannot be opened with
360 the given format</DL>
\r
365 <A NAME="getAudioFormat()"><!-- --></A><H3>
\r
366 getAudioFormat</H3>
\r
368 public javax.sound.sampled.AudioFormat <B>getAudioFormat</B>()</PRE>
\r
370 <DD>Retrieves the audio format for this player
\r
373 <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
377 <DT><B>Returns:</B><DD>format the audio format</DL>
\r
382 <A NAME="pause()"><!-- --></A><H3>
\r
385 public void <B>pause</B>()</PRE>
\r
387 <DD>Pauses audio output. All audio output is
388 stopped. Output can be resumed at the
389 current point by calling <code>resume</code>. Output can be
390 aborted by calling <code> cancel </code>
\r
393 <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
401 <A NAME="resume()"><!-- --></A><H3>
\r
404 public void <B>resume</B>()</PRE>
\r
406 <DD>Resumes playing audio after a pause.
\r
409 <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
417 <A NAME="cancel()"><!-- --></A><H3>
\r
420 public void <B>cancel</B>()</PRE>
\r
422 <DD>Cancels all queued audio. Any 'write' in process will return
426 <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
434 <A NAME="reset()"><!-- --></A><H3>
\r
437 public void <B>reset</B>()</PRE>
\r
439 <DD>Prepares for another batch of output. Larger groups of output
440 (such as all output associated with a single FreeTTSSpeakable)
441 should be grouped between a reset/drain pair.
\r
444 <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
452 <A NAME="drain()"><!-- --></A><H3>
\r
455 public boolean <B>drain</B>()</PRE>
\r
457 <DD>Waits for all queued audio to be played
\r
460 <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
464 <DT><B>Returns:</B><DD><code>true</code> if the write completed successfully,
465 <code> false </code>if the write was cancelled.</DL>
\r
470 <A NAME="close()"><!-- --></A><H3>
\r
473 public void <B>close</B>()</PRE>
\r
475 <DD>Closes this audio player
478 The javax.sound.sampled drain is almost working properly. On
479 linux, there is still a little bit of sound that needs to go
480 out, even after drain is called. Thus, the drainDelay. We
481 wait for a few hundred milliseconds while the data is really
482 drained out of the system
486 <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
494 <A NAME="getVolume()"><!-- --></A><H3>
\r
497 public float <B>getVolume</B>()</PRE>
\r
499 <DD>Returns the current volume.
\r
502 <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
506 <DT><B>Returns:</B><DD>the current volume (between 0 and 1)</DL>
\r
511 <A NAME="setVolume(float)"><!-- --></A><H3>
\r
514 public void <B>setVolume</B>(float volume)</PRE>
\r
516 <DD>Sets the current volume.
\r
519 <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
522 <DT><B>Parameters:</B><DD><CODE>volume</CODE> - the current volume (between 0 and 1)</DL>
\r
527 <A NAME="getTime()"><!-- --></A><H3>
\r
530 public long <B>getTime</B>()</PRE>
\r
532 <DD>Returns the current position in the output stream since the
533 last <code>resetTime</code>
535 Currently not supported.
\r
538 <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
542 <DT><B>Returns:</B><DD>the position in the audio stream in milliseconds</DL>
\r
547 <A NAME="resetTime()"><!-- --></A><H3>
\r
550 public void <B>resetTime</B>()</PRE>
\r
552 <DD>Resets the time for this audio stream to zero
\r
555 <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
563 <A NAME="begin(int)"><!-- --></A><H3>
\r
566 public void <B>begin</B>(int size)</PRE>
\r
568 <DD>Starts the output of a set of data. Audio data for a single
569 utterance should be grouped between begin/end pairs.
\r
572 <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
575 <DT><B>Parameters:</B><DD><CODE>size</CODE> - the size of data between now and the end</DL>
\r
580 <A NAME="end()"><!-- --></A><H3>
\r
583 public boolean <B>end</B>()</PRE>
\r
585 <DD>Marks the end a set of data. Audio data for a single utterance should be
586 grouped between begin/end pairs.
\r
589 <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
593 <DT><B>Returns:</B><DD><code>true</code> if the audio was output properly,
594 <code>false </code> if the output was canceled or interrupted.</DL>
\r
599 <A NAME="write(byte[])"><!-- --></A><H3>
\r
602 public boolean <B>write</B>(byte[] audioData)</PRE>
\r
604 <DD>Writes the given bytes to the audio stream
\r
607 <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
610 <DT><B>Parameters:</B><DD><CODE>audioData</CODE> - audio data to write to the device
611 <DT><B>Returns:</B><DD><code>true</code> if the write completed successfully,
612 <code> false </code>if the write was cancelled.</DL>
\r
617 <A NAME="write(byte[], int, int)"><!-- --></A><H3>
\r
620 public boolean <B>write</B>(byte[] bytes,
622 int size)</PRE>
\r
624 <DD>Writes the given bytes to the audio stream
\r
627 <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
630 <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
631 <DT><B>Returns:</B><DD><code>true</code> if the write completed successfully,
632 <code> false </code>if the write was canceled.</DL>
\r
637 <A NAME="toString()"><!-- --></A><H3>
\r
640 public java.lang.String <B>toString</B>()</PRE>
\r
642 <DD>Returns the name of this audio player
\r
649 <DT><B>Returns:</B><DD>the name of the audio player</DL>
\r
654 <A NAME="showMetrics()"><!-- --></A><H3>
\r
657 public void <B>showMetrics</B>()</PRE>
\r
659 <DD>Shows metrics for this audio player
\r
662 <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
670 <A NAME="startFirstSampleTimer()"><!-- --></A><H3>
\r
671 startFirstSampleTimer</H3>
\r
673 public void <B>startFirstSampleTimer</B>()</PRE>
\r
675 <DD>Starts the first sample timer
\r
678 <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
684 <!-- ========= END OF CLASS DATA ========= -->
\r
688 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
689 <A NAME="navbar_bottom"><!-- --></A>
690 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
691 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
693 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
694 <A NAME="navbar_bottom_firstrow"><!-- --></A>
695 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
696 <TR ALIGN="center" VALIGN="top">
\r
697 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
698 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
699 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
700 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
701 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
702 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
703 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
707 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
713 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
714 PREV CLASS
\r
715 <A HREF="../../../../../com/sun/speech/freetts/audio/JavaStreamingAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>NEXT CLASS</B></A></FONT></TD>
\r
716 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
717 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
718 <A HREF="JavaClipAudioPlayer.html" target="_top"><B>NO FRAMES</B></A>
\r
719 <SCRIPT type="text/javascript">
\r
722 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
727 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
733 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
734 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
735 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
736 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
739 <A NAME="skip-navbar_bottom"></A>
740 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r