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 MultiFile8BitAudioPlayer (FreeTTS 1.2)
\r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.audio.MultiFile8BitAudioPlayer 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="MultiFile8BitAudioPlayer (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 <A HREF="../../../../../com/sun/speech/freetts/audio/JavaStreamingAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>PREV CLASS</B></A>
\r
53 <A HREF="../../../../../com/sun/speech/freetts/audio/MultiFileAudioPlayer.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="MultiFile8BitAudioPlayer.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 MultiFile8BitAudioPlayer</H2>
\r
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.freetts.audio.MultiFile8BitAudioPlayer</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>MultiFile8BitAudioPlayer</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 Streams audio to multiple files as 8-bit samples, one per utterance.
100 Currently, FreeTTS always outputs 16-bit samples, and this
101 MultiFile8BitAudioPlayer will convert them to 8-bit before outputting
109 <!-- ======== NESTED CLASS SUMMARY ======== -->
\r
112 <!-- =========== FIELD SUMMARY =========== -->
\r
115 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
117 <A NAME="constructor_summary"><!-- --></A>
118 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
119 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
120 <TD COLSPAN=2><FONT SIZE="+2">
\r
121 <B>Constructor Summary</B></FONT></TD>
\r
123 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
124 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#MultiFile8BitAudioPlayer()">MultiFile8BitAudioPlayer</A></B>()</CODE>
\r
127 Creates a default audio player for an AudioFileFormat of type
130 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
131 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#MultiFile8BitAudioPlayer(java.lang.String, javax.sound.sampled.AudioFileFormat.Type)">MultiFile8BitAudioPlayer</A></B>(java.lang.String baseName,
132 javax.sound.sampled.AudioFileFormat.Type type)</CODE>
\r
135 Constructs a MultiFile8BitAudioPlayer</TD>
\r
139 <!-- ========== METHOD SUMMARY =========== -->
\r
141 <A NAME="method_summary"><!-- --></A>
142 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
143 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
144 <TD COLSPAN=2><FONT SIZE="+2">
\r
145 <B>Method Summary</B></FONT></TD>
\r
147 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
148 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
149 <CODE> void</CODE></FONT></TD>
\r
150 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#begin(int)">begin</A></B>(int size)</CODE>
\r
153 Starts the output of a set of data. </TD>
\r
155 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
156 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
157 <CODE> void</CODE></FONT></TD>
\r
158 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#cancel()">cancel</A></B>()</CODE>
\r
161 Cancels currently playing audio</TD>
\r
163 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
164 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
165 <CODE> void</CODE></FONT></TD>
\r
166 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#close()">close</A></B>()</CODE>
\r
169 Closes this audio player</TD>
\r
171 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
173 <CODE> boolean</CODE></FONT></TD>
\r
174 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#drain()">drain</A></B>()</CODE>
\r
177 Waits for all queued audio to be played</TD>
\r
179 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
181 <CODE> boolean</CODE></FONT></TD>
\r
182 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#end()">end</A></B>()</CODE>
\r
185 Marks the end of a set of data. </TD>
\r
187 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
189 <CODE> javax.sound.sampled.AudioFormat</CODE></FONT></TD>
\r
190 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#getAudioFormat()">getAudioFormat</A></B>()</CODE>
\r
193 Gets the audio format for this player</TD>
\r
195 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
197 <CODE> long</CODE></FONT></TD>
\r
198 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/audio/MultiFile8BitAudioPlayer.html#getTime()">getTime</A></B>()</CODE>
\r
201 Gets the amount of played since the last mark</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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.html#resetTime()">resetTime</A></B>()</CODE>
\r
233 Resets the audio clock</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/MultiFile8BitAudioPlayer.html#resume()">resume</A></B>()</CODE>
\r
241 Resumes audio output</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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.html#toString()">toString</A></B>()</CODE>
\r
281 Returns the name of this audioplayer</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/MultiFile8BitAudioPlayer.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/MultiFile8BitAudioPlayer.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="MultiFile8BitAudioPlayer()"><!-- --></A><H3>
\r
328 MultiFile8BitAudioPlayer</H3>
\r
330 public <B>MultiFile8BitAudioPlayer</B>()</PRE>
\r
332 <DD>Creates a default audio player for an AudioFileFormat of type
333 WAVE. Reads the "com.sun.speech.freetts.AudioPlayer.baseName"
334 property for the base filename to use, and will produce files
335 of the form <baseName>1.wav. The default value for the
336 base name is "freetts".
\r
341 <A NAME="MultiFile8BitAudioPlayer(java.lang.String, javax.sound.sampled.AudioFileFormat.Type)"><!-- --></A><H3>
\r
342 MultiFile8BitAudioPlayer</H3>
\r
344 public <B>MultiFile8BitAudioPlayer</B>(java.lang.String baseName,
345 javax.sound.sampled.AudioFileFormat.Type type)</PRE>
\r
347 <DD>Constructs a MultiFile8BitAudioPlayer
\r
349 <DT><B>Parameters:</B><DD><CODE>baseName</CODE> - the base name of the audio file<DD><CODE>type</CODE> - the type of audio output</DL>
\r
351 <!-- ============ METHOD DETAIL ========== -->
\r
353 <A NAME="method_detail"><!-- --></A>
354 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
355 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
356 <TD COLSPAN=1><FONT SIZE="+2">
\r
357 <B>Method Detail</B></FONT></TD>
\r
361 <A NAME="setAudioFormat(javax.sound.sampled.AudioFormat)"><!-- --></A><H3>
\r
362 setAudioFormat</H3>
\r
364 public void <B>setAudioFormat</B>(javax.sound.sampled.AudioFormat format)</PRE>
\r
366 <DD>Sets the audio format for this player
\r
369 <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
372 <DT><B>Parameters:</B><DD><CODE>format</CODE> - the audio format
374 <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the line cannot be opened with
375 the given format</DL>
\r
380 <A NAME="getAudioFormat()"><!-- --></A><H3>
\r
381 getAudioFormat</H3>
\r
383 public javax.sound.sampled.AudioFormat <B>getAudioFormat</B>()</PRE>
\r
385 <DD>Gets the audio format for this player
\r
388 <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
392 <DT><B>Returns:</B><DD>format the audio format</DL>
\r
397 <A NAME="pause()"><!-- --></A><H3>
\r
400 public void <B>pause</B>()</PRE>
\r
402 <DD>Pauses audio output
\r
405 <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
413 <A NAME="resume()"><!-- --></A><H3>
\r
416 public void <B>resume</B>()</PRE>
\r
418 <DD>Resumes audio output
\r
421 <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
429 <A NAME="startFirstSampleTimer()"><!-- --></A><H3>
\r
430 startFirstSampleTimer</H3>
\r
432 public void <B>startFirstSampleTimer</B>()</PRE>
\r
434 <DD>Starts the first sample timer
\r
437 <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
445 <A NAME="cancel()"><!-- --></A><H3>
\r
448 public void <B>cancel</B>()</PRE>
\r
450 <DD>Cancels currently playing audio
\r
453 <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
461 <A NAME="reset()"><!-- --></A><H3>
\r
464 public void <B>reset</B>()</PRE>
\r
466 <DD>Prepares for another batch of output. Larger groups of output
467 (such as all output associated with a single FreeTTSSpeakable)
468 should be grouped between a reset/drain pair.
\r
471 <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
479 <A NAME="close()"><!-- --></A><H3>
\r
482 public void <B>close</B>()</PRE>
\r
484 <DD>Closes this audio player
\r
487 <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
495 <A NAME="getVolume()"><!-- --></A><H3>
\r
498 public float <B>getVolume</B>()</PRE>
\r
500 <DD>Returns the current volume.
\r
503 <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
507 <DT><B>Returns:</B><DD>the current volume (between 0 and 1)</DL>
\r
512 <A NAME="setVolume(float)"><!-- --></A><H3>
\r
515 public void <B>setVolume</B>(float volume)</PRE>
\r
517 <DD>Sets the current volume.
\r
520 <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
523 <DT><B>Parameters:</B><DD><CODE>volume</CODE> - the current volume (between 0 and 1)</DL>
\r
528 <A NAME="begin(int)"><!-- --></A><H3>
\r
531 public void <B>begin</B>(int size)</PRE>
\r
533 <DD>Starts the output of a set of data. Audio data for a single
534 utterance should be grouped between begin/end pairs.
\r
537 <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
540 <DT><B>Parameters:</B><DD><CODE>size</CODE> - the size of data between now and the end</DL>
\r
545 <A NAME="end()"><!-- --></A><H3>
\r
548 public boolean <B>end</B>()</PRE>
\r
550 <DD>Marks the end of a set of data. Audio data for a single
551 utterance should be groupd between begin/end pairs.
\r
554 <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
558 <DT><B>Returns:</B><DD>true if the audio was output properly, false if the
559 output was cancelled or interrupted.</DL>
\r
564 <A NAME="drain()"><!-- --></A><H3>
\r
567 public boolean <B>drain</B>()</PRE>
\r
569 <DD>Waits for all queued audio to be played
\r
572 <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
576 <DT><B>Returns:</B><DD>true if the audio played to completion, false if
577 the audio was stopped</DL>
\r
582 <A NAME="getTime()"><!-- --></A><H3>
\r
585 public long <B>getTime</B>()</PRE>
\r
587 <DD>Gets the amount of played since the last mark
\r
590 <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
594 <DT><B>Returns:</B><DD>the amount of audio in milliseconds</DL>
\r
599 <A NAME="resetTime()"><!-- --></A><H3>
\r
602 public void <B>resetTime</B>()</PRE>
\r
604 <DD>Resets the audio clock
\r
607 <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
615 <A NAME="write(byte[])"><!-- --></A><H3>
\r
618 public boolean <B>write</B>(byte[] audioData)</PRE>
\r
620 <DD>Writes the given bytes to the audio stream
\r
623 <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
626 <DT><B>Parameters:</B><DD><CODE>audioData</CODE> - audio data to write to the device
627 <DT><B>Returns:</B><DD><code>true</code> of the write completed successfully,
628 <code> false </code>if the write was cancelled.</DL>
\r
633 <A NAME="write(byte[], int, int)"><!-- --></A><H3>
\r
636 public boolean <B>write</B>(byte[] bytes,
638 int size)</PRE>
\r
640 <DD>Writes the given bytes to the audio stream
\r
643 <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
646 <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
647 <DT><B>Returns:</B><DD><code>true</code> of the write completed successfully,
648 <code> false </code>if the write was cancelled.</DL>
\r
653 <A NAME="toString()"><!-- --></A><H3>
\r
656 public java.lang.String <B>toString</B>()</PRE>
\r
658 <DD>Returns the name of this audioplayer
\r
665 <DT><B>Returns:</B><DD>the name of the audio player</DL>
\r
670 <A NAME="showMetrics()"><!-- --></A><H3>
\r
673 public void <B>showMetrics</B>()</PRE>
\r
675 <DD>Shows metrics for this audio player
\r
678 <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
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 <A HREF="../../../../../com/sun/speech/freetts/audio/JavaStreamingAudioPlayer.html" title="class in com.sun.speech.freetts.audio"><B>PREV CLASS</B></A>
\r
715 <A HREF="../../../../../com/sun/speech/freetts/audio/MultiFileAudioPlayer.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="MultiFile8BitAudioPlayer.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