Maybe a step back.... I know a stream is active.. its volume is set to zero or its muted.... Is there anyway to tell if there is any data/sound being produced by the stream My current hack is to set the volume to 2% so I can still detect sound using pa_stream_peek Cheers jason taylor 2009/5/27 Lennart Poettering <lennart at poettering.net> > On Mon, 25.05.09 11:34, Jason Taylor (killerkiwi2005 at gmail.com) wrote: > > > I've worked around this by using xlib to grab the pid of the window > > application and that seems to work.. > > > > No applications seem to set xid yet that I can see (banshee, rythembox, > vlc, > > mplayer, totem etc) > > As mentioned libcanberra does. But it might be the only one. > > > For my next trick.... > > pa_stream_peek seems to scale the data down by the sinks volume level... > is > > there a way to get the data "unscaled" (excuse my misuse of the > > terminology)? > > pa_stream_peek() will allow you to monitor the PCM data that is > actually written to the device, i.e. the end product of > resampling/remixing, > volume adjustments and so on. Since we apply per-stream volumes before > we resample/remix it's a bit hard to give you the data unmodified. > > Instead of monitoring particular sinks you can also monitor > particular sink inputs, which will give you the data without the sink > volume applied. (but with the sink input volume applied). To do use > pa_stream_set_monitor_stream(). > > Lennart > > -- > Lennart Poettering Red Hat, Inc. > lennart [at] poettering [dot] net > http://0pointer.net/lennart/ GnuPG 0x1A015CC4 > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at mail.0pointer.de > https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss > -- "Weekends don't count unless you spend them doing something completely pointless. " - Calven -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20090527/fd9d4757/attachment.htm>