Mercurial > audlegacy
diff Plugins/Input/adplug/adplug-xmms.cc @ 414:7fa1738514d5 trunk
[svn] Convert all input plugins (except timidity & wav-sndfile) to produce_audio.
author | chainsaw |
---|---|
date | Tue, 10 Jan 2006 12:22:40 -0800 |
parents | db298f2d3dd9 |
children | fc1788e1ab04 |
line wrap: on
line diff
--- a/Plugins/Input/adplug/adplug-xmms.cc Mon Jan 09 15:00:10 2006 -0800 +++ b/Plugins/Input/adplug/adplug-xmms.cc Tue Jan 10 12:22:40 2006 -0800 @@ -30,6 +30,10 @@ #include "audacious/plugin.h" #include "libaudacious/util.h" #include "libaudacious/configdb.h" +extern "C" { +#include "audacious/output.h" +} + /***** Defines *****/ @@ -641,12 +645,11 @@ toadd -= (long)(plr.p->getrefresh() * i); } - // write sound buffer and update vis - adplug_ip.add_vis_pcm(adplug_ip.output->written_time(), + // write sound buffer + while(adplug_ip.output->buffer_free() < SNDBUFSIZE * sampsize) xmms_usleep(10000); + produce_audio(adplug_ip.output->written_time(), bit16 ? FORMAT_16 : FORMAT_8, - stereo ? 2 : 1, SNDBUFSIZE * sampsize, sndbuf); - while(adplug_ip.output->buffer_free() < SNDBUFSIZE * sampsize) xmms_usleep(10000); - adplug_ip.output->write_audio(sndbuf, SNDBUFSIZE * sampsize); + stereo ? 2 : 1, SNDBUFSIZE * sampsize, sndbuf, NULL); #if 0 // update infobox, if necessary