├── .gitignore ├── .mailmap ├── .travis.yml ├── GPL ├── LGPL ├── LICENSE ├── Makefile.am ├── NEWS ├── PROTOCOL ├── PulseAudioConfig.cmake.in ├── PulseAudioConfigVersion.cmake.in ├── README ├── autogen.sh ├── bootstrap.sh ├── configure.ac ├── doc └── stream_restore_fallback_table_example.table ├── doxygen ├── .gitignore ├── Makefile.am └── doxygen.conf.in ├── git-version-gen ├── libpulse-mainloop-glib.pc.in ├── libpulse-simple.pc.in ├── libpulse.pc.in ├── m4 ├── .gitignore ├── acx_libwrap.m4 ├── ax_check_compile_flag.m4 ├── ax_check_define.m4 ├── ax_check_flag.m4 ├── ax_cxx_compile_stdcxx.m4 ├── ax_cxx_compile_stdcxx_11.m4 ├── ax_define_dir.m4 ├── ax_pthread.m4 ├── ax_tls.m4 └── orc.m4 ├── man ├── .gitignore ├── Makefile.am ├── default.pa.5.xml.in ├── esdcompat.1.xml.in ├── pacat.1.xml.in ├── pacmd.1.xml.in ├── pactl.1.xml.in ├── padsp.1.xml.in ├── pasuspender.1.xml.in ├── pax11publish.1.xml.in ├── pulse-cli-syntax.5.xml.in ├── pulse-client.conf.5.xml.in ├── pulse-daemon.conf.5.xml.in ├── pulseaudio.1.xml.in ├── start-pulseaudio-x11.1.xml.in ├── xmltoman ├── xmltoman.css ├── xmltoman.dtd └── xmltoman.xsl ├── orc.mak ├── po ├── .gitignore ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── as.po ├── be.po ├── bn_IN.po ├── ca.po ├── cs.po ├── de.po ├── de_CH.po ├── el.po ├── es.po ├── fi.po ├── fr.po ├── gu.po ├── he.po ├── hi.po ├── hu.po ├── id.po ├── it.po ├── ja.po ├── kn.po ├── ko.po ├── ml.po ├── mr.po ├── nl.po ├── oc.po ├── or.po ├── pa.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ru.po ├── sk.po ├── sr.po ├── sr@latin.po ├── sv.po ├── ta.po ├── te.po ├── tr.po ├── uk.po ├── zh_CN.po └── zh_TW.po ├── pulseaudio-text.svg ├── pulseaudio.supp ├── pulseaudio.svg ├── scripts ├── benchmark_memory_usage.sh ├── benchmarks │ ├── .gitignore │ └── README └── plot_memory_usage.gp ├── shell-completion ├── bash │ └── pulseaudio └── zsh │ └── _pulseaudio ├── src ├── .gitignore ├── Makefile.am ├── daemon │ ├── .gitignore │ ├── Makefile │ ├── caps.c │ ├── caps.h │ ├── cmdline.c │ ├── cmdline.h │ ├── cpulimit.c │ ├── cpulimit.h │ ├── daemon-conf.c │ ├── daemon-conf.h │ ├── daemon.conf.in │ ├── default.pa.in │ ├── dumpmodules.c │ ├── dumpmodules.h │ ├── esdcompat.in │ ├── ltdl-bind-now.c │ ├── ltdl-bind-now.h │ ├── main.c │ ├── pulseaudio-system.conf │ ├── pulseaudio.desktop.in │ ├── server-lookup.c │ ├── server-lookup.h │ ├── start-pulseaudio-x11.in │ ├── system.pa.in │ └── systemd │ │ └── user │ │ ├── pulseaudio.service.in │ │ └── pulseaudio.socket ├── depmod.py ├── map-file ├── modules │ ├── Makefile │ ├── alsa │ │ ├── alsa-mixer.c │ │ ├── alsa-mixer.h │ │ ├── alsa-sink.c │ │ ├── alsa-sink.h │ │ ├── alsa-source.c │ │ ├── alsa-source.h │ │ ├── alsa-ucm.c │ │ ├── alsa-ucm.h │ │ ├── alsa-util.c │ │ ├── alsa-util.h │ │ ├── mixer │ │ │ ├── paths │ │ │ │ ├── analog-input-aux.conf │ │ │ │ ├── analog-input-dock-mic.conf │ │ │ │ ├── analog-input-fm.conf │ │ │ │ ├── analog-input-front-mic.conf │ │ │ │ ├── analog-input-headphone-mic.conf │ │ │ │ ├── analog-input-headset-mic.conf │ │ │ │ ├── analog-input-internal-mic-always.conf │ │ │ │ ├── analog-input-internal-mic.conf │ │ │ │ ├── analog-input-linein.conf │ │ │ │ ├── analog-input-mic-line.conf │ │ │ │ ├── analog-input-mic.conf │ │ │ │ ├── analog-input-mic.conf.common │ │ │ │ ├── analog-input-rear-mic.conf │ │ │ │ ├── analog-input-tvtuner.conf │ │ │ │ ├── analog-input-video.conf │ │ │ │ ├── analog-input.conf │ │ │ │ ├── analog-input.conf.common │ │ │ │ ├── analog-output-headphones-2.conf │ │ │ │ ├── analog-output-headphones.conf │ │ │ │ ├── analog-output-lineout.conf │ │ │ │ ├── analog-output-mono.conf │ │ │ │ ├── analog-output-speaker-always.conf │ │ │ │ ├── analog-output-speaker.conf │ │ │ │ ├── analog-output.conf │ │ │ │ ├── analog-output.conf.common │ │ │ │ ├── hdmi-output-0.conf │ │ │ │ ├── hdmi-output-1.conf │ │ │ │ ├── hdmi-output-2.conf │ │ │ │ ├── hdmi-output-3.conf │ │ │ │ ├── hdmi-output-4.conf │ │ │ │ ├── hdmi-output-5.conf │ │ │ │ ├── hdmi-output-6.conf │ │ │ │ ├── hdmi-output-7.conf │ │ │ │ └── iec958-stereo-output.conf │ │ │ ├── profile-sets │ │ │ │ ├── 90-pulseaudio.rules │ │ │ │ ├── default.conf │ │ │ │ ├── force-speaker-and-int-mic.conf │ │ │ │ ├── force-speaker.conf │ │ │ │ ├── kinect-audio.conf │ │ │ │ ├── maudio-fasttrack-pro.conf │ │ │ │ ├── native-instruments-audio4dj.conf │ │ │ │ ├── native-instruments-audio8dj.conf │ │ │ │ ├── native-instruments-korecontroller.conf │ │ │ │ ├── native-instruments-traktor-audio10.conf │ │ │ │ ├── native-instruments-traktor-audio2.conf │ │ │ │ ├── native-instruments-traktor-audio6.conf │ │ │ │ ├── native-instruments-traktorkontrol-s4.conf │ │ │ │ └── sb-omni-surround-5.1.conf │ │ │ └── samples │ │ │ │ ├── ATI IXP--Realtek ALC655 rev 0 │ │ │ │ ├── Brooktree Bt878--Bt87x │ │ │ │ ├── Ensoniq AudioPCI--Cirrus Logic CS4297A rev 3 │ │ │ │ ├── HDA ATI HDMI--ATI R6xx HDMI │ │ │ │ ├── HDA Intel--Analog Devices AD1981 │ │ │ │ ├── HDA Intel--Realtek ALC889A │ │ │ │ ├── Intel 82801CA-ICH3--Analog Devices AD1881A │ │ │ │ ├── Logitech USB Speaker--USB Mixer │ │ │ │ ├── USB Audio--USB Mixer │ │ │ │ ├── USB Device 0x46d:0x9a4--USB Mixer │ │ │ │ ├── VIA 8237--Analog Devices AD1888 │ │ │ │ └── VIA 8237--C-Media Electronics CMI9761A+ │ │ ├── module-alsa-card.c │ │ ├── module-alsa-sink.c │ │ └── module-alsa-source.c │ ├── bluetooth │ │ ├── a2dp-codecs.h │ │ ├── backend-native.c │ │ ├── backend-ofono.c │ │ ├── bluez4-util.c │ │ ├── bluez4-util.h │ │ ├── bluez5-util.c │ │ ├── bluez5-util.h │ │ ├── module-bluetooth-discover.c │ │ ├── module-bluetooth-policy.c │ │ ├── module-bluez4-device.c │ │ ├── module-bluez4-discover.c │ │ ├── module-bluez5-device.c │ │ ├── module-bluez5-discover.c │ │ └── rtp.h │ ├── dbus │ │ ├── iface-card-profile.c │ │ ├── iface-card-profile.h │ │ ├── iface-card.c │ │ ├── iface-card.h │ │ ├── iface-client.c │ │ ├── iface-client.h │ │ ├── iface-core.c │ │ ├── iface-core.h │ │ ├── iface-device-port.c │ │ ├── iface-device-port.h │ │ ├── iface-device.c │ │ ├── iface-device.h │ │ ├── iface-memstats.c │ │ ├── iface-memstats.h │ │ ├── iface-module.c │ │ ├── iface-module.h │ │ ├── iface-sample.c │ │ ├── iface-sample.h │ │ ├── iface-stream.c │ │ ├── iface-stream.h │ │ └── module-dbus-protocol.c │ ├── echo-cancel │ │ ├── adrian-aec.c │ │ ├── adrian-aec.h │ │ ├── adrian-aec.orc │ │ ├── adrian-license.txt │ │ ├── adrian.c │ │ ├── adrian.h │ │ ├── echo-cancel.h │ │ ├── module-echo-cancel.c │ │ ├── null.c │ │ ├── speex.c │ │ └── webrtc.cc │ ├── gconf │ │ ├── gconf-helper.c │ │ └── module-gconf.c │ ├── jack │ │ ├── module-jack-sink.c │ │ ├── module-jack-source.c │ │ └── module-jackdbus-detect.c │ ├── ladspa.h │ ├── macosx │ │ ├── module-bonjour-publish.c │ │ ├── module-coreaudio-detect.c │ │ └── module-coreaudio-device.c │ ├── module-allow-passthrough.c │ ├── module-always-sink.c │ ├── module-augment-properties.c │ ├── module-card-restore.c │ ├── module-cli.c │ ├── module-combine-sink.c │ ├── module-combine.c │ ├── module-console-kit.c │ ├── module-default-device-restore.c │ ├── module-defs.h.m4 │ ├── module-detect.c │ ├── module-device-manager.c │ ├── module-device-restore.c │ ├── module-equalizer-sink.c │ ├── module-esound-compat-spawnfd.c │ ├── module-esound-compat-spawnpid.c │ ├── module-esound-sink.c │ ├── module-filter-apply.c │ ├── module-filter-heuristics.c │ ├── module-hal-detect-compat.c │ ├── module-intended-roles.c │ ├── module-ladspa-sink.c │ ├── module-lirc.c │ ├── module-loopback.c │ ├── module-match.c │ ├── module-mmkbd-evdev.c │ ├── module-native-protocol-fd.c │ ├── module-null-sink.c │ ├── module-null-source.c │ ├── module-pipe-sink.c │ ├── module-pipe-source.c │ ├── module-position-event-sounds.c │ ├── module-protocol-stub.c │ ├── module-remap-sink.c │ ├── module-remap-source.c │ ├── module-rescue-streams.c │ ├── module-role-cork.c │ ├── module-role-ducking.c │ ├── module-rygel-media-server.c │ ├── module-sine-source.c │ ├── module-sine.c │ ├── module-solaris.c │ ├── module-stream-restore.c │ ├── module-suspend-on-idle.c │ ├── module-switch-on-connect.c │ ├── module-switch-on-port-available.c │ ├── module-systemd-login.c │ ├── module-tunnel-sink-new.c │ ├── module-tunnel-source-new.c │ ├── module-tunnel.c │ ├── module-udev-detect.c │ ├── module-virtual-sink.c │ ├── module-virtual-source.c │ ├── module-virtual-surround-sink.c │ ├── module-volume-restore.c │ ├── module-waveout.c │ ├── module-zeroconf-discover.c │ ├── module-zeroconf-publish.c │ ├── oss │ │ ├── module-oss.c │ │ ├── oss-util.c │ │ └── oss-util.h │ ├── raop │ │ ├── module-raop-discover.c │ │ ├── module-raop-sink.c │ │ ├── raop-client.c │ │ ├── raop-client.h │ │ ├── raop-crypto.c │ │ ├── raop-crypto.h │ │ ├── raop-packet-buffer.c │ │ ├── raop-packet-buffer.h │ │ ├── raop-sink.c │ │ ├── raop-sink.h │ │ ├── raop-util.c │ │ └── raop-util.h │ ├── reserve-monitor.c │ ├── reserve-monitor.h │ ├── reserve-wrap.c │ ├── reserve-wrap.h │ ├── reserve.c │ ├── reserve.h │ ├── rtp │ │ ├── headerlist.c │ │ ├── headerlist.h │ │ ├── module-rtp-recv.c │ │ ├── module-rtp-send.c │ │ ├── rfc2327.txt │ │ ├── rfc2974.txt │ │ ├── rfc3550.txt │ │ ├── rfc3551.txt │ │ ├── rtp.c │ │ ├── rtp.h │ │ ├── rtsp_client.c │ │ ├── rtsp_client.h │ │ ├── sap.c │ │ ├── sap.h │ │ ├── sdp.c │ │ └── sdp.h │ ├── stream-interaction.c │ ├── stream-interaction.h │ ├── udev-util.c │ ├── udev-util.h │ ├── x11 │ │ ├── module-x11-bell.c │ │ ├── module-x11-cork-request.c │ │ ├── module-x11-publish.c │ │ └── module-x11-xsmp.c │ └── xen │ │ ├── gntalloc.h │ │ ├── gntdev.h │ │ └── module-xenpv-sink.c ├── pulse │ ├── .gitignore │ ├── Makefile │ ├── cdecl.h │ ├── channelmap.c │ ├── channelmap.h │ ├── client-conf-x11.c │ ├── client-conf-x11.h │ ├── client-conf.c │ ├── client-conf.h │ ├── client.conf.in │ ├── context.c │ ├── context.h │ ├── def.h │ ├── direction.c │ ├── direction.h │ ├── error.c │ ├── error.h │ ├── ext-device-manager.c │ ├── ext-device-manager.h │ ├── ext-device-restore.c │ ├── ext-device-restore.h │ ├── ext-stream-restore.c │ ├── ext-stream-restore.h │ ├── fork-detect.c │ ├── fork-detect.h │ ├── format.c │ ├── format.h │ ├── gccmacro.h │ ├── glib-mainloop.c │ ├── glib-mainloop.h │ ├── internal.h │ ├── introspect.c │ ├── introspect.h │ ├── json.c │ ├── json.h │ ├── mainloop-api.c │ ├── mainloop-api.h │ ├── mainloop-signal.c │ ├── mainloop-signal.h │ ├── mainloop.c │ ├── mainloop.h │ ├── operation.c │ ├── operation.h │ ├── proplist.c │ ├── proplist.h │ ├── pulseaudio.h │ ├── rtclock.c │ ├── rtclock.h │ ├── sample.c │ ├── sample.h │ ├── scache.c │ ├── scache.h │ ├── simple.c │ ├── simple.h │ ├── stream.c │ ├── stream.h │ ├── subscribe.c │ ├── subscribe.h │ ├── thread-mainloop.c │ ├── thread-mainloop.h │ ├── timeval.c │ ├── timeval.h │ ├── utf8.c │ ├── utf8.h │ ├── util.c │ ├── util.h │ ├── version.h.in │ ├── volume.c │ ├── volume.h │ ├── xmalloc.c │ └── xmalloc.h ├── pulsecore │ ├── Makefile │ ├── arpa-inet.c │ ├── arpa-inet.h │ ├── asyncmsgq.c │ ├── asyncmsgq.h │ ├── asyncq.c │ ├── asyncq.h │ ├── atomic.h │ ├── aupdate.c │ ├── aupdate.h │ ├── auth-cookie.c │ ├── auth-cookie.h │ ├── authkey.c │ ├── authkey.h │ ├── avahi-wrap.c │ ├── avahi-wrap.h │ ├── bitset.c │ ├── bitset.h │ ├── card.c │ ├── card.h │ ├── cli-command.c │ ├── cli-command.h │ ├── cli-text.c │ ├── cli-text.h │ ├── cli.c │ ├── cli.h │ ├── client.c │ ├── client.h │ ├── conf-parser.c │ ├── conf-parser.h │ ├── core-error.c │ ├── core-error.h │ ├── core-format.c │ ├── core-format.h │ ├── core-rtclock.c │ ├── core-rtclock.h │ ├── core-scache.c │ ├── core-scache.h │ ├── core-subscribe.c │ ├── core-subscribe.h │ ├── core-util.c │ ├── core-util.h │ ├── core.c │ ├── core.h │ ├── cpu-arm.c │ ├── cpu-arm.h │ ├── cpu-orc.c │ ├── cpu-orc.h │ ├── cpu-x86.c │ ├── cpu-x86.h │ ├── cpu.c │ ├── cpu.h │ ├── creds.h │ ├── database-gdbm.c │ ├── database-simple.c │ ├── database-tdb.c │ ├── database.h │ ├── dbus-shared.c │ ├── dbus-shared.h │ ├── dbus-util.c │ ├── dbus-util.h │ ├── device-port.c │ ├── device-port.h │ ├── dllmain.c │ ├── dynarray.c │ ├── dynarray.h │ ├── endianmacros.h │ ├── esound.h │ ├── fdsem.c │ ├── fdsem.h │ ├── ffmpeg │ │ ├── avcodec.h │ │ ├── dsputil.h │ │ └── resample2.c │ ├── filter │ │ ├── LICENSE.WEBKIT │ │ ├── biquad.c │ │ ├── biquad.h │ │ ├── crossover.c │ │ ├── crossover.h │ │ ├── lfe-filter.c │ │ └── lfe-filter.h │ ├── flist.c │ ├── flist.h │ ├── g711.c │ ├── g711.h │ ├── hashmap.c │ ├── hashmap.h │ ├── hook-list.c │ ├── hook-list.h │ ├── i18n.c │ ├── i18n.h │ ├── idxset.c │ ├── idxset.h │ ├── iochannel.c │ ├── iochannel.h │ ├── ioline.c │ ├── ioline.h │ ├── ipacl.c │ ├── ipacl.h │ ├── llist.h │ ├── lock-autospawn.c │ ├── lock-autospawn.h │ ├── log.c │ ├── log.h │ ├── ltdl-helper.c │ ├── ltdl-helper.h │ ├── macro.h │ ├── mcalign.c │ ├── mcalign.h │ ├── mem.h │ ├── memblock.c │ ├── memblock.h │ ├── memblockq.c │ ├── memblockq.h │ ├── memchunk.c │ ├── memchunk.h │ ├── memfd-wrappers.h │ ├── memtrap.c │ ├── memtrap.h │ ├── mime-type.c │ ├── mime-type.h │ ├── mix.c │ ├── mix.h │ ├── mix_neon.c │ ├── modargs.c │ ├── modargs.h │ ├── modinfo.c │ ├── modinfo.h │ ├── module.c │ ├── module.h │ ├── msgobject.c │ ├── msgobject.h │ ├── mutex-posix.c │ ├── mutex-win32.c │ ├── mutex.h │ ├── namereg.c │ ├── namereg.h │ ├── native-common.c │ ├── native-common.h │ ├── object.c │ ├── object.h │ ├── once.c │ ├── once.h │ ├── packet.c │ ├── packet.h │ ├── parseaddr.c │ ├── parseaddr.h │ ├── pdispatch.c │ ├── pdispatch.h │ ├── pid.c │ ├── pid.h │ ├── pipe.c │ ├── pipe.h │ ├── play-memblockq.c │ ├── play-memblockq.h │ ├── play-memchunk.c │ ├── play-memchunk.h │ ├── poll-posix.c │ ├── poll-win32.c │ ├── poll.h │ ├── proplist-util.c │ ├── proplist-util.h │ ├── protocol-cli.c │ ├── protocol-cli.h │ ├── protocol-dbus.c │ ├── protocol-dbus.h │ ├── protocol-esound.c │ ├── protocol-esound.h │ ├── protocol-http.c │ ├── protocol-http.h │ ├── protocol-native.c │ ├── protocol-native.h │ ├── protocol-simple.c │ ├── protocol-simple.h │ ├── pstream-util.c │ ├── pstream-util.h │ ├── pstream.c │ ├── pstream.h │ ├── queue.c │ ├── queue.h │ ├── random.c │ ├── random.h │ ├── ratelimit.c │ ├── ratelimit.h │ ├── refcnt.h │ ├── remap.c │ ├── remap.h │ ├── remap_mmx.c │ ├── remap_neon.c │ ├── remap_sse.c │ ├── resampler.c │ ├── resampler.h │ ├── resampler │ │ ├── ffmpeg.c │ │ ├── libsamplerate.c │ │ ├── peaks.c │ │ ├── soxr.c │ │ ├── speex.c │ │ └── trivial.c │ ├── rtkit.c │ ├── rtkit.h │ ├── rtpoll.c │ ├── rtpoll.h │ ├── sample-util.c │ ├── sample-util.h │ ├── sconv-s16be.c │ ├── sconv-s16be.h │ ├── sconv-s16le.c │ ├── sconv-s16le.h │ ├── sconv.c │ ├── sconv.h │ ├── sconv_neon.c │ ├── sconv_sse.c │ ├── semaphore-osx.c │ ├── semaphore-posix.c │ ├── semaphore-win32.c │ ├── semaphore.h │ ├── shared.c │ ├── shared.h │ ├── shm.c │ ├── shm.h │ ├── shmasyncq.c │ ├── shmasyncq.h │ ├── sink-input.c │ ├── sink-input.h │ ├── sink.c │ ├── sink.h │ ├── sioman.c │ ├── sioman.h │ ├── sndfile-util.c │ ├── sndfile-util.h │ ├── socket-client.c │ ├── socket-client.h │ ├── socket-server.c │ ├── socket-server.h │ ├── socket-util.c │ ├── socket-util.h │ ├── socket.h │ ├── sound-file-stream.c │ ├── sound-file-stream.h │ ├── sound-file.c │ ├── sound-file.h │ ├── source-output.c │ ├── source-output.h │ ├── source.c │ ├── source.h │ ├── srbchannel.c │ ├── srbchannel.h │ ├── start-child.c │ ├── start-child.h │ ├── strbuf.c │ ├── strbuf.h │ ├── stream-util.c │ ├── stream-util.h │ ├── strlist.c │ ├── strlist.h │ ├── svolume.orc │ ├── svolume_arm.c │ ├── svolume_c.c │ ├── svolume_mmx.c │ ├── svolume_orc.c │ ├── svolume_sse.c │ ├── tagstruct.c │ ├── tagstruct.h │ ├── thread-mq.c │ ├── thread-mq.h │ ├── thread-posix.c │ ├── thread-win32.c │ ├── thread.h │ ├── time-smoother.c │ ├── time-smoother.h │ ├── tokenizer.c │ ├── tokenizer.h │ ├── typedefs.h │ ├── usergroup.c │ ├── usergroup.h │ ├── winerrno.h │ ├── x11prop.c │ ├── x11prop.h │ ├── x11wrap.c │ └── x11wrap.h ├── tests │ ├── Makefile │ ├── alsa-mixer-path-test.c │ ├── alsa-time-test.c │ ├── asyncmsgq-test.c │ ├── asyncq-test.c │ ├── channelmap-test.c │ ├── close-test.c │ ├── connect-stress.c │ ├── core-util-test.c │ ├── cpu-mix-test.c │ ├── cpu-remap-test.c │ ├── cpu-sconv-test.c │ ├── cpu-volume-test.c │ ├── cpulimit-test.c │ ├── extended-test.c │ ├── flist-test.c │ ├── format-test.c │ ├── get-binary-name-test.c │ ├── gtk-test.c │ ├── hook-list-test.c │ ├── interpol-test.c │ ├── ipacl-test.c │ ├── json-test.c │ ├── ladspa-dbus.py │ ├── lfe-filter-test.c │ ├── lo-latency-test.c │ ├── lo-test-util.c │ ├── lo-test-util.h │ ├── lock-autospawn-test.c │ ├── mainloop-test.c │ ├── mcalign-test.c │ ├── memblock-test.c │ ├── memblockq-test.c │ ├── mix-test.c │ ├── mult-s16-test.c │ ├── once-test.c │ ├── pacat-simple.c │ ├── parec-simple.c │ ├── proplist-test.c │ ├── queue-test.c │ ├── remix-test.c │ ├── resampler-test.c │ ├── rtpoll-test.c │ ├── rtstutter.c │ ├── runtime-test-util.h │ ├── sig2str-test.c │ ├── sigbus-test.c │ ├── smoother-test.c │ ├── srbchannel-test.c │ ├── stripnul.c │ ├── strlist-test.c │ ├── sync-playback.c │ ├── test-daemon.sh │ ├── thread-mainloop-test.c │ ├── thread-test.c │ ├── usergroup-test.c │ ├── utf8-test.c │ ├── volume-test.c │ └── volume-ui.py └── utils │ ├── Makefile │ ├── pacat.c │ ├── pacmd.c │ ├── pactl.c │ ├── padsp.c │ ├── padsp.in │ ├── pasuspender.c │ ├── pax11publish.c │ └── qpaeq ├── todo └── vala ├── libpulse-mainloop-glib.deps ├── libpulse-mainloop-glib.vapi ├── libpulse-simple.deps ├── libpulse-simple.vapi ├── libpulse.deps └── libpulse.vapi /.gitignore: -------------------------------------------------------------------------------- 1 | .tarball-version 2 | .version 3 | .*.swp 4 | ABOUT-NLS 5 | build-aux 6 | intltool-extract.in 7 | intltool-merge.in 8 | intltool-update.in 9 | *~ 10 | *.tar.gz 11 | *.pc 12 | PulseAudioConfig.cmake 13 | PulseAudioConfigVersion.cmake 14 | /Makefile 15 | /Makefile.in 16 | aclocal.m4 17 | autom4te.cache 18 | compile 19 | config.guess 20 | config.h 21 | config.h.in 22 | config.log 23 | config.rpath 24 | config.status 25 | config.sub 26 | configure 27 | pulse-daemon.log 28 | depcomp 29 | install-sh 30 | libltdl 31 | libtool 32 | ltmain.sh 33 | missing 34 | mkinstalldirs 35 | stamp-* 36 | .dirstamp 37 | *.orig 38 | *.rej 39 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Diego Elio Pettenò 2 | Lennart Poettering 3 | Lennart Poettering 4 | Russ Dill 5 | Russ Dill 6 | Sjoerd Simons 7 | Sjoerd Simons 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # use the trusty beta 2 | sudo: required 3 | dist: trusty 4 | 5 | language: c 6 | 7 | compiler: 8 | - gcc 9 | #- clang 10 | 11 | before_install: 12 | - sudo apt-get -qq -y update 13 | - > 14 | sudo apt-get -qq -y install 15 | git-core 16 | autopoint 17 | autoconf 18 | automake 19 | intltool 20 | check 21 | libasound2-dev 22 | libasyncns-dev 23 | libatomic-ops-dev 24 | libavahi-client-dev 25 | libbluetooth-dev 26 | libsbc-dev 27 | libcap-dev 28 | libfftw3-dev 29 | libgconf2-dev 30 | libglib2.0-dev 31 | libgtk-3-dev 32 | libice-dev 33 | libjack-dev 34 | libjson-c-dev 35 | liblircclient-dev 36 | libltdl-dev 37 | liborc-0.4-dev 38 | libsamplerate0-dev 39 | libsndfile1-dev 40 | libspeexdsp-dev 41 | libssl-dev 42 | libtdb-dev 43 | libudev-dev 44 | libwebrtc-audio-processing-dev 45 | libwrap0-dev 46 | libx11-xcb-dev 47 | libxcb1-dev 48 | libxtst-dev 49 | libsystemd-daemon-dev 50 | libsystemd-id128-dev 51 | libsystemd-journal-dev 52 | libsystemd-login-dev 53 | 54 | before_script: 55 | # can't run git-version-gen on a shallow clone or without tags 56 | - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi 57 | - git fetch --tags 58 | - NOCONFIGURE=1 ./bootstrap.sh 59 | 60 | script: 61 | - ./configure --localstatedir=/var && make && make check && make check-daemon && make install DESTDIR=`mktemp -d` 62 | 63 | notifications: 64 | email: 65 | recipients: 66 | - pulseaudio-commits@lists.freedesktop.org 67 | 68 | irc: 69 | - "irc.freenode.net#pulseaudio" 70 | -------------------------------------------------------------------------------- /PulseAudioConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(PULSEAUDIO_FOUND TRUE) 2 | 3 | set(PULSEAUDIO_VERSION_MAJOR @PA_MAJOR@) 4 | set(PULSEAUDIO_VERSION_MINOR @PA_MINOR@) 5 | set(PULSEAUDIO_VERSION @PA_MAJOR@.@PA_MINOR@) 6 | set(PULSEAUDIO_VERSION_STRING "@PA_MAJOR@.@PA_MINOR@") 7 | 8 | find_path(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h HINTS "@PA_INCDIR@") 9 | find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse HINTS "@PA_LIBDIR@") 10 | ifelse(@HAVE_GLIB20@, 1, dnl 11 | find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop-glib libpulse-mainloop-glib HINTS "@PA_LIBDIR@") 12 | )dnl 13 | -------------------------------------------------------------------------------- /PulseAudioConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION @PA_MAJOR@.@PA_MINOR@) 2 | 3 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) 4 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 5 | else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) 6 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 7 | if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") 8 | set(PACKAGE_VERSION_EXACT TRUE) 9 | endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") 10 | endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) 11 | 12 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | PULSEAUDIO SOUND SERVER 2 | 3 | WEB SITE: 4 | http://pulseaudio.org/ 5 | 6 | GIT: 7 | git://anongit.freedesktop.org/pulseaudio/pulseaudio 8 | 9 | GITWEB/CGIT: 10 | http://cgit.freedesktop.org/pulseaudio/pulseaudio/ 11 | 12 | MAILING LIST: 13 | http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss 14 | 15 | GIT COMMITS MAILING LIST: 16 | http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits 17 | 18 | TRAC/BUGZILLA TICKET CHANGES MAILING LIST: 19 | http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs 20 | 21 | IRC: 22 | #pulseaudio on irc.freenode.org 23 | 24 | FRESHMEAT: 25 | http://freshmeat.net/projects/pulseaudio/ 26 | 27 | OHLOH: 28 | http://www.ohloh.net/projects/4038 29 | 30 | AUTHORS: 31 | Several 32 | 33 | HACKING: 34 | In order to run pulseaudio from the build dir __OPTIMIZE__ should be 35 | disabled (look at src/pulsecore/core-util.h::pa_run_from_build_tree()), 36 | this can be done by passing "CFLAGS=-O0" to the configure script: 37 | ./autogen.sh 38 | CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure 39 | make 40 | ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/ 41 | 42 | SPELLING: 43 | PulseAudio 44 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This file is part of PulseAudio. 4 | # 5 | # PulseAudio is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # PulseAudio is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public License 16 | # along with PulseAudio; if not, see . 17 | 18 | # Only there to make jhbuild happy 19 | 20 | NOCONFIGURE=1 ./bootstrap.sh 21 | 22 | exec ./configure "$@" 23 | -------------------------------------------------------------------------------- /doc/stream_restore_fallback_table_example.table: -------------------------------------------------------------------------------- 1 | # This is an example fallback table file for module-stream-restore. 2 | # Lines starting with '#' or ';' are regarded as comments and ignored. 3 | # Empty lines are allowed. 4 | # 5 | # Each non-comment and non-empty line defines the default volume 6 | # for one stream-restore database key. For example: 7 | 8 | sink-input-by-media-role:phone -4.2 9 | 10 | # That line sets the volume of sink inputs with media role "phone" 11 | # to -4.2 dB (relative to the sink volume), if the 12 | # "sink-input-by-media-role:phone" key doesn't already exist in the 13 | # stream-restore database. Positive dB values are not allowed. 14 | -------------------------------------------------------------------------------- /doxygen/.gitignore: -------------------------------------------------------------------------------- 1 | /doxygen.conf 2 | /html/ 3 | /Makefile 4 | /Makefile.in 5 | -------------------------------------------------------------------------------- /doxygen/Makefile.am: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | doxygen: doxygen.conf 17 | doxygen $< 18 | 19 | clean-local: 20 | -rm -rf html 21 | 22 | .PHONY: all doxygen 23 | -------------------------------------------------------------------------------- /libpulse-mainloop-glib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libpulse-mainloop-glib 7 | Description: PulseAudio GLib 2.0 Main Loop Wrapper 8 | Version: @PACKAGE_VERSION@ 9 | Libs: -L${libdir} -lpulse-mainloop-glib @PTHREAD_LIBS@ 10 | Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@ 11 | Cflags: -I${includedir} -D_REENTRANT 12 | Requires: libpulse glib-2.0 13 | -------------------------------------------------------------------------------- /libpulse-simple.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libpulse-simple 7 | Description: PulseAudio Simplified Synchronous Client Interface 8 | Version: @PACKAGE_VERSION@ 9 | Libs: -L${libdir} -lpulse-simple @PTHREAD_LIBS@ 10 | Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@ 11 | Cflags: -I${includedir} -D_REENTRANT 12 | Requires: libpulse 13 | -------------------------------------------------------------------------------- /libpulse.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | modlibexecdir=@modlibexecdir@ 6 | 7 | Name: libpulse 8 | Description: PulseAudio Client Interface 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lpulse @PTHREAD_LIBS@ 11 | Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@ 12 | Cflags: -I${includedir} -D_REENTRANT 13 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- 1 | codeset.m4 2 | fcntl-o.m4 3 | gettext.m4 4 | glibc2.m4 5 | glibc21.m4 6 | iconv.m4 7 | intdiv0.m4 8 | intl.m4 9 | intldir.m4 10 | intlmacosx.m4 11 | intltool.m4 12 | intmax.m4 13 | inttypes-pri.m4 14 | inttypes_h.m4 15 | lcmessage.m4 16 | lib-ld.m4 17 | lib-link.m4 18 | lib-prefix.m4 19 | libtool.m4 20 | lock.m4 21 | longlong.m4 22 | ltoptions.m4 23 | ltsugar.m4 24 | ltversion.m4 25 | lt~obsolete.m4 26 | nls.m4 27 | po.m4 28 | printf-posix.m4 29 | progtest.m4 30 | size_max.m4 31 | stdint_h.m4 32 | threadlib.m4 33 | uintmax_t.m4 34 | visibility.m4 35 | wchar_t.m4 36 | wint_t.m4 37 | xsize.m4 38 | -------------------------------------------------------------------------------- /m4/acx_libwrap.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([ACX_LIBWRAP], [ 2 | LIBWRAP_LIBS= 3 | saved_LIBS="$LIBS" 4 | LIBS="$LIBS -lwrap" 5 | AC_MSG_CHECKING([for tcpwrap library and headers]) 6 | AC_LINK_IFELSE( 7 | [AC_LANG_PROGRAM( 8 | [#include 9 | #include 10 | int allow_severity = LOG_INFO; 11 | int deny_severity = LOG_WARNING;], 12 | [struct request_info *req; 13 | return hosts_access (req);])], 14 | [AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?]) 15 | LIBWRAP_LIBS="-lwrap" 16 | AC_MSG_RESULT(yes)], 17 | [AC_MSG_RESULT(no)]) 18 | LIBS="$saved_LIBS" 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/ax_cxx_compile_stdcxx_11.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================ 2 | # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html 3 | # ============================================================================ 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check for baseline language coverage in the compiler for the C++11 12 | # standard; if necessary, add switches to CXXFLAGS to enable support. 13 | # 14 | # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX 15 | # macro with the version set to C++11. The two optional arguments are 16 | # forwarded literally as the second and third argument respectively. 17 | # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for 18 | # more information. If you want to use this macro, you also need to 19 | # download the ax_cxx_compile_stdcxx.m4 file. 20 | # 21 | # LICENSE 22 | # 23 | # Copyright (c) 2008 Benjamin Kosnik 24 | # Copyright (c) 2012 Zack Weinberg 25 | # Copyright (c) 2013 Roy Stogner 26 | # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov 27 | # Copyright (c) 2015 Paul Norman 28 | # Copyright (c) 2015 Moritz Klammler 29 | # 30 | # Copying and distribution of this file, with or without modification, are 31 | # permitted in any medium without royalty provided the copyright notice 32 | # and this notice are preserved. This file is offered as-is, without any 33 | # warranty. 34 | 35 | #serial 14 36 | 37 | include([ax_cxx_compile_stdcxx.m4]) 38 | 39 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) 40 | -------------------------------------------------------------------------------- /m4/ax_define_dir.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_define_dir.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # This macro sets VARNAME to the expansion of the DIR variable, taking 12 | # care of fixing up ${prefix} and such. 13 | # 14 | # VARNAME is then offered as both an output variable and a C preprocessor 15 | # symbol. 16 | # 17 | # Example: 18 | # 19 | # AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) 20 | # 21 | # LICENSE 22 | # 23 | # Copyright (c) 2008 Stepan Kasal 24 | # Copyright (c) 2008 Andreas Schwab 25 | # Copyright (c) 2008 Guido U. Draheim 26 | # Copyright (c) 2008 Alexandre Oliva 27 | # 28 | # Copying and distribution of this file, with or without modification, are 29 | # permitted in any medium without royalty provided the copyright notice 30 | # and this notice are preserved. This file is offered as-is, without any 31 | # warranty. 32 | 33 | #serial 6 34 | 35 | AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) 36 | AC_DEFUN([AX_DEFINE_DIR], [ 37 | prefix_NONE= 38 | exec_prefix_NONE= 39 | test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix 40 | test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix 41 | dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn 42 | dnl refers to ${prefix}. Thus we have to use `eval' twice. 43 | eval ax_define_dir="\"[$]$2\"" 44 | eval ax_define_dir="\"$ax_define_dir\"" 45 | AC_SUBST($1, "$ax_define_dir") 46 | AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) 47 | test "$prefix_NONE" && prefix=NONE 48 | test "$exec_prefix_NONE" && exec_prefix=NONE 49 | ]) 50 | -------------------------------------------------------------------------------- /man/.gitignore: -------------------------------------------------------------------------------- 1 | /*.1 2 | /*.1.xml 3 | /*.5 4 | /*.5.xml 5 | /Makefile 6 | /Makefile.in 7 | -------------------------------------------------------------------------------- /man/start-pulseaudio-x11.1.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | 24 | 25 | start-pulseaudio-x11 [pulseaudio options] 26 | 27 | 28 | 29 |

This script starts pulseaudio (if not already running) and loads modules to 30 | publish access credentials to the PulseAudio server in the X11 root window and to synthesize 31 | X11 media key events on cork/uncork requests. Additionally it registers 32 | PulseAudio to the X11 Session Manager.

33 | 34 |

All arguments are directly passed to pulseaudio.

35 |
36 | 37 |
38 |

The PulseAudio Developers <@PACKAGE_BUGREPORT@>; 39 | PulseAudio is available from

40 |
41 | 42 |
43 |

44 | 45 |

46 |
47 | 48 |
49 | -------------------------------------------------------------------------------- /man/xmltoman.css: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | PulseAudio is free software; you can redistribute it and/or modify it under 5 | the terms of the GNU General Public License as published by the Free 6 | Software Foundation; either version 2 of the License, or (at your 7 | option) any later version. 8 | 9 | PulseAudio is distributed in the hope that it will be useful, but WITHOUT 10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 | for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with PulseAudio; if not, see . 16 | ***/ 17 | 18 | body { color: black; background-color: white; } 19 | a:link, a:visited { color: #900000; } 20 | h1 { text-transform:uppercase; font-size: 18pt; } 21 | p { margin-left:1cm; margin-right:1cm; } 22 | .cmd { font-family:monospace; } 23 | .file { font-family:monospace; } 24 | .arg { text-transform:uppercase; font-family:monospace; font-style: italic; } 25 | .opt { font-family:monospace; font-weight: bold; } 26 | .manref { font-family:monospace; } 27 | .option .optdesc { margin-left:2cm; } 28 | -------------------------------------------------------------------------------- /man/xmltoman.dtd: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /orc.mak: -------------------------------------------------------------------------------- 1 | # 2 | # This is a Makefile.am fragment to build Orc code. It is based 3 | # on the orc.mak file distributed in the GStreamer common 4 | # repository. 5 | # 6 | # Include this file like this: 7 | # 8 | # include $(top_srcdir)/orc.mak 9 | # 10 | # For each Orc source file, append its name (without the extension) 11 | # to ORC_SOURCE: 12 | # 13 | # ORC_SOURCE += gstadderorc 14 | # 15 | # This will create gstadder-orc-gen.c and gstadder-orc-gen.h, which 16 | # you need to add to your nodist_module_SOURCES. 17 | # 18 | # Note that this file appends to BUILT_SOURCES and CLEANFILES, so 19 | # define them before including this file. 20 | # 21 | 22 | 23 | EXTRA_DIST += $(addsuffix .orc,$(ORC_SOURCE)) 24 | 25 | if HAVE_ORC 26 | ORC_BUILT_SOURCE = $(addsuffix -orc-gen.c,$(ORC_SOURCE)) 27 | ORC_BUILT_HEADER = $(addsuffix -orc-gen.h,$(ORC_SOURCE)) 28 | 29 | BUILT_SOURCES += $(ORC_BUILT_SOURCE) $(ORC_BUILT_HEADER) 30 | CLEANFILES += $(BUILT_SOURCES) 31 | 32 | 33 | orcc_v_gen = $(orcc_v_gen_$(V)) 34 | orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY)) 35 | orcc_v_gen_0 = @echo " ORCC $@"; 36 | 37 | cp_v_gen = $(cp_v_gen_$(V)) 38 | cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY)) 39 | cp_v_gen_0 = @echo " CP $@"; 40 | 41 | %-orc-gen.c: %.orc 42 | @mkdir -p $(@D) 43 | $(orcc_v_gen)$(ORCC) --implementation -o $@ $< 44 | 45 | %-orc-gen.h: %.orc 46 | @mkdir -p $(@D) 47 | $(orcc_v_gen)$(ORCC) --header -o $@ $< 48 | endif 49 | -------------------------------------------------------------------------------- /po/.gitignore: -------------------------------------------------------------------------------- 1 | /.intltool-merge-cache 2 | /Makefile.in.in 3 | /Makevars.template 4 | /POTFILES 5 | /Rules-quot 6 | /boldquot.sed 7 | /en@boldquot.header 8 | /en@quot.header 9 | /insert-header.sin 10 | /pulseaudio.pot 11 | /quot.sed 12 | /remove-potcdate.sin 13 | /*.mo 14 | /*.gmo 15 | /Makefile 16 | /Makefile.in 17 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | as 2 | be 3 | bn_IN 4 | ca 5 | cs 6 | de_CH 7 | de 8 | el 9 | es 10 | fi 11 | fr 12 | gu 13 | he 14 | hi 15 | hu 16 | id 17 | it 18 | ja 19 | kn 20 | ko 21 | ml 22 | mr 23 | nl 24 | oc 25 | or 26 | pa 27 | pl 28 | pt_BR 29 | pt 30 | ru 31 | sk 32 | sr@latin 33 | sr 34 | sv 35 | ta 36 | te 37 | tr 38 | uk 39 | zh_CN 40 | zh_TW 41 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | src/pulsecore/atomic.h 2 | src/modules/module-virtual-sink.c 3 | src/modules/module-virtual-source.c 4 | -------------------------------------------------------------------------------- /po/ml.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hfujita/pulseaudio-raop2/29014bb40944f86d1156e740d9b570de26a32bbd/po/ml.po -------------------------------------------------------------------------------- /pulseaudio.supp: -------------------------------------------------------------------------------- 1 | # This file contains error suppression rules for Valgrind. These rules suppress 2 | # errors in alsa-lib that are caused by Valgrind not handling the 3 | # SNDRV_CTL_IOCTL_TLV_READ ioctl. More information about the Valgrind bug: 4 | # http://thread.gmane.org/gmane.comp.debugging.valgrind/11888 5 | # 6 | # To use this file, pass the command line option --suppressions= to 7 | # Valgrind. 8 | # 9 | # If you find new false positives, and want to add new suppressions, the 10 | # --gen-suppression=all option can be very useful. It prints automatically 11 | # generated suppression rules that can be copy-pasted here. 12 | 13 | { 14 | alsa-lib/snd_tlv_get_dB_range 15 | Memcheck:Cond 16 | fun:snd_tlv_get_dB_range 17 | } 18 | 19 | { 20 | alsa-lib/snd_tlv_convert_to_dB 21 | Memcheck:Cond 22 | fun:snd_tlv_convert_to_dB 23 | } 24 | 25 | { 26 | alsa-lib/snd_tlv_convert_from_dB 27 | Memcheck:Cond 28 | fun:snd_tlv_convert_from_dB 29 | } 30 | 31 | { 32 | alsa-lib/set_volume_ops 33 | Memcheck:Cond 34 | fun:set_volume_ops 35 | } 36 | 37 | { 38 | alsa-lib/snd_ctl_hw_elem_write 39 | Memcheck:Param 40 | ioctl(generic) 41 | fun:ioctl 42 | fun:snd_ctl_hw_elem_write 43 | } 44 | 45 | { 46 | alsa-lib/selem_read 47 | Memcheck:Cond 48 | fun:bcmp 49 | fun:selem_read 50 | } 51 | -------------------------------------------------------------------------------- /scripts/benchmarks/.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # Benchmarks directory .gitignore 3 | # 4 | 5 | # Ignore everything here .. 6 | * 7 | 8 | # Except these files 9 | !README 10 | !.gitignore 11 | -------------------------------------------------------------------------------- /scripts/benchmarks/README: -------------------------------------------------------------------------------- 1 | This is an empty directory for collecting users PulseAudio daemon 2 | performance benchmarks, as created by the tools under `scripts/' . 3 | 4 | Please do not commit any file here except this README and .gitignore. 5 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | *.lo 3 | *.o 4 | *.la 5 | *.gcno 6 | *.trs 7 | *.log 8 | .deps 9 | .libs 10 | /Makefile 11 | /Makefile.in 12 | client.conf 13 | daemon.conf 14 | default.pa 15 | echo-cancel-test 16 | esdcompat 17 | gconf-helper 18 | pacat 19 | pacmd 20 | pactl 21 | padsp 22 | paplay 23 | pasuspender 24 | pax11publish 25 | pulseaudio 26 | pulseaudio.service 27 | start-pulseaudio-x11 28 | *-symdef.h 29 | *-orc-gen.[ch] 30 | # tests 31 | alsa-mixer-path-test 32 | alsa-time-test 33 | asyncmsgq-test 34 | asyncq-test 35 | channelmap-test 36 | close-test 37 | connect-stress 38 | core-util-test 39 | cpulimit-test 40 | cpulimit-test2 41 | cpu-sconv-test 42 | cpu-remap-test 43 | cpu-mix-test 44 | cpu-volume-test 45 | extended-test 46 | flist-test 47 | format-test 48 | get-binary-name-test 49 | gtk-test 50 | hook-list-test 51 | interpol-test 52 | ipacl-test 53 | json-test 54 | lfe-filter-test 55 | lock-autospawn-test 56 | lo-latency-test 57 | mainloop-test 58 | mainloop-test-glib 59 | mcalign-test 60 | memblockq-test 61 | memblock-test 62 | mix-test 63 | once-test 64 | pacat-simple 65 | parec-simple 66 | proplist-test 67 | queue-test 68 | remix-test 69 | resampler-test 70 | rtpoll-test 71 | rtstutter 72 | sig2str-test 73 | sigbus-test 74 | smoother-test 75 | srbchannel-test 76 | stripnul 77 | strlist-test 78 | sync-playback 79 | system.pa 80 | thread-mainloop-test 81 | thread-test 82 | usergroup-test 83 | utf8-test 84 | volume-test 85 | mult-s16-test 86 | -------------------------------------------------------------------------------- /src/daemon/.gitignore: -------------------------------------------------------------------------------- 1 | org.pulseaudio.policy 2 | pulseaudio.desktop 3 | -------------------------------------------------------------------------------- /src/daemon/Makefile: -------------------------------------------------------------------------------- 1 | ../modules/Makefile -------------------------------------------------------------------------------- /src/daemon/caps.h: -------------------------------------------------------------------------------- 1 | #ifndef foocapshfoo 2 | #define foocapshfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | void pa_drop_root(void); 26 | 27 | void pa_drop_caps(void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/daemon/cmdline.h: -------------------------------------------------------------------------------- 1 | #ifndef foocmdlinehfoo 2 | #define foocmdlinehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include "daemon-conf.h" 24 | 25 | /* Parse the command line and store its data in *c. Return the index 26 | * of the first unparsed argument in *d. */ 27 | int pa_cmdline_parse(pa_daemon_conf*c, int argc, char *const argv [], int *d); 28 | 29 | /* Show the command line help. The command name is extracted from 30 | * argv[0] which should be passed in argv0. */ 31 | void pa_cmdline_help(const char *argv0); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/daemon/cpulimit.h: -------------------------------------------------------------------------------- 1 | #ifndef foocpulimithfoo 2 | #define foocpulimithfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | /* This kills the pulseaudio process if it eats more than 70% of the 26 | * CPU time. This is build around setrlimit() and SIGXCPU. It is handy 27 | * in case of using SCHED_FIFO which may freeze the whole machine */ 28 | 29 | int pa_cpu_limit_init(pa_mainloop_api *m); 30 | void pa_cpu_limit_done(void); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/daemon/dumpmodules.h: -------------------------------------------------------------------------------- 1 | #ifndef foodumpmoduleshfoo 2 | #define foodumpmoduleshfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include "daemon-conf.h" 24 | 25 | /* Dump all available modules to STDOUT. If argc > 0 print information 26 | * about the modules specified in argv[] instead. */ 27 | void pa_dump_modules(pa_daemon_conf *c, int argc, char * const argv[]); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/daemon/ltdl-bind-now.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecoreltdlbindnowhfoo 2 | #define foopulsecoreltdlbindnowhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | void pa_ltdl_init(void); 24 | void pa_ltdl_done(void); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/daemon/pulseaudio-system.conf: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/daemon/pulseaudio.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | _Name=PulseAudio Sound System 4 | _Comment=Start the PulseAudio Sound System 5 | Exec=start-pulseaudio-x11 6 | Terminal=false 7 | Type=Application 8 | Categories= 9 | GenericName= 10 | X-GNOME-Autostart-Phase=Initialization 11 | X-KDE-autostart-phase=1 12 | -------------------------------------------------------------------------------- /src/daemon/server-lookup.h: -------------------------------------------------------------------------------- 1 | #ifndef fooserverlookuphfoo 2 | #define fooserverlookuphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus object at path 24 | * /org/pulseaudio/server_lookup. Implemented interfaces 25 | * are org.pulseaudio.ServerLookup and org.freedesktop.DBus.Introspectable. 26 | * 27 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/ConnectingToServer/ 28 | * for the ServerLookup interface documentation. 29 | */ 30 | 31 | #include 32 | 33 | typedef struct pa_dbusobj_server_lookup pa_dbusobj_server_lookup; 34 | 35 | pa_dbusobj_server_lookup *pa_dbusobj_server_lookup_new(pa_core *c); 36 | void pa_dbusobj_server_lookup_free(pa_dbusobj_server_lookup *sl); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/daemon/start-pulseaudio-x11.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This file is part of PulseAudio. 4 | # 5 | # PulseAudio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # PulseAudio is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public License 16 | # along with PulseAudio; if not, see . 17 | 18 | set -e 19 | 20 | if [ x"$DISPLAY" != x ] ; then 21 | 22 | @PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY" > /dev/null 23 | @PACTL_BINARY@ load-module module-x11-cork-request "display=$DISPLAY" > /dev/null 24 | 25 | if [ x"$KDE_FULL_SESSION" = x"true" ]; then 26 | @PACTL_BINARY@ load-module module-device-manager "do_routing=1" > /dev/null 27 | fi 28 | 29 | if [ x"$SESSION_MANAGER" != x ] ; then 30 | @PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null 31 | fi 32 | fi 33 | -------------------------------------------------------------------------------- /src/daemon/systemd/user/pulseaudio.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Sound Service 3 | 4 | # We require pulseaudio.socket to be active before starting the daemon, because 5 | # while it is possible to use the service without the socket, it is not clear 6 | # why it would be desirable. 7 | # 8 | # A user installing pulseaudio and doing `systemctl --user start pulseaudio` 9 | # will not get the socket started, which might be confusing and problematic if 10 | # the server is to be restarted later on, as the client autospawn feature 11 | # might kick in. Also, a start of the socket unit will fail, adding to the 12 | # confusion. 13 | # 14 | # After=pulseaudio.socket is not needed, as it is already implicit in the 15 | # socket-service relationship, see systemd.socket(5). 16 | Requires=pulseaudio.socket 17 | 18 | [Service] 19 | # Note that notify will only work if --daemonize=no 20 | Type=notify 21 | ExecStart=@PA_BINARY@ --daemonize=no 22 | Restart=on-failure 23 | 24 | [Install] 25 | Also=pulseaudio.socket 26 | WantedBy=default.target 27 | -------------------------------------------------------------------------------- /src/daemon/systemd/user/pulseaudio.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Sound System 3 | 4 | [Socket] 5 | Priority=6 6 | Backlog=5 7 | ListenStream=%t/pulse/native 8 | 9 | [Install] 10 | WantedBy=sockets.target 11 | -------------------------------------------------------------------------------- /src/modules/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(MAKE) -C .. 3 | 4 | clean: 5 | $(MAKE) -C .. clean 6 | 7 | .PHONY: all clean 8 | -------------------------------------------------------------------------------- /src/modules/alsa/alsa-sink.h: -------------------------------------------------------------------------------- 1 | #ifndef fooalsasinkhfoo 2 | #define fooalsasinkhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "alsa-util.h" 29 | 30 | pa_sink* pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, pa_alsa_mapping *mapping); 31 | 32 | void pa_alsa_sink_free(pa_sink *s); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/modules/alsa/alsa-source.h: -------------------------------------------------------------------------------- 1 | #ifndef fooalsasourcehfoo 2 | #define fooalsasourcehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "alsa-util.h" 29 | 30 | pa_source* pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, pa_alsa_mapping *mapping); 31 | 32 | void pa_alsa_source_free(pa_source *s); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/analog-input-aux.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; For devices where an 'Aux' element exists 17 | ; 18 | ; See analog-output.conf.common for an explanation on the directives 19 | 20 | [General] 21 | priority = 80 22 | description-key = analog-input 23 | 24 | [Element Capture] 25 | switch = mute 26 | volume = merge 27 | override-map.1 = all 28 | override-map.2 = all-left,all-right 29 | 30 | [Element Mic] 31 | switch = off 32 | volume = off 33 | 34 | [Element Internal Mic] 35 | switch = off 36 | volume = off 37 | 38 | [Element Line] 39 | switch = off 40 | volume = off 41 | 42 | [Element Aux] 43 | required = any 44 | switch = mute 45 | volume = merge 46 | override-map.1 = all 47 | override-map.2 = all-left,all-right 48 | 49 | [Element Video] 50 | switch = off 51 | volume = off 52 | 53 | [Element Mic/Line] 54 | switch = off 55 | volume = off 56 | 57 | [Element TV Tuner] 58 | switch = off 59 | volume = off 60 | 61 | [Element FM] 62 | switch = off 63 | volume = off 64 | 65 | .include analog-input.conf.common 66 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/analog-input-fm.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; For devices where an 'FM' element exists 17 | ; 18 | ; See analog-output.conf.common for an explanation on the directives 19 | 20 | [General] 21 | priority = 70 22 | description-key = analog-input-radio 23 | 24 | [Element Capture] 25 | switch = mute 26 | volume = merge 27 | override-map.1 = all 28 | override-map.2 = all-left,all-right 29 | 30 | [Element Mic] 31 | switch = off 32 | volume = off 33 | 34 | [Element Internal Mic] 35 | switch = off 36 | volume = off 37 | 38 | [Element Line] 39 | switch = off 40 | volume = off 41 | 42 | [Element Aux] 43 | switch = off 44 | volume = off 45 | 46 | [Element Video] 47 | switch = off 48 | volume = off 49 | 50 | [Element Mic/Line] 51 | switch = off 52 | volume = off 53 | 54 | [Element TV Tuner] 55 | switch = off 56 | volume = off 57 | 58 | [Element FM] 59 | required = any 60 | switch = mute 61 | volume = merge 62 | override-map.1 = all 63 | override-map.2 = all-left,all-right 64 | 65 | .include analog-input.conf.common 66 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/analog-input-mic-line.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; For devices where a 'Mic/Line' element exists 17 | ; 18 | ; See analog-output.conf.common for an explanation on the directives 19 | 20 | [General] 21 | priority = 85 22 | description-key = analog-input 23 | 24 | [Element Capture] 25 | switch = mute 26 | volume = merge 27 | override-map.1 = all 28 | override-map.2 = all-left,all-right 29 | 30 | [Element Mic] 31 | switch = off 32 | volume = off 33 | 34 | [Element Internal Mic] 35 | switch = off 36 | volume = off 37 | 38 | [Element Line] 39 | switch = off 40 | volume = off 41 | 42 | [Element Aux] 43 | switch = off 44 | volume = off 45 | 46 | [Element Video] 47 | switch = off 48 | volume = off 49 | 50 | [Element Mic/Line] 51 | required = any 52 | switch = mute 53 | volume = merge 54 | override-map.1 = all 55 | override-map.2 = all-left,all-right 56 | 57 | [Element TV Tuner] 58 | switch = off 59 | volume = off 60 | 61 | [Element FM] 62 | switch = off 63 | volume = off 64 | 65 | .include analog-input.conf.common 66 | .include analog-input-mic.conf.common 67 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/analog-input-mic.conf.common: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; Common element for all microphone inputs 17 | ; 18 | ; See analog-output.conf.common for an explanation on the directives 19 | 20 | [Properties] 21 | device.icon_name = audio-input-microphone 22 | 23 | [Element Line] 24 | switch = off 25 | volume = off 26 | 27 | [Element Line Boost] 28 | switch = off 29 | volume = off 30 | 31 | [Element Aux] 32 | switch = off 33 | volume = off 34 | 35 | [Element Video] 36 | switch = off 37 | volume = off 38 | 39 | [Element Mic/Line] 40 | switch = off 41 | volume = off 42 | 43 | [Element TV Tuner] 44 | switch = off 45 | volume = off 46 | 47 | [Element FM] 48 | switch = off 49 | volume = off 50 | 51 | [Element Inverted Internal Mic] 52 | switch = off 53 | volume = off 54 | 55 | [Element Mic Jack Mode] 56 | enumeration = select 57 | 58 | [Option Mic Jack Mode:Mic In] 59 | priority = 19 60 | name = input-microphone 61 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/analog-input-tvtuner.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; For devices where a 'TV Tuner' element exists 17 | ; 18 | ; See analog-output.conf.common for an explanation on the directives 19 | 20 | [General] 21 | priority = 70 22 | description-key = analog-input-video 23 | 24 | [Element Capture] 25 | switch = mute 26 | volume = merge 27 | override-map.1 = all 28 | override-map.2 = all-left,all-right 29 | 30 | [Element Mic] 31 | switch = off 32 | volume = off 33 | 34 | [Element Internal Mic] 35 | switch = off 36 | volume = off 37 | 38 | [Element Line] 39 | switch = off 40 | volume = off 41 | 42 | [Element Aux] 43 | switch = off 44 | volume = off 45 | 46 | [Element Video] 47 | switch = off 48 | volume = off 49 | 50 | [Element Mic/Line] 51 | switch = off 52 | volume = off 53 | 54 | [Element TV Tuner] 55 | required = any 56 | switch = mute 57 | volume = merge 58 | override-map.1 = all 59 | override-map.2 = all-left,all-right 60 | 61 | [Element FM] 62 | switch = off 63 | volume = off 64 | 65 | .include analog-input.conf.common 66 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/analog-input-video.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; For devices where a 'Video' element exists 17 | ; 18 | ; See analog-output.conf.common for an explanation on the directives 19 | 20 | [General] 21 | priority = 70 22 | 23 | [Element Capture] 24 | switch = mute 25 | volume = merge 26 | override-map.1 = all 27 | override-map.2 = all-left,all-right 28 | 29 | [Element Mic] 30 | switch = off 31 | volume = off 32 | 33 | [Element Internal Mic] 34 | switch = off 35 | volume = off 36 | 37 | [Element Line] 38 | switch = off 39 | volume = off 40 | 41 | [Element Aux] 42 | switch = off 43 | volume = off 44 | 45 | [Element Video] 46 | required = any 47 | switch = mute 48 | volume = merge 49 | override-map.1 = all 50 | override-map.2 = all-left,all-right 51 | 52 | [Element Mic/Line] 53 | switch = off 54 | volume = off 55 | 56 | [Element TV Tuner] 57 | switch = off 58 | volume = off 59 | 60 | [Element FM] 61 | switch = off 62 | volume = off 63 | 64 | .include analog-input.conf.common 65 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-0.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 3 | priority = 59 4 | eld-device = 3 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=3] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-1.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 2 3 | priority = 58 4 | eld-device = 7 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=7] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-2.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 3 3 | priority = 57 4 | eld-device = 8 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=8] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-3.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 4 3 | priority = 56 4 | eld-device = 9 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=9] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-4.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 5 3 | priority = 55 4 | eld-device = 10 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=10] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-5.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 6 3 | priority = 54 4 | eld-device = 11 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=11] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-6.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 7 3 | priority = 53 4 | eld-device = 12 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=12] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/hdmi-output-7.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | description = HDMI / DisplayPort 8 3 | priority = 52 4 | eld-device = 13 5 | 6 | [Properties] 7 | device.icon_name = video-display 8 | 9 | [Jack HDMI/DP,pcm=13] 10 | required = ignore 11 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/paths/iec958-stereo-output.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | 17 | [Element IEC958] 18 | switch = mute 19 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/profile-sets/kinect-audio.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; Audio profile for the Microsoft Kinect Sensor device in UAC mode. 17 | ; 18 | ; Copyright (C) 2011 Antonio Ospite 19 | ; 20 | ; This device has an array of four microphones, and no playback capability. 21 | ; 22 | ; See default.conf for an explanation on the directives used here. 23 | 24 | [General] 25 | auto-profiles = no 26 | 27 | [Mapping input-4-channels] 28 | device-strings = hw:%f 29 | channel-map = front-left,front-right,rear-left,rear-right 30 | description = 4 Channels Input 31 | direction = input 32 | priority = 5 33 | 34 | [Profile input:mic-array] 35 | description = Microphone Array 36 | input-mappings = input-4-channels 37 | priority = 2 38 | skip-probe = yes 39 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/profile-sets/native-instruments-traktor-audio2.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as 5 | # published by the Free Software Foundation; either version 2.1 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ; Native Instruments Traktor Audio 2 17 | ; 18 | ; This card has two stereo pairs of output. 19 | ; 20 | ; See default.conf for an explanation on the directives used here. 21 | 22 | [General] 23 | auto-profiles = no 24 | 25 | [Mapping analog-stereo-a] 26 | description = Analog Stereo Channel A 27 | device-strings = hw:%f,0,0 28 | channel-map = left,right 29 | direction = output 30 | 31 | [Mapping analog-stereo-b] 32 | description = Analog Stereo Channel B 33 | device-strings = hw:%f,0,1 34 | channel-map = left,right 35 | direction = output 36 | 37 | [Profile output:analog-stereo-a] 38 | description = Analog Stereo Output Channel A 39 | output-mappings = analog-stereo-a 40 | priority = 60 41 | skip-probe = yes 42 | 43 | [Profile output:analog-stereo-b] 44 | description = Analog Stereo Output Channel B 45 | output-mappings = analog-stereo-b 46 | priority = 50 47 | skip-probe = yes 48 | 49 | [Profile analog-stereo-all] 50 | description = Analog Stereo Output Channels A & B 51 | output-mappings = analog-stereo-a analog-stereo-b 52 | priority = 100 53 | skip-probe = yes 54 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/samples/Brooktree Bt878--Bt87x: -------------------------------------------------------------------------------- 1 | Simple mixer control 'FM',0 2 | Capabilities: cswitch cswitch-joined cswitch-exclusive 3 | Capture exclusive group: 0 4 | Capture channels: Mono 5 | Mono: Capture [off] 6 | Simple mixer control 'Mic/Line',0 7 | Capabilities: cswitch cswitch-joined cswitch-exclusive 8 | Capture exclusive group: 0 9 | Capture channels: Mono 10 | Mono: Capture [off] 11 | Simple mixer control 'Capture',0 12 | Capabilities: cvolume cvolume-joined 13 | Capture channels: Mono 14 | Limits: Capture 0 - 15 15 | Mono: Capture 13 [87%] 16 | Simple mixer control 'Capture Boost',0 17 | Capabilities: pswitch pswitch-joined 18 | Playback channels: Mono 19 | Mono: Playback [on] 20 | Simple mixer control 'TV Tuner',0 21 | Capabilities: cswitch cswitch-joined cswitch-exclusive 22 | Capture exclusive group: 0 23 | Capture channels: Mono 24 | Mono: Capture [on] 25 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/samples/HDA ATI HDMI--ATI R6xx HDMI: -------------------------------------------------------------------------------- 1 | Simple mixer control 'IEC958',0 2 | Capabilities: pswitch pswitch-joined 3 | Playback channels: Mono 4 | Mono: Playback [on] 5 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/samples/Logitech USB Speaker--USB Mixer: -------------------------------------------------------------------------------- 1 | Simple mixer control 'Bass',0 2 | Capabilities: volume volume-joined 3 | Playback channels: Mono 4 | Capture channels: Mono 5 | Limits: 0 - 48 6 | Mono: 22 [46%] 7 | Simple mixer control 'Bass Boost',0 8 | Capabilities: pswitch pswitch-joined 9 | Playback channels: Mono 10 | Mono: Playback [off] 11 | Simple mixer control 'Treble',0 12 | Capabilities: volume volume-joined 13 | Playback channels: Mono 14 | Capture channels: Mono 15 | Limits: 0 - 48 16 | Mono: 25 [52%] 17 | Simple mixer control 'PCM',0 18 | Capabilities: pvolume pswitch pswitch-joined 19 | Playback channels: Front Left - Front Right 20 | Limits: Playback 0 - 44 21 | Mono: 22 | Front Left: Playback 10 [23%] [-31.00dB] [on] 23 | Front Right: Playback 10 [23%] [-31.00dB] [on] 24 | Simple mixer control 'Auto Gain Control',0 25 | Capabilities: pswitch pswitch-joined 26 | Playback channels: Mono 27 | Mono: Playback [off] 28 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/samples/USB Audio--USB Mixer: -------------------------------------------------------------------------------- 1 | Simple mixer control 'Master',0 2 | Capabilities: pvolume pvolume-joined pswitch pswitch-joined 3 | Playback channels: Mono 4 | Limits: Playback 0 - 255 5 | Mono: Playback 105 [41%] [-28.97dB] [on] 6 | Simple mixer control 'Line',0 7 | Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined 8 | Playback channels: Front Left - Front Right 9 | Capture channels: Front Left - Front Right 10 | Limits: Playback 0 - 255 Capture 0 - 128 11 | Front Left: Playback 191 [75%] [34.38dB] [off] Capture 0 [0%] [0.18dB] [off] 12 | Front Right: Playback 191 [75%] [34.38dB] [off] Capture 0 [0%] [0.18dB] [off] 13 | Simple mixer control 'Mic',0 14 | Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive 15 | Capture exclusive group: 0 16 | Playback channels: Mono 17 | Capture channels: Mono 18 | Limits: Playback 0 - 255 Capture 0 - 128 19 | Mono: Playback 191 [75%] [34.38dB] [off] Capture 0 [0%] [0.18dB] [on] 20 | Simple mixer control 'Mic Capture',0 21 | Capabilities: pswitch pswitch-joined 22 | Playback channels: Mono 23 | Mono: Playback [off] 24 | Simple mixer control 'IEC958 In',0 25 | Capabilities: cswitch cswitch-joined 26 | Capture channels: Mono 27 | Mono: Capture [off] 28 | Simple mixer control 'Input 1',0 29 | Capabilities: cswitch cswitch-joined cswitch-exclusive 30 | Capture exclusive group: 0 31 | Capture channels: Mono 32 | Mono: Capture [off] 33 | Simple mixer control 'Input 2',0 34 | Capabilities: cswitch cswitch-joined cswitch-exclusive 35 | Capture exclusive group: 0 36 | Capture channels: Mono 37 | Mono: Capture [off] 38 | -------------------------------------------------------------------------------- /src/modules/alsa/mixer/samples/USB Device 0x46d:0x9a4--USB Mixer: -------------------------------------------------------------------------------- 1 | Simple mixer control 'Mic',0 2 | Capabilities: cvolume cvolume-joined cswitch cswitch-joined 3 | Capture channels: Mono 4 | Limits: Capture 0 - 3072 5 | Mono: Capture 1536 [50%] [23.00dB] [on] 6 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-card-profile.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacecardprofilehfoo 2 | #define foodbusifacecardprofilehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.CardProfile. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/CardProfile/ 26 | * for the CardProfile interface documentation. 27 | */ 28 | 29 | #include 30 | 31 | #include "iface-card.h" 32 | 33 | #define PA_DBUSIFACE_CARD_PROFILE_INTERFACE PA_DBUS_CORE_INTERFACE ".CardProfile" 34 | 35 | typedef struct pa_dbusiface_card_profile pa_dbusiface_card_profile; 36 | 37 | pa_dbusiface_card_profile *pa_dbusiface_card_profile_new( 38 | pa_dbusiface_card *card, 39 | pa_core *core, 40 | pa_card_profile *profile, 41 | uint32_t idx); 42 | void pa_dbusiface_card_profile_free(pa_dbusiface_card_profile *p); 43 | 44 | const char *pa_dbusiface_card_profile_get_path(pa_dbusiface_card_profile *p); 45 | const char *pa_dbusiface_card_profile_get_name(pa_dbusiface_card_profile *p); 46 | pa_card_profile *pa_dbusiface_card_profile_get_profile(pa_dbusiface_card_profile *p); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-card.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacecardhfoo 2 | #define foodbusifacecardhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.Card. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Card/ 26 | * for the Card interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "iface-core.h" 33 | 34 | #define PA_DBUSIFACE_CARD_INTERFACE PA_DBUS_CORE_INTERFACE ".Card" 35 | 36 | typedef struct pa_dbusiface_card pa_dbusiface_card; 37 | 38 | pa_dbusiface_card *pa_dbusiface_card_new(pa_dbusiface_core *core, pa_card *card); 39 | void pa_dbusiface_card_free(pa_dbusiface_card *c); 40 | 41 | const char *pa_dbusiface_card_get_path(pa_dbusiface_card *c); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-client.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifaceclienthfoo 2 | #define foodbusifaceclienthfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.Client. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Client/ 26 | * for the Client interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "iface-core.h" 33 | 34 | #define PA_DBUSIFACE_CLIENT_INTERFACE PA_DBUS_CORE_INTERFACE ".Client" 35 | 36 | typedef struct pa_dbusiface_client pa_dbusiface_client; 37 | 38 | pa_dbusiface_client *pa_dbusiface_client_new(pa_dbusiface_core *core, pa_client *client); 39 | void pa_dbusiface_client_free(pa_dbusiface_client *c); 40 | 41 | const char *pa_dbusiface_client_get_path(pa_dbusiface_client *c); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-device-port.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacedeviceporthfoo 2 | #define foodbusifacedeviceporthfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.DevicePort. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/DevicePort/ 26 | * for the DevicePort interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "iface-device.h" 33 | 34 | #define PA_DBUSIFACE_DEVICE_PORT_INTERFACE PA_DBUS_CORE_INTERFACE ".DevicePort" 35 | 36 | typedef struct pa_dbusiface_device_port pa_dbusiface_device_port; 37 | 38 | pa_dbusiface_device_port *pa_dbusiface_device_port_new( 39 | pa_dbusiface_device *device, 40 | pa_core *core, 41 | pa_device_port *port, 42 | uint32_t idx); 43 | void pa_dbusiface_device_port_free(pa_dbusiface_device_port *p); 44 | 45 | const char *pa_dbusiface_device_port_get_path(pa_dbusiface_device_port *p); 46 | const char *pa_dbusiface_device_port_get_name(pa_dbusiface_device_port *p); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-memstats.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacememstatshfoo 2 | #define foodbusifacememstatshfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.Memstats. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Memstats/ 26 | * for the Memstats interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "iface-core.h" 33 | 34 | #define PA_DBUSIFACE_MEMSTATS_INTERFACE PA_DBUS_CORE_INTERFACE ".Memstats" 35 | 36 | typedef struct pa_dbusiface_memstats pa_dbusiface_memstats; 37 | 38 | pa_dbusiface_memstats *pa_dbusiface_memstats_new(pa_dbusiface_core *dbus_core, pa_core *core); 39 | void pa_dbusiface_memstats_free(pa_dbusiface_memstats *m); 40 | 41 | const char *pa_dbusiface_memstats_get_path(pa_dbusiface_memstats *m); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-module.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacemodulehfoo 2 | #define foodbusifacemodulehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.Module. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Module/ 26 | * for the Module interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "iface-core.h" 33 | 34 | #define PA_DBUSIFACE_MODULE_INTERFACE PA_DBUS_CORE_INTERFACE ".Module" 35 | 36 | typedef struct pa_dbusiface_module pa_dbusiface_module; 37 | 38 | pa_dbusiface_module *pa_dbusiface_module_new(pa_module *module); 39 | void pa_dbusiface_module_free(pa_dbusiface_module *m); 40 | 41 | const char *pa_dbusiface_module_get_path(pa_dbusiface_module *m); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-sample.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacesamplehfoo 2 | #define foodbusifacesamplehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.Sample. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Sample/ 26 | * for the Sample interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "iface-core.h" 33 | 34 | #define PA_DBUSIFACE_SAMPLE_INTERFACE PA_DBUS_CORE_INTERFACE ".Sample" 35 | 36 | typedef struct pa_dbusiface_sample pa_dbusiface_sample; 37 | 38 | pa_dbusiface_sample *pa_dbusiface_sample_new(pa_dbusiface_core *core, pa_scache_entry *sample); 39 | void pa_dbusiface_sample_free(pa_dbusiface_sample *c); 40 | 41 | const char *pa_dbusiface_sample_get_path(pa_dbusiface_sample *c); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/modules/dbus/iface-stream.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbusifacestreamhfoo 2 | #define foodbusifacestreamhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Tanu Kaskinen 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* This object implements the D-Bus interface org.PulseAudio.Core1.Stream. 24 | * 25 | * See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Stream/ 26 | * for the Stream interface documentation. 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include "iface-core.h" 34 | 35 | #define PA_DBUSIFACE_STREAM_INTERFACE PA_DBUS_CORE_INTERFACE ".Stream" 36 | 37 | typedef struct pa_dbusiface_stream pa_dbusiface_stream; 38 | 39 | pa_dbusiface_stream *pa_dbusiface_stream_new_playback(pa_dbusiface_core *core, pa_sink_input *sink_input); 40 | pa_dbusiface_stream *pa_dbusiface_stream_new_record(pa_dbusiface_core *core, pa_source_output *source_output); 41 | void pa_dbusiface_stream_free(pa_dbusiface_stream *s); 42 | 43 | const char *pa_dbusiface_stream_get_path(pa_dbusiface_stream *s); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/modules/echo-cancel/adrian-aec.orc: -------------------------------------------------------------------------------- 1 | .function update_tap_weights 2 | .dest 4 w float 3 | .source 4 xf float 4 | .floatparam 4 mikro_ef 5 | .temp 4 tmp float 6 | 7 | mulf tmp, mikro_ef, xf 8 | addf w, w, tmp 9 | -------------------------------------------------------------------------------- /src/modules/echo-cancel/adrian-license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) DFS Deutsche Flugsicherung (2004). All Rights Reserved. 2 | 3 | You are allowed to use this source code in any open source or closed 4 | source software you want. You are allowed to use the algorithms for a 5 | hardware solution. You are allowed to modify the source code. 6 | You are not allowed to remove the name of the author from this memo or 7 | from the source code files. You are not allowed to monopolize the 8 | source code or the algorithms behind the source code as your 9 | intellectual property. This source code is free of royalty and comes 10 | with no warranty. 11 | 12 | --- The following does not apply to the PulseAudio module --- 13 | 14 | Please see g711/gen-lic.txt for the ITU-T G.711 codec copyright. 15 | Please see gsm/gen-lic.txt for the ITU-T GSM codec copyright. 16 | Please see ilbc/COPYRIGHT and ilbc/NOTICE for the IETF iLBC codec 17 | copyright. 18 | -------------------------------------------------------------------------------- /src/modules/echo-cancel/adrian.h: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2010 Arun Raghavan 5 | 6 | The actual implementation is taken from the sources at 7 | http://andreadrian.de/intercom/ - for the license, look for 8 | adrian-license.txt in the same directory as this file. 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | /* Forward declarations */ 25 | 26 | typedef struct AEC AEC; 27 | 28 | AEC* AEC_init(int RATE, int have_vector); 29 | void AEC_done(AEC *a); 30 | int AEC_doAEC(AEC *a, int d_, int x_); 31 | -------------------------------------------------------------------------------- /src/modules/module-defs.h.m4: -------------------------------------------------------------------------------- 1 | changecom(`/*', `*/')dnl 2 | define(`module_name', patsubst(patsubst(patsubst(fname, `-symdef.h$'), `^.*/'), `[^0-9a-zA-Z]', `_'))dnl 3 | define(`c_symbol', patsubst(module_name, `[^0-9a-zA-Z]', `_'))dnl 4 | define(`c_macro', patsubst(module_name, `[^0-9a-zA-Z]', `'))dnl 5 | define(`incmacro', `foo'c_macro`symdeffoo')dnl 6 | define(`gen_symbol', `#define $1 'module_name`_LTX_$1')dnl 7 | #ifndef incmacro 8 | #define incmacro 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | gen_symbol(pa__init) 15 | gen_symbol(pa__done) 16 | gen_symbol(pa__get_author) 17 | gen_symbol(pa__get_description) 18 | gen_symbol(pa__get_usage) 19 | gen_symbol(pa__get_version) 20 | gen_symbol(pa__get_deprecated) 21 | gen_symbol(pa__load_once) 22 | gen_symbol(pa__get_n_used) 23 | 24 | int pa__init(pa_module*m); 25 | void pa__done(pa_module*m); 26 | int pa__get_n_used(pa_module*m); 27 | 28 | const char* pa__get_author(void); 29 | const char* pa__get_description(void); 30 | const char* pa__get_usage(void); 31 | const char* pa__get_version(void); 32 | const char* pa__get_deprecated(void); 33 | bool pa__load_once(void); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/modules/module-role-cork.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2009 Lennart Poettering 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "module-role-cork-symdef.h" 29 | 30 | PA_MODULE_AUTHOR("Lennart Poettering"); 31 | PA_MODULE_DESCRIPTION("Mute & cork streams with certain roles while others exist"); 32 | PA_MODULE_VERSION(PACKAGE_VERSION); 33 | PA_MODULE_LOAD_ONCE(true); 34 | PA_MODULE_USAGE( 35 | "trigger_roles= " 36 | "cork_roles= " 37 | "global="); 38 | 39 | static const char* const valid_modargs[] = { 40 | "trigger_roles", 41 | "cork_roles", 42 | "global", 43 | NULL 44 | }; 45 | 46 | int pa__init(pa_module *m) { 47 | 48 | pa_assert(m); 49 | 50 | return pa_stream_interaction_init(m, valid_modargs); 51 | } 52 | 53 | void pa__done(pa_module *m) { 54 | 55 | pa_assert(m); 56 | 57 | pa_stream_interaction_done(m); 58 | } 59 | -------------------------------------------------------------------------------- /src/modules/oss/oss-util.h: -------------------------------------------------------------------------------- 1 | #ifndef fooossutilhfoo 2 | #define fooossutilhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | #include 26 | 27 | int pa_oss_open(const char *device, int *mode, int* pcaps); 28 | int pa_oss_auto_format(int fd, pa_sample_spec *ss); 29 | 30 | int pa_oss_set_fragments(int fd, int frags, int frag_size); 31 | 32 | int pa_oss_set_volume(int fd, unsigned long mixer, const pa_sample_spec *ss, const pa_cvolume *volume); 33 | int pa_oss_get_volume(int fd, unsigned long mixer, const pa_sample_spec *ss, pa_cvolume *volume); 34 | 35 | int pa_oss_get_hw_description(const char *dev, char *name, size_t l); 36 | 37 | int pa_oss_open_mixer_for_device(const char *device); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/modules/raop/raop-crypto.h: -------------------------------------------------------------------------------- 1 | #ifndef fooraopcryptofoo 2 | #define fooraopcryptofoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2013 Martin Blanchard 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 | USA. 23 | ***/ 24 | 25 | typedef struct pa_raop_secret pa_raop_secret; 26 | 27 | pa_raop_secret* pa_raop_secret_new(void); 28 | void pa_raop_secret_free(pa_raop_secret *s); 29 | 30 | char* pa_raop_secret_get_iv(pa_raop_secret *s); 31 | char* pa_raop_secret_get_key(pa_raop_secret *s); 32 | 33 | int pa_raop_aes_encrypt(pa_raop_secret *s, uint8_t *data, int len); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/modules/raop/raop-packet-buffer.h: -------------------------------------------------------------------------------- 1 | #ifndef fooraoppacketbufferfoo 2 | #define fooraoppacketbufferfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2013 Matthias Wabersich 8 | Copyright 2013 Hajime Fujita 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, write to the Free Software 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | USA. 24 | ***/ 25 | 26 | #include 27 | #include 28 | 29 | typedef struct pa_raop_packet_buffer pa_raop_packet_buffer; 30 | 31 | /* Allocates a new circular packet buffer, size: Maximum number of packets to store */ 32 | pa_raop_packet_buffer *pa_raop_packet_buffer_new(pa_mempool *mempool, const size_t size); 33 | void pa_raop_packet_buffer_free(pa_raop_packet_buffer *pb); 34 | 35 | void pa_raop_packet_buffer_reset(pa_raop_packet_buffer *pb, uint16_t seq); 36 | 37 | pa_memchunk *pa_raop_packet_buffer_prepare(pa_raop_packet_buffer *pb, uint16_t seq, const size_t size); 38 | pa_memchunk *pa_raop_packet_buffer_retrieve(pa_raop_packet_buffer *pb, uint16_t seq); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/modules/raop/raop-sink.h: -------------------------------------------------------------------------------- 1 | #ifndef fooraopsinkfoo 2 | #define fooraopsinkfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2013 Martin Blanchard 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 | USA. 23 | ***/ 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | pa_sink* pa_raop_sink_new(pa_module *m, pa_modargs *ma, const char *driver); 30 | 31 | void pa_raop_sink_free(pa_sink *s); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/modules/raop/raop-util.h: -------------------------------------------------------------------------------- 1 | #ifndef fooraoputilfoo 2 | #define fooraoputilfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2008 Colin Guthrie 8 | Copyright Kungliga Tekniska högskolan 9 | Copyright 2013 Martin Blanchard 10 | 11 | PulseAudio is free software; you can redistribute it and/or modify 12 | it under the terms of the GNU Lesser General Public License as published 13 | by the Free Software Foundation; either version 2.1 of the License, 14 | or (at your option) any later version. 15 | 16 | PulseAudio is distributed in the hope that it will be useful, but 17 | WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | General Public License for more details. 20 | 21 | You should have received a copy of the GNU Lesser General Public License 22 | along with PulseAudio; if not, see . 23 | ***/ 24 | 25 | /*** 26 | This file was originally inspired by a file developed by 27 | Kungliga Tekniska högskolan. 28 | ***/ 29 | 30 | int pa_raop_base64_encode(const void *data, int len, char **str); 31 | int pa_raop_base64_decode(const char *str, void *data); 32 | 33 | int pa_raop_md5_hash(const char *data, int len, char **str); 34 | 35 | int pa_raop_basic_response(const char *user, const char *pwd, char **str); 36 | int pa_raop_digest_response(const char *user, const char *realm, const char *password, 37 | const char *nonce, const char *uri, char **str); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/modules/reserve-wrap.h: -------------------------------------------------------------------------------- 1 | #ifndef fooreservewraphfoo 2 | #define fooreservewraphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | typedef struct pa_reserve_wrapper pa_reserve_wrapper; 27 | 28 | pa_reserve_wrapper* pa_reserve_wrapper_get(pa_core *c, const char *device_name); 29 | void pa_reserve_wrapper_unref(pa_reserve_wrapper *r); 30 | 31 | pa_hook* pa_reserve_wrapper_hook(pa_reserve_wrapper *r); 32 | 33 | void pa_reserve_wrapper_set_application_device_name(pa_reserve_wrapper *r, const char *name); 34 | 35 | typedef struct pa_reserve_monitor_wrapper pa_reserve_monitor_wrapper; 36 | 37 | pa_reserve_monitor_wrapper* pa_reserve_monitor_wrapper_get(pa_core *c, const char *device_name); 38 | void pa_reserve_monitor_wrapper_unref(pa_reserve_monitor_wrapper *m); 39 | 40 | pa_hook* pa_reserve_monitor_wrapper_hook(pa_reserve_monitor_wrapper *m); 41 | bool pa_reserve_monitor_wrapper_busy(pa_reserve_monitor_wrapper *m); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/modules/rtp/headerlist.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulseheaderlisthfoo 2 | #define foopulseheaderlisthfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2008 Colin Guthrie 8 | Copyright 2007 Lennart Poettering 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as 12 | published by the Free Software Foundation; either version 2.1 of the 13 | License, or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | Lesser General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public 21 | License along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | typedef struct pa_headerlist pa_headerlist; 27 | 28 | pa_headerlist* pa_headerlist_new(void); 29 | void pa_headerlist_free(pa_headerlist* p); 30 | 31 | int pa_headerlist_puts(pa_headerlist *p, const char *key, const char *value); 32 | int pa_headerlist_putsappend(pa_headerlist *p, const char *key, const char *value); 33 | 34 | const char *pa_headerlist_gets(pa_headerlist *p, const char *key); 35 | 36 | int pa_headerlist_remove(pa_headerlist *p, const char *key); 37 | 38 | const char *pa_headerlist_iterate(pa_headerlist *p, void **state); 39 | 40 | char *pa_headerlist_to_string(pa_headerlist *p); 41 | 42 | int pa_headerlist_contains(pa_headerlist *p, const char *key); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/modules/rtp/sap.h: -------------------------------------------------------------------------------- 1 | #ifndef foosaphfoo 2 | #define foosaphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | typedef struct pa_sap_context { 30 | int fd; 31 | char *sdp_data; 32 | 33 | uint16_t msg_id_hash; 34 | } pa_sap_context; 35 | 36 | pa_sap_context* pa_sap_context_init_send(pa_sap_context *c, int fd, char *sdp_data); 37 | void pa_sap_context_destroy(pa_sap_context *c); 38 | 39 | int pa_sap_send(pa_sap_context *c, bool goodbye); 40 | 41 | pa_sap_context* pa_sap_context_init_recv(pa_sap_context *c, int fd); 42 | int pa_sap_recv(pa_sap_context *c, bool *goodbye); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/modules/rtp/sdp.h: -------------------------------------------------------------------------------- 1 | #ifndef foosdphfoo 2 | #define foosdphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include 28 | 29 | #define PA_SDP_HEADER "v=0\n" 30 | 31 | typedef struct pa_sdp_info { 32 | char *origin; 33 | char *session_name; 34 | 35 | struct sockaddr_storage sa; 36 | socklen_t salen; 37 | 38 | pa_sample_spec sample_spec; 39 | uint8_t payload; 40 | } pa_sdp_info; 41 | 42 | char *pa_sdp_build(int af, const void *src, const void *dst, const char *name, uint16_t port, uint8_t payload, const pa_sample_spec *ss); 43 | 44 | pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *info, int is_goodbye); 45 | 46 | void pa_sdp_info_destroy(pa_sdp_info *i); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/modules/stream-interaction.h: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2015 Georg Chini 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | int pa_stream_interaction_init(pa_module *m, const char* const v_modargs[]); 21 | void pa_stream_interaction_done(pa_module *m); 22 | -------------------------------------------------------------------------------- /src/modules/udev-util.h: -------------------------------------------------------------------------------- 1 | #ifndef fooudevutilhfoo 2 | #define fooudevutilhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | int pa_udev_get_info(int card_idx, pa_proplist *p); 26 | char* pa_udev_get_property(int card_idx, const char *name); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/pulse/.gitignore: -------------------------------------------------------------------------------- 1 | version.h 2 | -------------------------------------------------------------------------------- /src/pulse/Makefile: -------------------------------------------------------------------------------- 1 | ../modules/Makefile -------------------------------------------------------------------------------- /src/pulse/cdecl.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecdeclhfoo 2 | #define foopulsecdeclhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /** \file 24 | * C++ compatibility support */ 25 | 26 | #ifdef __cplusplus 27 | /** If using C++ this macro enables C mode, otherwise does nothing */ 28 | #define PA_C_DECL_BEGIN extern "C" { 29 | /** If using C++ this macros switches back to C++ mode, otherwise does nothing */ 30 | #define PA_C_DECL_END } 31 | 32 | #else 33 | /** If using C++ this macro enables C mode, otherwise does nothing */ 34 | #define PA_C_DECL_BEGIN 35 | /** If using C++ this macros switches back to C++ mode, otherwise does nothing */ 36 | #define PA_C_DECL_END 37 | 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/pulse/client-conf-x11.h: -------------------------------------------------------------------------------- 1 | #ifndef fooclientconfx11hfoo 2 | #define fooclientconfx11hfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include "client-conf.h" 24 | 25 | /* Load client configuration data from X11, overwriting the current settings in 26 | * *c. */ 27 | int pa_client_conf_from_x11(pa_client_conf *c); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/pulse/client.conf.in: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ## Configuration file for PulseAudio clients. See pulse-client.conf(5) for 17 | ## more information. Default values are commented out. Use either ; or # for 18 | ## commenting. 19 | 20 | ; default-sink = 21 | ; default-source = 22 | ; default-server = 23 | ; default-dbus-server = 24 | 25 | ; autospawn = yes 26 | ; daemon-binary = @PA_BINARY@ 27 | ; extra-arguments = --log-target=syslog 28 | 29 | ; cookie-file = 30 | 31 | ; enable-shm = yes 32 | ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB 33 | 34 | ; auto-connect-localhost = no 35 | ; auto-connect-display = no 36 | -------------------------------------------------------------------------------- /src/pulse/direction.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2014 Intel Corporation 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #include "direction.h" 21 | 22 | #include 23 | 24 | int pa_direction_valid(pa_direction_t direction) { 25 | if (direction != PA_DIRECTION_INPUT 26 | && direction != PA_DIRECTION_OUTPUT 27 | && direction != (PA_DIRECTION_INPUT | PA_DIRECTION_OUTPUT)) 28 | return 0; 29 | 30 | return 1; 31 | } 32 | 33 | const char *pa_direction_to_string(pa_direction_t direction) { 34 | pa_init_i18n(); 35 | 36 | if (direction == PA_DIRECTION_INPUT) 37 | return _("input"); 38 | if (direction == PA_DIRECTION_OUTPUT) 39 | return _("output"); 40 | if (direction == (PA_DIRECTION_INPUT | PA_DIRECTION_OUTPUT)) 41 | return _("bidirectional"); 42 | 43 | return _("invalid"); 44 | } 45 | -------------------------------------------------------------------------------- /src/pulse/direction.h: -------------------------------------------------------------------------------- 1 | #ifndef foodirectionhfoo 2 | #define foodirectionhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2014 Intel Corporation 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | /** \file 26 | * Utility functions for \ref pa_direction_t. */ 27 | 28 | /** Return non-zero if the given value is a valid direction (either input, 29 | * output or bidirectional). \since 6.0 */ 30 | int pa_direction_valid(pa_direction_t direction) PA_GCC_CONST; 31 | 32 | /** Return a textual representation of the direction. \since 6.0 */ 33 | const char *pa_direction_to_string(pa_direction_t direction); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/pulse/error.h: -------------------------------------------------------------------------------- 1 | #ifndef fooerrorhfoo 2 | #define fooerrorhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | #include 26 | 27 | /** \file 28 | * Error management */ 29 | 30 | PA_C_DECL_BEGIN 31 | 32 | /** Return a human readable error message for the specified numeric error code */ 33 | const char* pa_strerror(int error); 34 | 35 | PA_C_DECL_END 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/pulse/fork-detect.h: -------------------------------------------------------------------------------- 1 | #ifndef fooforkdetecthfoo 2 | #define fooforkdetecthfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | int pa_detect_fork(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/pulse/rtclock.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2004-2006 Lennart Poettering 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as 8 | published by the Free Software Foundation; either version 2.1 of the 9 | License, or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include 25 | 26 | #include 27 | 28 | #include 29 | 30 | #include "rtclock.h" 31 | 32 | pa_usec_t pa_rtclock_now(void) { 33 | struct timeval tv; 34 | 35 | return pa_timeval_load(pa_rtclock_get(&tv)); 36 | } 37 | -------------------------------------------------------------------------------- /src/pulse/rtclock.h: -------------------------------------------------------------------------------- 1 | #ifndef foortclockfoo 2 | #define foortclockfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2009 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | /** \file 27 | * Monotonic clock utilities. */ 28 | 29 | PA_C_DECL_BEGIN 30 | 31 | /** Return the current monotonic system time in usec, if such a clock 32 | * is available. If it is not available this will return the 33 | * wallclock time instead. \since 0.9.16 */ 34 | pa_usec_t pa_rtclock_now(void); 35 | 36 | PA_C_DECL_END 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/pulsecore/Makefile: -------------------------------------------------------------------------------- 1 | ../modules/Makefile -------------------------------------------------------------------------------- /src/pulsecore/arpa-inet.h: -------------------------------------------------------------------------------- 1 | #ifndef fooarpa_inethfoo 2 | #define fooarpa_inethfoo 3 | 4 | #if defined(HAVE_ARPA_INET_H) 5 | 6 | #include 7 | 8 | #elif defined(OS_IS_WIN32) 9 | 10 | /* On Windows winsock2.h (here included via pulsecore/socket.h) provides most of the functionality of arpa/inet.h, except for 11 | * the inet_ntop and inet_pton functions, which are implemented here. */ 12 | 13 | #include 14 | 15 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); 16 | 17 | int inet_pton(int af, const char *src, void *dst); 18 | 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/pulsecore/auth-cookie.h: -------------------------------------------------------------------------------- 1 | #ifndef fooauthcookiehfoo 2 | #define fooauthcookiehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2008 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | typedef struct pa_auth_cookie pa_auth_cookie; 26 | 27 | pa_auth_cookie* pa_auth_cookie_get(pa_core *c, const char *cn, bool create, size_t size); 28 | pa_auth_cookie* pa_auth_cookie_create(pa_core *c, const void *data, size_t size); 29 | pa_auth_cookie* pa_auth_cookie_ref(pa_auth_cookie *c); 30 | void pa_auth_cookie_unref(pa_auth_cookie *c); 31 | 32 | const uint8_t* pa_auth_cookie_read(pa_auth_cookie *, size_t size); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/pulsecore/authkey.h: -------------------------------------------------------------------------------- 1 | #ifndef fooauthkeyhfoo 2 | #define fooauthkeyhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | int pa_authkey_load(const char *fn, bool create, void *data, size_t length); 26 | 27 | int pa_authkey_save(const char *path, const void *data, size_t length); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/pulsecore/avahi-wrap.h: -------------------------------------------------------------------------------- 1 | #ifndef fooavahiwrapperhfoo 2 | #define fooavahiwrapperhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | AvahiPoll* pa_avahi_poll_new(pa_mainloop_api *api); 28 | void pa_avahi_poll_free(AvahiPoll *p); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/pulsecore/bitset.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2009 Lennart Poettering 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include 25 | 26 | #include 27 | 28 | #include "bitset.h" 29 | 30 | void pa_bitset_set(pa_bitset_t *b, unsigned k, bool v) { 31 | pa_assert(b); 32 | 33 | if (v) 34 | b[k >> 5] |= 1 << (k & 31); 35 | else 36 | b[k >> 5] &= ~((uint32_t) (1 << (k & 31))); 37 | } 38 | 39 | bool pa_bitset_get(const pa_bitset_t *b, unsigned k) { 40 | return !!(b[k >> 5] & (1 << (k & 31))); 41 | } 42 | 43 | bool pa_bitset_equals(const pa_bitset_t *b, unsigned n, ...) { 44 | va_list ap; 45 | pa_bitset_t *a; 46 | bool equal; 47 | 48 | a = pa_xnew0(pa_bitset_t, PA_BITSET_ELEMENTS(n)); 49 | 50 | va_start(ap, n); 51 | for (;;) { 52 | int j = va_arg(ap, int); 53 | 54 | if (j < 0) 55 | break; 56 | 57 | pa_bitset_set(a, j, true); 58 | } 59 | va_end(ap); 60 | 61 | equal = memcmp(a, b, PA_BITSET_SIZE(n)) == 0; 62 | pa_xfree(a); 63 | 64 | return equal; 65 | } 66 | -------------------------------------------------------------------------------- /src/pulsecore/bitset.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecorebitsethfoo 2 | #define foopulsecorebitsethfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | #define PA_BITSET_ELEMENTS(n) (((n)+31)/32) 27 | #define PA_BITSET_SIZE(n) (PA_BITSET_ELEMENTS(n)*4) 28 | 29 | typedef uint32_t pa_bitset_t; 30 | 31 | void pa_bitset_set(pa_bitset_t *b, unsigned k, bool v); 32 | bool pa_bitset_get(const pa_bitset_t *b, unsigned k); 33 | bool pa_bitset_equals(const pa_bitset_t *b, unsigned n, ...); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/pulsecore/cli-command.h: -------------------------------------------------------------------------------- 1 | #ifndef fooclicommandhfoo 2 | #define fooclicommandhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | /* Execute a single CLI command. Write the results to the string 27 | * buffer *buf. If *fail is non-zero the function will return -1 when 28 | * one or more of the executed commands failed. *fail 29 | * may be modified by the function call. */ 30 | int pa_cli_command_execute_line(pa_core *c, const char *s, pa_strbuf *buf, bool *fail); 31 | 32 | /* Execute a whole file of CLI commands */ 33 | int pa_cli_command_execute_file(pa_core *c, const char *fn, pa_strbuf *buf, bool *fail); 34 | 35 | /* Execute a whole file of CLI commands */ 36 | int pa_cli_command_execute_file_stream(pa_core *c, FILE *f, pa_strbuf *buf, bool *fail); 37 | 38 | /* Split the specified string into lines and run pa_cli_command_execute_line() for each. */ 39 | int pa_cli_command_execute(pa_core *c, const char *s, pa_strbuf *buf, bool *fail); 40 | 41 | /* Same as pa_cli_command_execute_line() but also take ifstate var. */ 42 | int pa_cli_command_execute_line_stateful(pa_core *c, const char *s, pa_strbuf *buf, bool *fail, int *ifstate); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/pulsecore/cli-text.h: -------------------------------------------------------------------------------- 1 | #ifndef fooclitexthfoo 2 | #define fooclitexthfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | /* Some functions to generate pretty formatted listings of 26 | * entities. The returned strings have to be freed manually. */ 27 | 28 | char *pa_sink_input_list_to_string(pa_core *c); 29 | char *pa_source_output_list_to_string(pa_core *c); 30 | char *pa_sink_list_to_string(pa_core *core); 31 | char *pa_source_list_to_string(pa_core *c); 32 | char *pa_card_list_to_string(pa_core *c); 33 | char *pa_client_list_to_string(pa_core *c); 34 | char *pa_module_list_to_string(pa_core *c); 35 | char *pa_scache_list_to_string(pa_core *c); 36 | 37 | char *pa_full_status_string(pa_core *c); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/pulsecore/cli.h: -------------------------------------------------------------------------------- 1 | #ifndef fooclihfoo 2 | #define fooclihfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | typedef struct pa_cli pa_cli; 28 | 29 | typedef void (*pa_cli_eof_cb_t)(pa_cli *c, void *userdata); 30 | 31 | /* Create a new command line session on the specified io channel owned by the specified module */ 32 | pa_cli* pa_cli_new(pa_core *core, pa_iochannel *io, pa_module *m); 33 | void pa_cli_free(pa_cli *cli); 34 | 35 | /* Set a callback function that is called whenever the command line session is terminated */ 36 | void pa_cli_set_eof_callback(pa_cli *cli, pa_cli_eof_cb_t cb, void *userdata); 37 | 38 | pa_module *pa_cli_get_module(pa_cli *c); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/pulsecore/core-error.h: -------------------------------------------------------------------------------- 1 | #ifndef foocoreerrorhfoo 2 | #define foocoreerrorhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | /** \file 27 | * Error management */ 28 | 29 | PA_C_DECL_BEGIN 30 | 31 | /** A wrapper around the standard strerror() function that converts the 32 | * string to UTF-8. The function is thread safe but the returned string is 33 | * only guaranteed to exist until the thread exits or pa_cstrerror() is 34 | * called again from the same thread. */ 35 | const char* pa_cstrerror(int errnum); 36 | 37 | PA_C_DECL_END 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/pulsecore/core-rtclock.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsertclockhfoo 2 | #define foopulsertclockhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | struct timeval; 27 | 28 | /* Something like pulse/timeval.h but based on CLOCK_MONOTONIC */ 29 | 30 | struct timeval *pa_rtclock_get(struct timeval *ts); 31 | 32 | pa_usec_t pa_rtclock_age(const struct timeval *tv); 33 | bool pa_rtclock_hrtimer(void); 34 | void pa_rtclock_hrtimer_enable(void); 35 | 36 | /* timer with a resolution better than this are considered high-resolution */ 37 | #define PA_HRTIMER_THRESHOLD_USEC 10 38 | 39 | /* bit to set in tv.tv_usec to mark that the timeval is in monotonic time */ 40 | #define PA_TIMEVAL_RTCLOCK ((time_t) (1LU << 30)) 41 | 42 | struct timeval* pa_rtclock_from_wallclock(struct timeval *tv); 43 | 44 | #ifdef HAVE_CLOCK_GETTIME 45 | struct timespec; 46 | 47 | pa_usec_t pa_timespec_load(const struct timespec *ts); 48 | struct timespec* pa_timespec_store(struct timespec *ts, pa_usec_t v); 49 | #endif 50 | 51 | struct timeval* pa_timeval_rtstore(struct timeval *tv, pa_usec_t v, bool rtclock); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/pulsecore/core-subscribe.h: -------------------------------------------------------------------------------- 1 | #ifndef foocoresubscribehfoo 2 | #define foocoresubscribehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | typedef struct pa_subscription pa_subscription; 24 | typedef struct pa_subscription_event pa_subscription_event; 25 | 26 | #include 27 | #include 28 | 29 | typedef void (*pa_subscription_cb_t)(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata); 30 | 31 | pa_subscription* pa_subscription_new(pa_core *c, pa_subscription_mask_t m, pa_subscription_cb_t cb, void *userdata); 32 | void pa_subscription_free(pa_subscription*s); 33 | void pa_subscription_free_all(pa_core *c); 34 | 35 | void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t idx); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/pulsecore/cpu-arm.h: -------------------------------------------------------------------------------- 1 | #ifndef foocpuarmhfoo 2 | #define foocpuarmhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2009 Wim Taymans 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | #include 26 | 27 | #ifndef PACKAGE 28 | #error "Please include config.h before including this file!" 29 | #endif 30 | 31 | typedef enum pa_cpu_arm_flag { 32 | PA_CPU_ARM_V6 = (1 << 0), 33 | PA_CPU_ARM_V7 = (1 << 1), 34 | PA_CPU_ARM_VFP = (1 << 2), 35 | PA_CPU_ARM_EDSP = (1 << 3), 36 | PA_CPU_ARM_NEON = (1 << 4), 37 | PA_CPU_ARM_VFPV3 = (1 << 5), 38 | PA_CPU_ARM_CORTEX_A8 = (1 << 6), 39 | } pa_cpu_arm_flag_t; 40 | 41 | void pa_cpu_get_arm_flags(pa_cpu_arm_flag_t *flags); 42 | bool pa_cpu_init_arm(pa_cpu_arm_flag_t *flags); 43 | 44 | /* some optimized functions */ 45 | void pa_volume_func_init_arm(pa_cpu_arm_flag_t flags); 46 | 47 | #ifdef HAVE_NEON 48 | void pa_convert_func_init_neon(pa_cpu_arm_flag_t flags); 49 | void pa_mix_func_init_neon(pa_cpu_arm_flag_t flags); 50 | void pa_remap_func_init_neon(pa_cpu_arm_flag_t flags); 51 | #endif 52 | 53 | #endif /* foocpuarmhfoo */ 54 | -------------------------------------------------------------------------------- /src/pulsecore/cpu-orc.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2010 Arun Raghavan 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include "cpu-orc.h" 25 | 26 | bool pa_cpu_init_orc(pa_cpu_info cpu_info) { 27 | #ifndef DISABLE_ORC 28 | /* Update these as we test on more architectures */ 29 | pa_cpu_x86_flag_t x86_want_flags = PA_CPU_X86_MMX | PA_CPU_X86_SSE | PA_CPU_X86_SSE2 | PA_CPU_X86_SSE3 | PA_CPU_X86_SSSE3 | PA_CPU_X86_SSE4_1 | PA_CPU_X86_SSE4_2; 30 | 31 | /* Enable Orc svolume optimizations */ 32 | if ((cpu_info.cpu_type == PA_CPU_X86) && (cpu_info.flags.x86 & x86_want_flags)) { 33 | pa_volume_func_init_orc(); 34 | return true; 35 | } 36 | #endif 37 | 38 | return false; 39 | } 40 | -------------------------------------------------------------------------------- /src/pulsecore/cpu-orc.h: -------------------------------------------------------------------------------- 1 | #ifndef foocpuorchfoo 2 | #define foocpuorchfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2010 Arun Raghavan 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | /* Orc-optimised bits */ 26 | 27 | bool pa_cpu_init_orc(pa_cpu_info cpu_info); 28 | 29 | void pa_volume_func_init_orc(void); 30 | 31 | #endif /* foocpuorchfoo */ 32 | -------------------------------------------------------------------------------- /src/pulsecore/cpu.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2014 Peter Meerwald 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | ***/ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | #include 19 | #endif 20 | 21 | #include "cpu.h" 22 | #include "cpu-orc.h" 23 | 24 | void pa_cpu_init(pa_cpu_info *cpu_info) { 25 | cpu_info->cpu_type = PA_CPU_UNDEFINED; 26 | /* don't force generic code, used for testing only */ 27 | cpu_info->force_generic_code = false; 28 | if (!getenv("PULSE_NO_SIMD")) { 29 | if (pa_cpu_init_x86(&cpu_info->flags.x86)) 30 | cpu_info->cpu_type = PA_CPU_X86; 31 | else if (pa_cpu_init_arm(&cpu_info->flags.arm)) 32 | cpu_info->cpu_type = PA_CPU_ARM; 33 | pa_cpu_init_orc(*cpu_info); 34 | } 35 | 36 | pa_remap_func_init(cpu_info); 37 | pa_mix_func_init(cpu_info); 38 | } 39 | -------------------------------------------------------------------------------- /src/pulsecore/cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef foocpuhfoo 2 | #define foocpuhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2010 Arun Raghavan 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | typedef enum { 27 | PA_CPU_UNDEFINED = 0, 28 | PA_CPU_X86, 29 | PA_CPU_ARM, 30 | } pa_cpu_type_t; 31 | 32 | typedef struct pa_cpu_info pa_cpu_info; 33 | 34 | struct pa_cpu_info { 35 | pa_cpu_type_t cpu_type; 36 | 37 | union { 38 | pa_cpu_x86_flag_t x86; 39 | pa_cpu_arm_flag_t arm; 40 | } flags; 41 | bool force_generic_code; 42 | }; 43 | 44 | void pa_cpu_init(pa_cpu_info *cpu_info); 45 | 46 | void pa_remap_func_init(const pa_cpu_info *cpu_info); 47 | void pa_mix_func_init(const pa_cpu_info *cpu_info); 48 | 49 | #endif /* foocpuhfoo */ 50 | -------------------------------------------------------------------------------- /src/pulsecore/creds.h: -------------------------------------------------------------------------------- 1 | #ifndef foocredshfoo 2 | #define foocredshfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | #ifndef PACKAGE 26 | #error "Please include config.h before including this file!" 27 | #endif 28 | 29 | #include 30 | #include 31 | 32 | #define MAX_ANCIL_DATA_FDS 2 33 | 34 | typedef struct pa_creds pa_creds; 35 | typedef struct pa_cmsg_ancil_data pa_cmsg_ancil_data; 36 | 37 | #if defined(SCM_CREDENTIALS) 38 | 39 | #define HAVE_CREDS 1 40 | 41 | struct pa_creds { 42 | gid_t gid; 43 | uid_t uid; 44 | }; 45 | 46 | /* Struct for handling ancillary data, i e, extra data that can be sent together with a message 47 | * over unix pipes. Supports sending and receiving credentials and file descriptors. */ 48 | struct pa_cmsg_ancil_data { 49 | pa_creds creds; 50 | bool creds_valid; 51 | int nfd; 52 | 53 | /* Don't close these fds by your own. Check pa_cmsg_ancil_data_close_fds() */ 54 | int fds[MAX_ANCIL_DATA_FDS]; 55 | bool close_fds_on_cleanup; 56 | }; 57 | 58 | void pa_cmsg_ancil_data_close_fds(struct pa_cmsg_ancil_data *ancil); 59 | 60 | #else 61 | #undef HAVE_CREDS 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/pulsecore/dbus-shared.h: -------------------------------------------------------------------------------- 1 | #ifndef foodbussharedhfoo 2 | #define foodbussharedhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006, 2009 Lennart Poettering 8 | Copyright 2006 Shams E. King 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | typedef struct pa_dbus_connection pa_dbus_connection; 30 | 31 | /* return a pa_dbus_connection of the specified type for the given core, 32 | * like dbus_bus_get(), but integrates the connection with the pa_core */ 33 | pa_dbus_connection* pa_dbus_bus_get(pa_core *c, DBusBusType type, DBusError *error); 34 | 35 | DBusConnection* pa_dbus_connection_get(pa_dbus_connection *conn); 36 | 37 | pa_dbus_connection* pa_dbus_connection_ref(pa_dbus_connection *conn); 38 | void pa_dbus_connection_unref(pa_dbus_connection *conn); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/pulsecore/dllmain.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2006 Pierre Ossman for Cendio AB 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #ifdef OS_IS_WIN32 25 | 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | extern char *pa_win32_get_toplevel(HANDLE handle); 33 | 34 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { 35 | WSADATA data; 36 | 37 | switch (fdwReason) { 38 | 39 | case DLL_PROCESS_ATTACH: 40 | if (!pa_win32_get_toplevel(hinstDLL)) 41 | return FALSE; 42 | WSAStartup(MAKEWORD(2, 0), &data); 43 | break; 44 | 45 | case DLL_PROCESS_DETACH: 46 | WSACleanup(); 47 | break; 48 | 49 | } 50 | return TRUE; 51 | } 52 | 53 | #endif /* OS_IS_WIN32 */ 54 | -------------------------------------------------------------------------------- /src/pulsecore/fdsem.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsefdsemhfoo 2 | #define foopulsefdsemhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | /* A simple, asynchronous semaphore which uses fds for sleeping. In 26 | * the best case all functions are lock-free unless sleeping is 27 | * required. */ 28 | 29 | #include 30 | 31 | typedef struct pa_fdsem pa_fdsem; 32 | 33 | typedef struct pa_fdsem_data { 34 | pa_atomic_t waiting; 35 | pa_atomic_t signalled; 36 | pa_atomic_t in_pipe; 37 | } pa_fdsem_data; 38 | 39 | pa_fdsem *pa_fdsem_new(void); 40 | pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd); 41 | pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data); 42 | void pa_fdsem_free(pa_fdsem *f); 43 | 44 | void pa_fdsem_post(pa_fdsem *f); 45 | void pa_fdsem_wait(pa_fdsem *f); 46 | int pa_fdsem_try(pa_fdsem *f); 47 | 48 | int pa_fdsem_get(pa_fdsem *f); 49 | 50 | int pa_fdsem_before_poll(pa_fdsem *f); 51 | int pa_fdsem_after_poll(pa_fdsem *f); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/pulsecore/ffmpeg/dsputil.h: -------------------------------------------------------------------------------- 1 | /* empty file, just here to allow us to compile an unmodified resampler2.c */ 2 | -------------------------------------------------------------------------------- /src/pulsecore/filter/LICENSE.WEBKIT: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 | * its contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 18 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 21 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | -------------------------------------------------------------------------------- /src/pulsecore/filter/biquad.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef BIQUAD_H_ 7 | #define BIQUAD_H_ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /* The biquad filter parameters. The transfer function H(z) is (b0 + b1 * z^(-1) 14 | * + b2 * z^(-2)) / (1 + a1 * z^(-1) + a2 * z^(-2)). The previous two inputs 15 | * are stored in x1 and x2, and the previous two outputs are stored in y1 and 16 | * y2. 17 | * 18 | * We use double during the coefficients calculation for better accurary, but 19 | * float is used during the actual filtering for faster computation. 20 | */ 21 | struct biquad { 22 | float b0, b1, b2; 23 | float a1, a2; 24 | }; 25 | 26 | /* The type of the biquad filters */ 27 | enum biquad_type { 28 | BQ_LOWPASS, 29 | BQ_HIGHPASS, 30 | }; 31 | 32 | /* Initialize a biquad filter parameters from its type and parameters. 33 | * Args: 34 | * bq - The biquad filter we want to set. 35 | * type - The type of the biquad filter. 36 | * frequency - The value should be in the range [0, 1]. It is relative to 37 | * half of the sampling rate. 38 | */ 39 | void biquad_set(struct biquad *bq, enum biquad_type type, double freq); 40 | 41 | #ifdef __cplusplus 42 | } /* extern "C" */ 43 | #endif 44 | 45 | #endif /* BIQUAD_H_ */ 46 | -------------------------------------------------------------------------------- /src/pulsecore/filter/crossover.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef CROSSOVER_H_ 7 | #define CROSSOVER_H_ 8 | 9 | #include "biquad.h" 10 | /* An LR4 filter is two biquads with the same parameters connected in series: 11 | * 12 | * x -- [BIQUAD] -- y -- [BIQUAD] -- z 13 | * 14 | * Both biquad filter has the same parameter b[012] and a[12], 15 | * The variable [xyz][12] keep the history values. 16 | */ 17 | struct lr4 { 18 | struct biquad bq; 19 | float x1, x2; 20 | float y1, y2; 21 | float z1, z2; 22 | }; 23 | 24 | void lr4_set(struct lr4 *lr4, enum biquad_type type, float freq); 25 | 26 | void lr4_process_float32(struct lr4 *lr4, int samples, int channels, float *src, float *dest); 27 | void lr4_process_s16(struct lr4 *lr4, int samples, int channels, short *src, short *dest); 28 | 29 | #endif /* CROSSOVER_H_ */ 30 | -------------------------------------------------------------------------------- /src/pulsecore/filter/lfe-filter.h: -------------------------------------------------------------------------------- 1 | #ifndef foolfefilterhfoo 2 | #define foolfefilterhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2014 David Henningsson, Canonical Ltd. 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 | USA. 23 | ***/ 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | typedef struct pa_lfe_filter pa_lfe_filter_t; 31 | 32 | pa_lfe_filter_t * pa_lfe_filter_new(const pa_sample_spec* ss, const pa_channel_map* cm, float crossover_freq, size_t maxrewind); 33 | void pa_lfe_filter_free(pa_lfe_filter_t *); 34 | void pa_lfe_filter_reset(pa_lfe_filter_t *); 35 | void pa_lfe_filter_rewind(pa_lfe_filter_t *, size_t amount); 36 | pa_memchunk * pa_lfe_filter_process(pa_lfe_filter_t *filter, pa_memchunk *buf); 37 | void pa_lfe_filter_update_rate(pa_lfe_filter_t *, uint32_t new_rate); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/pulsecore/g711.h: -------------------------------------------------------------------------------- 1 | #ifndef foog711hfoo 2 | #define foog711hfoo 3 | 4 | /* g711.h - include for G711 u-law and a-law conversion routines 5 | ** 6 | ** Copyright (C) 2001 Chris Bagwell 7 | ** 8 | ** Permission to use, copy, modify, and distribute this software and its 9 | ** documentation for any purpose and without fee is hereby granted, provided 10 | ** that the above copyright notice appear in all copies and that both that 11 | ** copyright notice and this permission notice appear in supporting 12 | ** documentation. This software is provided "as is" without express or 13 | ** implied warranty. 14 | */ 15 | 16 | /** Copied from sox -- Lennart Poettering */ 17 | 18 | #include 19 | 20 | #ifdef FAST_ALAW_CONVERSION 21 | extern uint8_t _st_13linear2alaw[0x2000]; 22 | extern int16_t _st_alaw2linear16[256]; 23 | #define st_13linear2alaw(sw) (_st_13linear2alaw[(sw + 0x1000)]) 24 | #define st_alaw2linear16(uc) (_st_alaw2linear16[uc]) 25 | #else 26 | unsigned char st_13linear2alaw(int16_t pcm_val); 27 | int16_t st_alaw2linear16(unsigned char); 28 | #endif 29 | 30 | #ifdef FAST_ULAW_CONVERSION 31 | extern uint8_t _st_14linear2ulaw[0x4000]; 32 | extern int16_t _st_ulaw2linear16[256]; 33 | #define st_14linear2ulaw(sw) (_st_14linear2ulaw[(sw + 0x2000)]) 34 | #define st_ulaw2linear16(uc) (_st_ulaw2linear16[uc]) 35 | #else 36 | unsigned char st_14linear2ulaw(int16_t pcm_val); 37 | int16_t st_ulaw2linear16(unsigned char); 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/pulsecore/i18n.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2008 Lennart Poettering 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as 8 | published by the Free Software Foundation; either version 2.1 of the 9 | License, or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include 25 | 26 | #include "i18n.h" 27 | 28 | void pa_init_i18n(void) { 29 | #ifdef ENABLE_NLS 30 | PA_ONCE_BEGIN { 31 | 32 | bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR); 33 | bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); 34 | 35 | } PA_ONCE_END; 36 | #endif 37 | } 38 | -------------------------------------------------------------------------------- /src/pulsecore/i18n.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsei18nhfoo 2 | #define foopulsei18nhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2008 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | PA_C_DECL_BEGIN 26 | 27 | #ifdef ENABLE_NLS 28 | 29 | #if !defined(GETTEXT_PACKAGE) 30 | #error "Something is very wrong here, config.h needs to be included first" 31 | #endif 32 | 33 | #include 34 | 35 | #define _(String) dgettext(GETTEXT_PACKAGE, String) 36 | #ifdef gettext_noop 37 | #define N_(String) gettext_noop(String) 38 | #else 39 | #define N_(String) (String) 40 | #endif 41 | 42 | #else /* NLS is disabled */ 43 | 44 | #define _(String) (String) 45 | #define N_(String) (String) 46 | #define textdomain(String) (String) 47 | #define gettext(String) (String) 48 | #define dgettext(Domain,String) (String) 49 | #define dcgettext(Domain,String,Type) (String) 50 | #define bindtextdomain(Domain,Directory) (Domain) 51 | #define bind_textdomain_codeset(Domain,Codeset) (Codeset) 52 | 53 | #endif /* ENABLE_NLS */ 54 | 55 | void pa_init_i18n(void); 56 | 57 | PA_C_DECL_END 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/pulsecore/ipacl.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecoreipaclhfoo 2 | #define foopulsecoreipaclhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as 12 | published by the Free Software Foundation; either version 2.1 of the 13 | License, or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | Lesser General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public 21 | License along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | typedef struct pa_ip_acl pa_ip_acl; 25 | 26 | pa_ip_acl* pa_ip_acl_new(const char *s); 27 | void pa_ip_acl_free(pa_ip_acl *acl); 28 | int pa_ip_acl_check(pa_ip_acl *acl, int fd); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/pulsecore/lock-autospawn.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulselockautospawnhfoo 2 | #define foopulselockautospawnhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2008 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | int pa_autospawn_lock_init(void); 26 | int pa_autospawn_lock_acquire(bool block); 27 | void pa_autospawn_lock_release(void); 28 | void pa_autospawn_lock_done(bool after_fork); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/pulsecore/ltdl-helper.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2004-2006 Lennart Poettering 5 | Copyright 2006 Pierre Ossman for Cendio AB 6 | 7 | PulseAudio is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU Lesser General Public License as published 9 | by the Free Software Foundation; either version 2.1 of the License, 10 | or (at your option) any later version. 11 | 12 | PulseAudio is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public License 18 | along with PulseAudio; if not, see . 19 | ***/ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include 23 | #endif 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | #include "ltdl-helper.h" 34 | 35 | pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *symbol) { 36 | char *sn, *c; 37 | pa_void_func_t f; 38 | 39 | pa_assert(handle); 40 | pa_assert(symbol); 41 | 42 | f = (pa_void_func_t) lt_dlsym(handle, symbol); 43 | 44 | if (f) 45 | return f; 46 | 47 | if (!module) 48 | return NULL; 49 | 50 | /* As the .la files might have been cleansed from the system, we should 51 | * try with the ltdl prefix as well. */ 52 | 53 | sn = pa_sprintf_malloc("%s_LTX_%s", module, symbol); 54 | 55 | for (c = sn; *c; c++) 56 | if (!isalnum((unsigned char)*c)) 57 | *c = '_'; 58 | 59 | f = (pa_void_func_t) lt_dlsym(handle, sn); 60 | pa_xfree(sn); 61 | 62 | return f; 63 | } 64 | -------------------------------------------------------------------------------- /src/pulsecore/ltdl-helper.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecoreltdlhelperhfoo 2 | #define foopulsecoreltdlhelperhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | typedef void (*pa_void_func_t)(void); 26 | 27 | pa_void_func_t pa_load_sym(lt_dlhandle handle, const char*module, const char *symbol); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/pulsecore/memtrap.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecorememtraphfoo 2 | #define foopulsecorememtraphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | /* This subsystem will trap SIGBUS on specific memory regions. The 28 | * regions will be remapped to anonymous memory (i.e. writable NUL 29 | * bytes) on SIGBUS, so that execution of the main program can 30 | * continue though with memory having changed beneath its hands. With 31 | * pa_memtrap_is_good() it is possible to query if a memory region is 32 | * still 'good' i.e. no SIGBUS has happened yet for it. 33 | * 34 | * Intended usage is to handle memory mapped in which is controlled by 35 | * other processes that might execute ftruncate() or when mapping inb 36 | * hardware resources that might get invalidated when unplugged. */ 37 | 38 | typedef struct pa_memtrap pa_memtrap; 39 | 40 | pa_memtrap* pa_memtrap_add(const void *start, size_t size); 41 | pa_memtrap *pa_memtrap_update(pa_memtrap *m, const void *start, size_t size); 42 | 43 | void pa_memtrap_remove(pa_memtrap *m); 44 | 45 | bool pa_memtrap_is_good(pa_memtrap *m); 46 | 47 | void pa_memtrap_install(void); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/pulsecore/mime-type.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecoremimetypehfoo 2 | #define foopulsecoremimetypehfoo 3 | /*** 4 | This file is part of PulseAudio. 5 | 6 | Copyright 2009 Lennart Poettering 7 | 8 | PulseAudio is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU Lesser General Public License as published 10 | by the Free Software Foundation; either version 2.1 of the License, 11 | or (at your option) any later version. 12 | 13 | PulseAudio is distributed in the hope that it will be useful, but 14 | WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General Public License 19 | along with PulseAudio; if not, see . 20 | ***/ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | bool pa_sample_spec_is_mime(const pa_sample_spec *ss, const pa_channel_map *cm); 27 | void pa_sample_spec_mimefy(pa_sample_spec *ss, pa_channel_map *cm); 28 | char *pa_sample_spec_to_mime_type(const pa_sample_spec *ss, const pa_channel_map *cm); 29 | char *pa_sample_spec_to_mime_type_mimefy(const pa_sample_spec *_ss, const pa_channel_map *_cm); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/pulsecore/modinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef foomodinfohfoo 2 | #define foomodinfohfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | /* Some functions for reading module meta data from PulseAudio modules */ 24 | #include 25 | 26 | typedef struct pa_modinfo { 27 | char *author; 28 | char *description; 29 | char *usage; 30 | char *version; 31 | char *deprecated; 32 | bool load_once; 33 | } pa_modinfo; 34 | 35 | /* Read meta data from an libtool handle */ 36 | pa_modinfo *pa_modinfo_get_by_handle(lt_dlhandle dl, const char *module_name); 37 | 38 | /* Read meta data from a module file */ 39 | pa_modinfo *pa_modinfo_get_by_name(const char *name); 40 | 41 | /* Free meta data */ 42 | void pa_modinfo_free(pa_modinfo *i); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/pulsecore/msgobject.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2004-2006 Lennart Poettering 5 | Copyright 2006 Pierre Ossman for Cendio AB 6 | 7 | PulseAudio is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU Lesser General Public License as published 9 | by the Free Software Foundation; either version 2.1 of the License, 10 | or (at your option) any later version. 11 | 12 | PulseAudio is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public License 18 | along with PulseAudio; if not, see . 19 | ***/ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include 23 | #endif 24 | 25 | #include "msgobject.h" 26 | 27 | PA_DEFINE_PUBLIC_CLASS(pa_msgobject, pa_object); 28 | 29 | pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_id, bool (*check_type)(const char *type_name)) { 30 | pa_msgobject *o; 31 | 32 | pa_assert(size >= sizeof(pa_msgobject)); 33 | pa_assert(type_id); 34 | 35 | if (!check_type) 36 | check_type = pa_msgobject_check_type; 37 | 38 | pa_assert(check_type(type_id)); 39 | pa_assert(check_type(pa_object_type_id)); 40 | pa_assert(check_type(pa_msgobject_type_id)); 41 | 42 | o = PA_MSGOBJECT(pa_object_new_internal(size, type_id, check_type)); 43 | o->process_msg = NULL; 44 | return o; 45 | } 46 | -------------------------------------------------------------------------------- /src/pulsecore/msgobject.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsemsgobjecthfoo 2 | #define foopulsemsgobjecthfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | typedef struct pa_msgobject pa_msgobject; 31 | 32 | struct pa_msgobject { 33 | pa_object parent; 34 | int (*process_msg)(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk); 35 | }; 36 | 37 | pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_id, bool (*check_type)(const char *type_name)); 38 | 39 | #define pa_msgobject_new(type) ((type*) pa_msgobject_new_internal(sizeof(type), type##_type_id, type##_check_type)) 40 | #define pa_msgobject_free ((void (*) (pa_msgobject* o)) pa_object_free) 41 | 42 | #define PA_MSGOBJECT(o) pa_msgobject_cast(o) 43 | 44 | PA_DECLARE_PUBLIC_CLASS(pa_msgobject); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/pulsecore/namereg.h: -------------------------------------------------------------------------------- 1 | #ifndef foonamereghfoo 2 | #define foonamereghfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | #define PA_NAME_MAX 128 27 | 28 | typedef enum pa_namereg_type { 29 | PA_NAMEREG_SINK, 30 | PA_NAMEREG_SOURCE, 31 | PA_NAMEREG_SAMPLE, 32 | PA_NAMEREG_CARD 33 | } pa_namereg_type_t; 34 | 35 | const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, bool fail); 36 | void pa_namereg_unregister(pa_core *c, const char *name); 37 | void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type); 38 | 39 | pa_sink* pa_namereg_set_default_sink(pa_core*c, pa_sink *s); 40 | pa_source* pa_namereg_set_default_source(pa_core*c, pa_source *s); 41 | 42 | pa_sink *pa_namereg_get_default_sink(pa_core *c); 43 | pa_source *pa_namereg_get_default_source(pa_core *c); 44 | 45 | bool pa_namereg_is_valid_name(const char *name); 46 | bool pa_namereg_is_valid_name_or_wildcard(const char *name, pa_namereg_type_t type); 47 | char* pa_namereg_make_valid_name(const char *name); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/pulsecore/packet.h: -------------------------------------------------------------------------------- 1 | #ifndef foopackethfoo 2 | #define foopackethfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | typedef struct pa_packet pa_packet; 27 | 28 | /* create empty packet (either of type appended or dynamic depending 29 | * on length) */ 30 | pa_packet* pa_packet_new(size_t length); 31 | 32 | /* create packet (either of type appended or dynamic depending on length) 33 | * and copy data */ 34 | pa_packet* pa_packet_new_data(const void* data, size_t length); 35 | 36 | /* data must have been malloc()ed; the packet takes ownership of the memory, 37 | * i.e. memory is free()d with the packet */ 38 | pa_packet* pa_packet_new_dynamic(void* data, size_t length); 39 | 40 | const void* pa_packet_data(pa_packet *p, size_t *l); 41 | 42 | pa_packet* pa_packet_ref(pa_packet *p); 43 | void pa_packet_unref(pa_packet *p); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/pulsecore/parseaddr.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecoreparseaddrhfoo 2 | #define foopulsecoreparseaddrhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | typedef enum pa_parsed_address_type { 28 | PA_PARSED_ADDRESS_UNIX, 29 | PA_PARSED_ADDRESS_TCP4, 30 | PA_PARSED_ADDRESS_TCP6, 31 | PA_PARSED_ADDRESS_TCP_AUTO 32 | } pa_parsed_address_type_t; 33 | 34 | typedef struct pa_parsed_address { 35 | pa_parsed_address_type_t type; 36 | char *path_or_host; 37 | uint16_t port; 38 | } pa_parsed_address; 39 | 40 | int pa_parse_address(const char *a, pa_parsed_address *ret_p); 41 | 42 | bool pa_is_ip_address(const char *a); 43 | 44 | bool pa_is_ip6_address(const char *a); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/pulsecore/pid.h: -------------------------------------------------------------------------------- 1 | #ifndef foopidhfoo 2 | #define foopidhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | int pa_pid_file_create(const char *procname); 24 | int pa_pid_file_remove(void); 25 | int pa_pid_file_check_running(pid_t *pid, const char *procname); 26 | int pa_pid_file_kill(int sig, pid_t *pid, const char *procname); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/pulsecore/pipe.h: -------------------------------------------------------------------------------- 1 | #ifndef foopipehfoo 2 | #define foopipehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Pierre Ossman for Cendio AB 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #ifndef HAVE_PIPE 24 | 25 | int pipe(int filedes[2]); 26 | 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/pulsecore/play-memblockq.h: -------------------------------------------------------------------------------- 1 | #ifndef fooplaymemblockqhfoo 2 | #define fooplaymemblockqhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | pa_sink_input* pa_memblockq_sink_input_new( 27 | pa_sink *sink, 28 | const pa_sample_spec *ss, 29 | const pa_channel_map *map, 30 | pa_memblockq *q, 31 | pa_cvolume *volume, 32 | pa_proplist *p, 33 | pa_sink_input_flags_t flags); 34 | 35 | void pa_memblockq_sink_input_set_queue(pa_sink_input *i, pa_memblockq *q); 36 | 37 | int pa_play_memblockq( 38 | pa_sink *sink, 39 | const pa_sample_spec *ss, 40 | const pa_channel_map *map, 41 | pa_memblockq *q, 42 | pa_cvolume *cvolume, 43 | pa_proplist *p, 44 | pa_sink_input_flags_t flags, 45 | uint32_t *sink_input_index); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/pulsecore/play-memchunk.h: -------------------------------------------------------------------------------- 1 | #ifndef fooplaychunkhfoo 2 | #define fooplaychunkhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | int pa_play_memchunk( 27 | pa_sink *sink, 28 | const pa_sample_spec *ss, 29 | const pa_channel_map *map, 30 | const pa_memchunk *chunk, 31 | pa_cvolume *cvolume, 32 | pa_proplist *p, 33 | pa_sink_input_flags_t flags, 34 | uint32_t *sink_input_index); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/pulsecore/proplist-util.h: -------------------------------------------------------------------------------- 1 | #ifndef fooproplistutilutilhfoo 2 | #define fooproplistutilutilhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2008 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | void pa_init_proplist(pa_proplist *p); 26 | char *pa_proplist_get_stream_group(pa_proplist *pl, const char *prefix, const char *cache); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/pulsecore/protocol-cli.h: -------------------------------------------------------------------------------- 1 | #ifndef fooprotocolclihfoo 2 | #define fooprotocolclihfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | typedef struct pa_cli_protocol pa_cli_protocol; 29 | 30 | pa_cli_protocol* pa_cli_protocol_get(pa_core *core); 31 | pa_cli_protocol* pa_cli_protocol_ref(pa_cli_protocol *p); 32 | void pa_cli_protocol_unref(pa_cli_protocol *p); 33 | void pa_cli_protocol_connect(pa_cli_protocol *p, pa_iochannel *io, pa_module *m); 34 | void pa_cli_protocol_disconnect(pa_cli_protocol *o, pa_module *m); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/pulsecore/protocol-http.h: -------------------------------------------------------------------------------- 1 | #ifndef fooprotocolhttphfoo 2 | #define fooprotocolhttphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2005-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | typedef struct pa_http_protocol pa_http_protocol; 30 | 31 | pa_http_protocol* pa_http_protocol_get(pa_core *core); 32 | pa_http_protocol* pa_http_protocol_ref(pa_http_protocol *p); 33 | void pa_http_protocol_unref(pa_http_protocol *p); 34 | void pa_http_protocol_connect(pa_http_protocol *p, pa_iochannel *io, pa_module *m); 35 | void pa_http_protocol_disconnect(pa_http_protocol *p, pa_module *m); 36 | 37 | void pa_http_protocol_add_server_string(pa_http_protocol *p, const char *name); 38 | void pa_http_protocol_remove_server_string(pa_http_protocol *p, const char *name); 39 | pa_strlist *pa_http_protocol_servers(pa_http_protocol *p); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/pulsecore/pstream-util.h: -------------------------------------------------------------------------------- 1 | #ifndef foopstreamutilhfoo 2 | #define foopstreamutilhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | /* The tagstruct is freed!*/ 29 | void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds); 30 | void pa_pstream_send_tagstruct_with_fds(pa_pstream *p, pa_tagstruct *t, int nfd, const int *fds, bool close_fds); 31 | 32 | #define pa_pstream_send_tagstruct(p, t) pa_pstream_send_tagstruct_with_creds((p), (t), NULL) 33 | 34 | void pa_pstream_send_error(pa_pstream *p, uint32_t tag, uint32_t error); 35 | void pa_pstream_send_simple_ack(pa_pstream *p, uint32_t tag); 36 | 37 | int pa_pstream_register_memfd_mempool(pa_pstream *p, pa_mempool *pool, const char **fail_reason); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/pulsecore/queue.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecorequeuehfoo 2 | #define foopulsecorequeuehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2008 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | typedef struct pa_queue pa_queue; 26 | 27 | /* A simple implementation of the abstract data type queue. Stores 28 | * pointers as members. The memory has to be managed by the caller. */ 29 | 30 | pa_queue* pa_queue_new(void); 31 | 32 | /* Free the queue and run the specified callback function for every 33 | * remaining entry. The callback function may be NULL. */ 34 | void pa_queue_free(pa_queue *q, pa_free_cb_t free_func); 35 | 36 | void pa_queue_push(pa_queue *q, void *p); 37 | void* pa_queue_pop(pa_queue *q); 38 | 39 | int pa_queue_isempty(pa_queue *q); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/pulsecore/random.h: -------------------------------------------------------------------------------- 1 | #ifndef foorandomhfoo 2 | #define foorandomhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as 12 | published by the Free Software Foundation; either version 2.1 of the 13 | License, or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | Lesser General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public 21 | License along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | void pa_random_seed(void); 27 | void pa_random(void *ret_data, size_t length); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/pulsecore/sconv.h: -------------------------------------------------------------------------------- 1 | #ifndef foosconvhfoo 2 | #define foosconvhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | #include 26 | 27 | typedef void (*pa_convert_func_t)(unsigned n, const void *a, void *b); 28 | 29 | pa_convert_func_t pa_get_convert_to_float32ne_function(pa_sample_format_t f) PA_GCC_PURE; 30 | pa_convert_func_t pa_get_convert_from_float32ne_function(pa_sample_format_t f) PA_GCC_PURE; 31 | 32 | pa_convert_func_t pa_get_convert_to_s16ne_function(pa_sample_format_t f) PA_GCC_PURE; 33 | pa_convert_func_t pa_get_convert_from_s16ne_function(pa_sample_format_t f) PA_GCC_PURE; 34 | 35 | void pa_set_convert_to_float32ne_function(pa_sample_format_t f, pa_convert_func_t func); 36 | void pa_set_convert_from_float32ne_function(pa_sample_format_t f, pa_convert_func_t func); 37 | 38 | void pa_set_convert_to_s16ne_function(pa_sample_format_t f, pa_convert_func_t func); 39 | void pa_set_convert_from_s16ne_function(pa_sample_format_t f, pa_convert_func_t func); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/pulsecore/semaphore-win32.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2006 Pierre Ossman for Cendio AB 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | #include "semaphore.h" 30 | 31 | struct pa_semaphore { 32 | HANDLE sema; 33 | }; 34 | 35 | pa_semaphore* pa_semaphore_new(unsigned value) { 36 | pa_semaphore *s; 37 | 38 | s = pa_xnew(pa_semaphore, 1); 39 | 40 | s->sema = CreateSemaphore(NULL, value, 32767, NULL); 41 | pa_assert(s->sema != NULL); 42 | 43 | return s; 44 | } 45 | 46 | void pa_semaphore_free(pa_semaphore *s) { 47 | pa_assert(s); 48 | CloseHandle(s->sema); 49 | pa_xfree(s); 50 | } 51 | 52 | void pa_semaphore_post(pa_semaphore *s) { 53 | pa_assert(s); 54 | ReleaseSemaphore(s->sema, 1, NULL); 55 | } 56 | 57 | void pa_semaphore_wait(pa_semaphore *s) { 58 | pa_assert(s); 59 | WaitForSingleObject(s->sema, INFINITE); 60 | } 61 | -------------------------------------------------------------------------------- /src/pulsecore/semaphore.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsesemaphorehfoo 2 | #define foopulsesemaphorehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | typedef struct pa_semaphore pa_semaphore; 27 | 28 | pa_semaphore* pa_semaphore_new(unsigned value); 29 | void pa_semaphore_free(pa_semaphore *m); 30 | 31 | void pa_semaphore_post(pa_semaphore *m); 32 | void pa_semaphore_wait(pa_semaphore *m); 33 | 34 | /* Static semaphores are basically just atomically updated pointers to 35 | * pa_semaphore objects */ 36 | 37 | typedef struct pa_static_semaphore { 38 | pa_atomic_ptr_t ptr; 39 | } pa_static_semaphore; 40 | 41 | #define PA_STATIC_SEMAPHORE_INIT { PA_ATOMIC_PTR_INIT(NULL) } 42 | 43 | /* When you call this make sure to pass always the same value parameter! */ 44 | pa_semaphore* pa_static_semaphore_get(pa_static_semaphore *m, unsigned value); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/pulsecore/sioman.c: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2004-2006 Lennart Poettering 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include 22 | #endif 23 | 24 | #include 25 | #include 26 | 27 | #include "sioman.h" 28 | 29 | static pa_atomic_t stdio_inuse = PA_ATOMIC_INIT(0); 30 | 31 | int pa_stdio_acquire(void) { 32 | return pa_atomic_cmpxchg(&stdio_inuse, 0, 1) ? 0 : -1; 33 | } 34 | 35 | void pa_stdio_release(void) { 36 | pa_assert_se(pa_atomic_cmpxchg(&stdio_inuse, 1, 0)); 37 | } 38 | -------------------------------------------------------------------------------- /src/pulsecore/sioman.h: -------------------------------------------------------------------------------- 1 | #ifndef foosiomanhfoo 2 | #define foosiomanhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | int pa_stdio_acquire(void); 24 | void pa_stdio_release(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/pulsecore/socket-util.h: -------------------------------------------------------------------------------- 1 | #ifndef foosocketutilhfoo 2 | #define foosocketutilhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2006 Pierre Ossman for Cendio AB 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | void pa_socket_peer_to_string(int fd, char *c, size_t l); 30 | 31 | void pa_make_socket_low_delay(int fd); 32 | void pa_make_tcp_socket_low_delay(int fd); 33 | void pa_make_udp_socket_low_delay(int fd); 34 | 35 | int pa_socket_set_sndbuf(int fd, size_t l); 36 | int pa_socket_set_rcvbuf(int fd, size_t l); 37 | 38 | int pa_unix_socket_is_stale(const char *fn); 39 | int pa_unix_socket_remove_stale(const char *fn); 40 | 41 | bool pa_socket_address_is_local(const struct sockaddr *sa); 42 | bool pa_socket_is_local(int fd); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/pulsecore/socket.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsecoresockethfoo 2 | #define foopulsecoresockethfoo 3 | 4 | #ifdef HAVE_SYS_SOCKET_H 5 | #include 6 | #endif 7 | 8 | #ifdef HAVE_WINSOCK2_H 9 | #include 10 | #include "winerrno.h" 11 | 12 | typedef long suseconds_t; 13 | 14 | #endif 15 | 16 | #ifdef HAVE_WS2TCPIP_H 17 | #include 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/pulsecore/sound-file-stream.h: -------------------------------------------------------------------------------- 1 | #ifndef foosoundfilestreamhfoo 2 | #define foosoundfilestreamhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/pulsecore/sound-file.h: -------------------------------------------------------------------------------- 1 | #ifndef soundfilehfoo 2 | #define soundfilehfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss, pa_channel_map *map, pa_memchunk *chunk, pa_proplist *p); 28 | 29 | int pa_sound_file_too_big_to_cache(const char *fname); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/pulsecore/start-child.h: -------------------------------------------------------------------------------- 1 | #ifndef foopulsestartchildhfoo 2 | #define foopulsestartchildhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2007 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/pulsecore/strbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef foostrbufhfoo 2 | #define foostrbufhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | #include 25 | 26 | typedef struct pa_strbuf pa_strbuf; 27 | 28 | pa_strbuf *pa_strbuf_new(void); 29 | void pa_strbuf_free(pa_strbuf *sb); 30 | char *pa_strbuf_to_string(pa_strbuf *sb); 31 | char *pa_strbuf_to_string_free(pa_strbuf *sb); 32 | 33 | size_t pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) PA_GCC_PRINTF_ATTR(2,3); 34 | void pa_strbuf_puts(pa_strbuf *sb, const char *t); 35 | void pa_strbuf_putsn(pa_strbuf *sb, const char *t, size_t m); 36 | void pa_strbuf_putc(pa_strbuf *sb, char c); 37 | 38 | bool pa_strbuf_isempty(pa_strbuf *sb); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/pulsecore/tokenizer.h: -------------------------------------------------------------------------------- 1 | #ifndef footokenizerhfoo 2 | #define footokenizerhfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as published 11 | by the Free Software Foundation; either version 2.1 of the License, 12 | or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public License 20 | along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | typedef struct pa_tokenizer pa_tokenizer; 24 | 25 | pa_tokenizer* pa_tokenizer_new(const char *s, unsigned args); 26 | void pa_tokenizer_free(pa_tokenizer *t); 27 | 28 | const char *pa_tokenizer_get(pa_tokenizer *t, unsigned i); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/pulsecore/typedefs.h: -------------------------------------------------------------------------------- 1 | #ifndef footypedefshfoo 2 | #define footypedefshfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2015 Canonical Ltd. 8 | Written by David Henningsson 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | typedef struct pa_card pa_card; 25 | typedef struct pa_card_profile pa_card_profile; 26 | typedef struct pa_client pa_client; 27 | typedef struct pa_core pa_core; 28 | typedef struct pa_device_port pa_device_port; 29 | typedef struct pa_sink pa_sink; 30 | typedef struct pa_sink_volume_change pa_sink_volume_change; 31 | typedef struct pa_sink_input pa_sink_input; 32 | typedef struct pa_source pa_source; 33 | typedef struct pa_source_volume_change pa_source_volume_change; 34 | typedef struct pa_source_output pa_source_output; 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/pulsecore/usergroup.h: -------------------------------------------------------------------------------- 1 | #ifndef foousergrouphfoo 2 | #define foousergrouphfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2009 Ted Percival 8 | 9 | PulseAudio is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU Lesser General Public License as 11 | published by the Free Software Foundation; either version 2.1 of the 12 | License, or (at your option) any later version. 13 | 14 | PulseAudio is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with PulseAudio; if not, see . 21 | ***/ 22 | 23 | #include 24 | 25 | #ifndef PACKAGE 26 | #error "Please include config.h before including this file!" 27 | #endif 28 | 29 | #ifdef HAVE_GRP_H 30 | 31 | struct group *pa_getgrgid_malloc(gid_t gid); 32 | void pa_getgrgid_free(struct group *grp); 33 | 34 | struct group *pa_getgrnam_malloc(const char *name); 35 | void pa_getgrnam_free(struct group *group); 36 | 37 | #endif /* HAVE_GRP_H */ 38 | 39 | #ifdef HAVE_PWD_H 40 | 41 | struct passwd *pa_getpwuid_malloc(uid_t uid); 42 | void pa_getpwuid_free(struct passwd *passwd); 43 | 44 | struct passwd *pa_getpwnam_malloc(const char *name); 45 | void pa_getpwnam_free(struct passwd *passwd); 46 | 47 | #endif /* HAVE_PWD_H */ 48 | 49 | #endif /* foousergrouphfoo */ 50 | -------------------------------------------------------------------------------- /src/pulsecore/x11prop.h: -------------------------------------------------------------------------------- 1 | #ifndef foox11prophfoo 2 | #define foox11prophfoo 3 | 4 | /*** 5 | This file is part of PulseAudio. 6 | 7 | Copyright 2004-2006 Lennart Poettering 8 | Copyright 2010 Colin Guthrie 9 | 10 | PulseAudio is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU Lesser General Public License as published 12 | by the Free Software Foundation; either version 2.1 of the License, 13 | or (at your option) any later version. 14 | 15 | PulseAudio is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with PulseAudio; if not, see . 22 | ***/ 23 | 24 | #include 25 | 26 | #include 27 | 28 | void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data); 29 | void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name); 30 | char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char *p, size_t l); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/tests/Makefile: -------------------------------------------------------------------------------- 1 | ../modules/Makefile -------------------------------------------------------------------------------- /src/tests/channelmap-test.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include 3 | #endif 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | #include 12 | 13 | START_TEST (channelmap_test) { 14 | char cm[PA_CHANNEL_MAP_SNPRINT_MAX]; 15 | pa_channel_map map, map2; 16 | 17 | pa_channel_map_init_auto(&map, 6, PA_CHANNEL_MAP_AIFF); 18 | 19 | fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); 20 | 21 | pa_channel_map_init_auto(&map, 6, PA_CHANNEL_MAP_AUX); 22 | 23 | fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); 24 | 25 | pa_channel_map_init_auto(&map, 6, PA_CHANNEL_MAP_ALSA); 26 | 27 | fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); 28 | 29 | pa_channel_map_init_extend(&map, 14, PA_CHANNEL_MAP_ALSA); 30 | 31 | fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); 32 | 33 | pa_channel_map_parse(&map2, cm); 34 | 35 | fail_unless(pa_channel_map_equal(&map, &map2)); 36 | 37 | pa_channel_map_parse(&map2, "left,test"); 38 | } 39 | END_TEST 40 | 41 | int main(int argc, char *argv[]) { 42 | int failed = 0; 43 | Suite *s; 44 | TCase *tc; 45 | SRunner *sr; 46 | 47 | s = suite_create("Channel Map"); 48 | tc = tcase_create("channelmap"); 49 | tcase_add_test(tc, channelmap_test); 50 | suite_add_tcase(s, tc); 51 | 52 | sr = srunner_create(s); 53 | srunner_run_all(sr, CK_NORMAL); 54 | failed = srunner_ntests_failed(sr); 55 | srunner_free(sr); 56 | 57 | return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 58 | } 59 | -------------------------------------------------------------------------------- /src/tests/close-test.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | int main(int argc, char *argv[]) { 11 | 12 | open("/dev/null", O_RDONLY); 13 | open("/dev/null", O_RDONLY); 14 | open("/dev/null", O_RDONLY); 15 | open("/dev/null", O_RDONLY); 16 | 17 | pa_close_all(5, -1); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /src/tests/hook-list-test.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include 3 | #endif 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | static pa_hook_result_t func1(const char *hook_data, const char *call_data, const char *slot_data) { 11 | pa_log("(func1) hook=%s call=%s slot=%s", hook_data, call_data, slot_data); 12 | /* succeed when it runs to here */ 13 | fail_unless(1); 14 | return PA_HOOK_OK; 15 | } 16 | 17 | static pa_hook_result_t func2(const char *hook_data, const char *call_data, const char *slot_data) { 18 | pa_log("(func2) hook=%s call=%s slot=%s", hook_data, call_data, slot_data); 19 | /* succeed when it runs to here */ 20 | fail_unless(1); 21 | return PA_HOOK_OK; 22 | } 23 | 24 | START_TEST (hooklist_test) { 25 | pa_hook hook; 26 | pa_hook_slot *slot; 27 | 28 | pa_hook_init(&hook, (void*) "hook"); 29 | 30 | pa_hook_connect(&hook, PA_HOOK_LATE, (pa_hook_cb_t) func1, (void*) "slot1"); 31 | slot = pa_hook_connect(&hook, PA_HOOK_NORMAL, (pa_hook_cb_t) func2, (void*) "slot2"); 32 | pa_hook_connect(&hook, PA_HOOK_NORMAL, (pa_hook_cb_t) func1, (void*) "slot3"); 33 | 34 | pa_hook_fire(&hook, (void*) "call1"); 35 | 36 | pa_hook_slot_free(slot); 37 | 38 | pa_hook_fire(&hook, (void*) "call2"); 39 | 40 | pa_hook_done(&hook); 41 | } 42 | END_TEST 43 | 44 | int main(int argc, char *argv[]) { 45 | int failed = 0; 46 | Suite *s; 47 | TCase *tc; 48 | SRunner *sr; 49 | 50 | s = suite_create("Hook List"); 51 | tc = tcase_create("hooklist"); 52 | tcase_add_test(tc, hooklist_test); 53 | suite_add_tcase(s, tc); 54 | 55 | sr = srunner_create(s); 56 | srunner_run_all(sr, CK_NORMAL); 57 | failed = srunner_ntests_failed(sr); 58 | srunner_free(sr); 59 | 60 | return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 61 | } 62 | -------------------------------------------------------------------------------- /src/tests/lo-test-util.h: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2013 Collabora Ltd. 5 | Author: Arun Raghavan 6 | 7 | PulseAudio is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU Lesser General Public License as published 9 | by the Free Software Foundation; either version 2.1 of the License, 10 | or (at your option) any later version. 11 | 12 | PulseAudio is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public License 18 | along with PulseAudio; if not, see . 19 | ***/ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include 23 | #endif 24 | 25 | #include 26 | 27 | typedef struct pa_lo_test_context { 28 | /* Tests need to set these */ 29 | const char *context_name; 30 | 31 | pa_sample_spec sample_spec; 32 | int play_latency; /* ms */ 33 | int rec_latency; /* ms */ 34 | 35 | pa_stream_request_cb_t write_cb, read_cb; 36 | 37 | /* These are set by lo_test_init() */ 38 | pa_mainloop *mainloop; 39 | pa_context *context; 40 | 41 | pa_stream *play_stream, *rec_stream; 42 | 43 | int ss, fs; /* sample size, frame size for convenience */ 44 | } pa_lo_test_context; 45 | 46 | /* Initialise the test parameters, connect */ 47 | int pa_lo_test_init(pa_lo_test_context *ctx); 48 | /* Start running the test */ 49 | int pa_lo_test_run(pa_lo_test_context *ctx); 50 | /* Clean up */ 51 | void pa_lo_test_deinit(pa_lo_test_context *ctx); 52 | 53 | /* Return RMS for the given signal. Assumes the data is a single channel for 54 | * simplicity */ 55 | float pa_rms(const float *s, int n); 56 | -------------------------------------------------------------------------------- /src/tests/strlist-test.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | START_TEST (strlist_test) { 14 | char *t, *u; 15 | pa_strlist *l = NULL; 16 | 17 | l = pa_strlist_prepend(l, "e"); 18 | l = pa_strlist_prepend(l, "d"); 19 | l = pa_strlist_prepend(l, "c"); 20 | l = pa_strlist_prepend(l, "b"); 21 | l = pa_strlist_prepend(l, "a"); 22 | 23 | t = pa_strlist_to_string(l); 24 | pa_strlist_free(l); 25 | 26 | fprintf(stderr, "1: %s\n", t); 27 | fail_unless(pa_streq(t, "a b c d e")); 28 | 29 | l = pa_strlist_parse(t); 30 | pa_xfree(t); 31 | 32 | t = pa_strlist_to_string(l); 33 | fprintf(stderr, "2: %s\n", t); 34 | fail_unless(pa_streq(t, "a b c d e")); 35 | pa_xfree(t); 36 | 37 | l = pa_strlist_pop(l, &u); 38 | fprintf(stderr, "3: %s\n", u); 39 | fail_unless(pa_streq(u, "a")); 40 | pa_xfree(u); 41 | 42 | l = pa_strlist_remove(l, "c"); 43 | 44 | t = pa_strlist_to_string(l); 45 | fprintf(stderr, "4: %s\n", t); 46 | fail_unless(pa_streq(t, "b d e")); 47 | pa_xfree(t); 48 | 49 | pa_strlist_free(l); 50 | } 51 | END_TEST 52 | 53 | int main(int argc, char *argv[]) { 54 | int failed = 0; 55 | Suite *s; 56 | TCase *tc; 57 | SRunner *sr; 58 | 59 | s = suite_create("StrList"); 60 | tc = tcase_create("strlist"); 61 | tcase_add_test(tc, strlist_test); 62 | suite_add_tcase(s, tc); 63 | 64 | sr = srunner_create(s); 65 | srunner_run_all(sr, CK_NORMAL); 66 | failed = srunner_ntests_failed(sr); 67 | srunner_free(sr); 68 | 69 | return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 70 | } 71 | -------------------------------------------------------------------------------- /src/tests/utf8-test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hfujita/pulseaudio-raop2/29014bb40944f86d1156e740d9b570de26a32bbd/src/tests/utf8-test.c -------------------------------------------------------------------------------- /src/utils/Makefile: -------------------------------------------------------------------------------- 1 | ../modules/Makefile -------------------------------------------------------------------------------- /todo: -------------------------------------------------------------------------------- 1 | Build System: 2 | - Remove symdef files and use macros (like most other projects) 3 | - Use own name mangling scheme instead of ltdl's, which will eliminate the 4 | need for .la files or extra trickery. 5 | 6 | Porting: 7 | - rtp module ported to Win32 (sendmsg/recvmsg emulation) 8 | 9 | I18N: 10 | - iconv stuff sent from utils to server (UTF-8) 11 | - iconv sample loading in server 12 | - gettextify pulseaudio 13 | 14 | Cleanups: 15 | - drop dependency of libpulse on libX11, instead use an external mini binary 16 | 17 | Network: 18 | - module-tunnel: improve latency calculation 19 | - module-tunnel: more reliable audio streaming over wifi 20 | - Compressed network streams for tunnels/rtp streams. (Might be a good GSoC project) 21 | This builds on passthrough support. A good candidate codec would be CELT. 22 | 23 | Test: 24 | - autoload 25 | 26 | Auth/Crypto: 27 | - ssl 28 | - key rings for auth 29 | - challenge response auth 30 | - sasl auth 31 | 32 | Features: 33 | - use scatter/gather io for sockets 34 | - examine if it is possible to mimic esd's handling of half duplex cards 35 | (switch to capture when a recording client connects and drop playback during 36 | that time) 37 | - add an API to libpulse for allocating memory from the pa_context memory pool 38 | - configuration file syntax: 39 | - multiline configuration statements 40 | - recursive .if 41 | 42 | Long term: 43 | - pass meta info for hearing impaired 44 | - X11: support for the X11 synchronization extension 45 | 46 | Backends for: 47 | - portaudio (semi-done) 48 | -------------------------------------------------------------------------------- /vala/libpulse-mainloop-glib.deps: -------------------------------------------------------------------------------- 1 | libpulse 2 | -------------------------------------------------------------------------------- /vala/libpulse-mainloop-glib.vapi: -------------------------------------------------------------------------------- 1 | using GLib; 2 | 3 | namespace PulseAudio { 4 | [Compact] 5 | [CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")] 6 | public class GLibMainLoop { 7 | 8 | [CCode (cname="pa_glib_mainloop_new")] 9 | public GLibMainLoop(MainContext? c = null); 10 | 11 | public unowned MainLoopApi get_api(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vala/libpulse-simple.deps: -------------------------------------------------------------------------------- 1 | libpulse-simple 2 | -------------------------------------------------------------------------------- /vala/libpulse-simple.vapi: -------------------------------------------------------------------------------- 1 | /*** 2 | This file is part of PulseAudio. 3 | 4 | Copyright 2012 Alexander Kurtz 5 | 6 | PulseAudio is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2.1 of the License, 9 | or (at your option) any later version. 10 | 11 | PulseAudio is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with PulseAudio; if not, see . 18 | ***/ 19 | 20 | namespace PulseAudio { 21 | [Compact] 22 | [CCode (cheader_filename="pulse/simple.h", cname="pa_simple", cprefix="pa_simple_")] 23 | class Simple { 24 | public Simple(string? server = null, string? name = null, Stream.Direction dir = Stream.Direction.PLAYBACK, 25 | string? dev = null, string stream_name = "", 26 | SampleSpec ss = SampleSpec(){ format = SampleFormat.S16NE, rate = 44100, channels = 2 }, 27 | ChannelMap? map = null, Stream.BufferAttr? attr = null, out int error = null); 28 | public int write(void* data, size_t bytes, out int error = null); 29 | public int drain(out int error = null); 30 | public int read(void* data, size_t bytes, out int error = null); 31 | public usec get_latency(out int error = null); 32 | public int flush(out int error = null); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vala/libpulse.deps: -------------------------------------------------------------------------------- 1 | posix 2 | --------------------------------------------------------------------------------