changeset 416:cb00a4b01302 trunk

[svn] Convert to produce_audio usage.
author chainsaw
date Tue, 10 Jan 2006 16:50:39 -0800
parents d55ffce8b1ba
children 8ddd961ef0ff
files Plugins/Input/wav/wav-sndfile.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/wav/wav-sndfile.c	Tue Jan 10 12:47:50 2006 -0800
+++ b/Plugins/Input/wav/wav-sndfile.c	Tue Jan 10 16:50:39 2006 -0800
@@ -131,15 +131,14 @@
 		samples = sf_read_short (sndfile, buffer, BUFFER_SIZE);
 
 		if (samples > 0 && decoding)
-		{	wav_ip.add_vis_pcm (wav_ip.output->written_time (), FMT_S16_NE, sfinfo.channels, samples * sizeof (short), buffer);
-
-			while ((wav_ip.output->buffer_free () < (samples * sizeof (short))) && decoding)
+		{	while ((wav_ip.output->buffer_free () < (samples * sizeof (short))) && decoding)
 				xmms_usleep (10000);
-			
-			wav_ip.output->write_audio (buffer, samples * sizeof (short));
-   			}
+
+			produce_audio (wav_ip.output->written_time (), FMT_S16_NE, sfinfo.channels, 
+				samples * sizeof (short), buffer, &decoding);
+		}
 		else
-			xmms_usleep (80000);
+			xmms_usleep (10000);
 
 		/* Do seek if seek_time is valid. */
 		if (seek_time > 0)