Commit graph

41 commits

Author SHA1 Message Date
Lennart Poettering
9abc010c93 object: speed up type verification by not relying on strcmp()
Instead of using string contents for type identification use the address
of a constant string array. This should speed up type verifications a
little sind we only need to compare one machine word instead of a full
string. Also, this saves a few strings.

To make clear that types must be compared via address and not string
contents 'type_name' is now called 'type_id'.

This also simplifies the macros for declaring and defining public and
private subclasses.
2009-08-21 21:27:44 +02:00
Lennart Poettering
8c31974f56 sink: volume handling rework, new flat volume logic
- We now implement a logic where the sink maintains two distinct
  volumes: the 'reference' volume which is shown to the users, and the
  'real' volume, which is configured to the hardware. The latter is
  configured to the max of all streams. Volume changes on sinks are
  propagated back to the streams proportional to the reference volume
  change. Volume changes on sink inputs are forwarded to the sink by
  'pushing' the volume if necessary.

  This renames the old 'virtual_volume' to 'real_volume'. The
  'reference_volume' is now the one exposed to users.

  By this logic the sink volume visible to the user, will always be the
  "upper" boundary for everything that is played. Saved/restored stream
  volumes are measured relative to this boundary, the factor here is
  always < 1.0.

- introduce accuracy for sink volumes, similar to the accuracy we
  already have for source volumes.

- other cleanups.
2009-08-19 02:55:02 +02:00
Marc-André Lureau
0955e3d45b Base mainloop on pa_rtclock_now()
Move the mainloop to monotonic based time events.

Introduces 4 helper functions:
pa_{context,core}_rttime_{new,restart}(), that fill correctly a
timeval with the rtclock flag set if the mainloop supports it.

Both mainloop-test and mainloop-test-glib works with rt and timeval
based time events. PulseAudio and clients should be fully functional.

This patch has received several iterations, and this one as been
largely untested.

Signed-off-by: Marc-André Lureau <marca-andre.lureau@nokia.com>
2009-06-20 17:29:31 +03:00
Lennart Poettering
00797b8b6e core: add a suspend cause flags field 2009-06-05 19:05:07 +02:00
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Lennart Poettering
620bf84573 try to vacuum a little when nothing is going on 2009-02-25 09:13:19 +01:00
Lennart Poettering
4505bc9cc6 introduce default channel map in addition to the default sample spec 2009-02-21 16:32:42 +01:00
Lennart Poettering
f0cc23d6e5 Merge commit 'elmarco/bt-wip' 2009-02-12 03:35:57 +01:00
Lennart Poettering
823431e447 allow sending meta/policy events to clients 2009-02-12 03:18:05 +01:00
Marc-André Lureau
86bec09fa8 pulsecore: add PA_CORE_HOOK_*_MOVE_FAIL
In case pa_*_move_all_fail(), it is nicer to let a module override the
default behavior to fallback on a different sink/source. (instead of
unlinking the sink_input/source_output)
2009-02-11 20:26:32 +02:00
Lennart Poettering
524d78fc7a add missing hook 2009-02-05 04:09:27 +01:00
Lennart Poettering
746dc2ac19 get rid of nonsensical late initialization of namereg/scache and things 2009-01-29 16:25:29 +01:00
Lennart Poettering
a5401a50a6 store the default sink/source in proper pa_sink*/pa_source* pointers instead of a string 2009-01-28 01:46:27 +01:00
Lennart Poettering
d5f46e824e move flat volume logic into the core. while doing so add n_volume_steps field to sinks/sources 2009-01-27 04:39:07 +01:00
Lennart Poettering
29cb778dcc move sink input/source output move functions into two parts so that we can start the move, delete the original sink, create a new sink, finish the move; similar for source outputs 2009-01-23 22:38:30 +01:00
Lennart Poettering
a3162a396e maintain a pa_core state variable 2009-01-23 22:29:02 +01:00
Lennart Poettering
29c7a28817 kill autoload stuff as planned 2009-01-15 20:07:13 +01:00
Lennart Poettering
b6deb0cc4c add new pa_card object as a way to logically combine multiple sinks and sources 2009-01-15 18:29:16 +01:00
Lennart Poettering
5abda63a1f convert pa_client instantiation to use a pa_client_new_data struct and add hooks for manipulating it 2009-01-15 17:52:29 +01:00
Marc-Andre Lureau
45412740b8 volume hooks
Signed-off-by: Lennart Poettering <lennart@poettering.net>
2008-10-07 01:54:30 +02:00
Lennart Poettering
79ad4e63f6 Make the shared memory segment size configurable
This is useful only on systems where memory overcommit is not available
or disabled.
2008-10-01 01:14:36 +02:00
Lennart Poettering
f2164023fd Add new option to disable remixing from/to LFE and set it to on by default 2008-09-05 16:04:42 +03:00
Lennart Poettering
756fac8d04 add new switch --disallow-exit 2008-08-06 19:39:12 +02:00
Lennart Poettering
edc56a7f7a rename pa_property_xxx to pa_shared_xxx to avoid confusion with property lists 2008-08-01 01:56:09 +03:00
Lennart Poettering
913bbd4489 save a bit of memory 2008-06-27 21:37:33 +02:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
Lennart Poettering
28405e3dcf big mumbo jumo of interleaved patches.
* Use seperate "state" and "config" paths
* Pass the fact that we are in system mode via an env var $PULSE_SYSTEM instead of as var in pa_core
* Properly check proc name when checking PID files. Don't check exename, because we cannot read that for other uids


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2480 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-21 22:50:58 +00:00
Lennart Poettering
045c1d602d merge glitch-free branch back into trunk
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-15 23:34:41 +00:00
Lennart Poettering
14a9b80afb - Check process name when dealing with PID files
- Add new PA_STREAM_FIX_CHANNELS, FIX_RATE, FIX_FORMAT, DONT_MOVE, VARIABLE_RATES to pa_sream_flags_t adn implement it
- Expose those flags in pacat
- Add notifications about device suspend/resume to the protocol and expose them in libpulse
- Allow changing of buffer_attr during playback
- allow disabling for remixing globally
- hookup polkit support


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2067 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-21 01:30:40 +00:00
Lennart Poettering
7bfd1b2f01 make rtprio and nice level actually configurable
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2014 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-01 02:58:26 +00:00
Lennart Poettering
a67c21f093 merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Pierre Ossman
06211b7c8f Add copyright notices to all relevant files. (based on svn log)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00
Pierre Ossman
521daf6f0a Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Lennart Poettering
0e436a6926 Rework memory management to allow shared memory data transfer. The central idea
is to allocate all audio memory blocks from a per-process memory pool which is
available as read-only SHM segment to other local processes. Then, instead of
writing the actual audio data to the socket just write references to this
shared memory pool.

To work optimally all memory blocks should now be of type PA_MEMBLOCK_POOL or
PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now generates memory
blocks of this type by default.



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1266 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 19:55:18 +00:00
Lennart Poettering
8f91b1f4c4 define new hooks: hook_source_output_new, hook_source_disconnect
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1247 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 19:52:43 +00:00
Lennart Poettering
8180832898 properly implement a pa_sink_disconnect() hook
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1243 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 17:33:32 +00:00
Lennart Poettering
a621d90285 allow hooking into the process of creating playback streams. To implement this I modified the pa_sink_input_new() signature to take a pa_sink_input_new_data structure instead of direct arguments.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1237 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 16:19:56 +00:00
Lennart Poettering
47d009afd6 rework subscription code: try to drop redundant queued events
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1211 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-12 02:18:24 +00:00
Lennart Poettering
9c87a65ce9 * add new --system command line parameter to the daemon for running PulseAudio as system-wide instance
* add PA_ prefixes to all global #defines
* modify auth-by-creds: define a new group "pulse-access" which is used for authentication
* add proper privilige dropping when running in --system mode
* create runtime directory once on startup and not by each module seperately


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1105 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-19 17:44:19 +00:00
Lennart Poettering
3cf1621433 * more s/pulseaudio/PulseAudio/ replacements
* name the per-user dir ~/.pulse (instead of .pulseaudio), just like /etc/pulse/


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1039 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19 23:51:58 +00:00
Lennart Poettering
f44ba09265 big s/polyp/pulse/g
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19 21:53:48 +00:00
Renamed from src/polypcore/core.h (Browse further)