aboutsummaryrefslogtreecommitdiffstats
path: root/pulse.cc
Commit message (Collapse)AuthorAgeFilesLines
* more c++11/c++14 featuresDave Reisner2016-07-171-105/+48
| | | | | | | - use std::move instead of std::swap - use assignment instead of memcpy - wrap operations in WaitOperationComplete (eh, not really c++11) - prefer unique_ptr assignment instead of reset
* declare enums as enum classesDave Reisner2016-06-071-32/+32
|
* use 'auto' more for obvious declsDave Reisner2016-06-061-6/+6
|
* drop static qualifiers on anonymous namespace functionsDave Reisner2016-06-061-9/+9
| | | | the anonymous namespace already provides the visibility we want.
* get rid of using std::* statements in headersDave Reisner2016-06-061-23/+22
|
* add missing break statement in case/switchDave Reisner2016-06-061-0/+1
|
* include math.hDave Reisner2016-05-101-0/+1
| | | | | | | gcc 6 gets whiny: pulse.cc:76:61: error: ‘round’ was not declared in this scope return round(pa_cvolume_max(cvol) * 100.0 / PA_VOLUME_NORM);
* set volume via scale, so as to keep balanceAl McElrath2015-04-301-3/+2
|
* pulse.cc: remove redundant #includeDave Reisner2015-03-271-3/+0
|
* fix compile time warnings for unreachable codeDave Reisner2014-12-291-0/+6
|
* fix volume roundingDaniel Micay2014-08-201-2/+2
| | | | Closes #26
* Revert "pulse: use ceil() instead of floor() for volume percentages"Dave Reisner2014-08-201-1/+1
| | | | | | | This commit introduced a functional bug at the cost of attempting to fix a cosmetic one. This reverts commit 067f37d641ab7ae7171ea4bb362e723b0089e671.
* pulse: use ceil() instead of floor() for volume percentagesDave Reisner2014-08-191-1/+1
| | | | Fixes GHI#26.
* remove runtime_error exceptions for impossibleDave Reisner2014-07-051-3/+0
| | | | these should be caught at compiletime, not runtime
* avoid extra copy of profile when resettingDave Reisner2014-05-081-1/+1
|
* advertise the correct version on pulseDave Reisner2014-05-071-1/+1
|
* add is-available verbDave Reisner2014-05-061-0/+14
|
* use std::max instead of fmaxDave Reisner2014-01-061-2/+1
|
* pulse: swap vectors rather than repopulating directlyDave Reisner2013-08-231-10/+21
|
* notify: Create a NullNotifier as the default notifierDave Reisner2013-08-221-11/+6
| | | | This notifier is boring. It does nothing.
* pulse: avoid passing primitives by referenceDave Reisner2013-08-221-7/+7
|
* lib: remove unused varsDave Reisner2013-08-221-2/+0
|
* favor static_cast over c-style castsDave Reisner2013-08-031-19/+15
|
* pulse: capture the only needed arg, and by referenceDave Reisner2013-05-291-1/+1
| | | | oh dear c++....
* Don't connect with PA_CONTEXT_NOFAILSimon Gomizelj2013-04-081-1/+1
| | | | | | | | | | | | | | | NOFAIL means we don't fail if the daemon is not available when pa_context_connect() is called and instead enter PA_CONTEXT_CONNECTING state and wait for the daemon to appear. So currently if pulseaudio isn't running or available, ponymix will just block and wait. Since a lot of people use ponymix bound to their volume keys, this could potentially mean spawning 100s of processes before actually catching on that things aren't working. PA_CONTEXT_NOFLAGS was introduced in 0.9.19. Its really just 0. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
* always use nullptr instead of NULLDave Reisner2013-01-211-2/+2
|
* abstract volume/balance output away from ponymixDave Reisner2013-01-211-3/+23
| | | | | | Add a Notifier virtual base class and a CommandLineNotifier implementation which handles output of volume and balance levels after a change.
* use convenient methods for increase/decreaseDave Reisner2013-01-061-1/+1
|
* avoid copying the passed vector to find_fuzzyDave Reisner2013-01-061-1/+1
|
* unify logic for finding by name fragmentDave Reisner2013-01-051-33/+28
|
* store possible device/card matches as pointersDave Reisner2013-01-031-8/+9
| | | | | Avoid invoking the copy constructors and storing new objects which can't be returned (as they're local variables).
* allow fuzzy matching on devicesDave Reisner2013-01-031-4/+27
|
* 80 columns!Dave Reisner2013-01-031-1/+2
|
* properly clamp values in Set{Balance,Volume}Dave Reisner2013-01-031-8/+6
|
* allow card lookup by indexDave Reisner2013-01-031-0/+3
|
* whitespace policeDave Reisner2013-01-021-24/+24
|
* always defined behaviors for devicesDave Reisner2013-01-021-0/+6
|
* Derive the card from the targetted deviceDave Reisner2013-01-021-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unless explicitly specified, target a card based on the selected device. Note that not all devices will be tied to a card. falconindy » put differently, if i have multiple cards, what determines which card is used by pulse for a given app? tanuk » In theory, the logic can be anything (it depends on what policy-implementing modules are loaded). By default, routing is mostly handled by module-stream-restore, which chooses the sink based on the user's previous routing choices. tanuk » If the user hasn't done any routing choices, the fallback logic is to select the current "default sink". tanuk » I don't recommend trying to guess the routing policy. falconindy » i guess my understanding of pulse internals is lacking falconindy » but that's rather enlightening falconindy » is there any way to figure out the connection between a sink and a card? tanuk » Yes... (One moment, I'll look up things.) falconindy » ah. uint32_t card falconindy » appears to be in pa_sink_info falconindy » so that ties the sink to the index of a card? tanuk » Yep. falconindy » awesome, that's good enough for what i need to do tanuk » Not all sinks are part of a card, though, but those that are will have the card index set. falconindy » also good to know
* ponymix: validate arg count before invoking functionDave Reisner2013-01-021-4/+4
| | | | | | | | | | | | | | | A few changes make this fun and easy: - Merge the function array into the string to action lookup and return a Command instead of simply an enum. A Command is the function and the min/max arg count. - Implement an InRange method for the Range class. - Add a Dispatch function to convert the string to Command and validate the arguments. This leaves us in a position where the argc parameter to each method is never used, but maybe some day a command will be added that takes a range of args rather than a fixed number.
* rename class Pulse to PulseClientDave Reisner2013-01-021-34/+34
|
* oopsDave Reisner2013-01-011-4/+4
|
* fix null constructionsDave Reisner2013-01-011-6/+12
|
* initial commitDave Reisner2013-01-011-0/+561