Sound output buffer flush
<p>I have a jsp that plays wav file through java class in GlassFish. I have used SourceDataline methods:</p>

<pre><code>start();
drain();
close();
</code></pre>

<p>The wav file is played properly. For stopping I used:</p>

<pre><code>stop();
flush();
close();
</code></pre>

<p>But the play continues with the rest of data inside the output buffer. I went through the documents over www.oracle.com about SourceDataline methods. There it is said that flush() will discard the data inside the SourceDataline object but not the data already inside the output buffer.</p>

<p>Now I want to flush out the data from the output buffer so that there will be no overlapping of sound during the next start.
I searched on JavaScript also but without help.</p>
