summaryrefslogtreecommitdiffstats
path: root/pulse/pulse.c
Commit message (Collapse)AuthorAgeFilesLines
* pulse: get rid of a number of assert()sLennart Poettering2009-08-031-10/+24
| | | | | | | | | | Instead of hitting an assert when any of the plugin functions is called in an invalid context we should return a clean error to make sure programs are not unnecessarily aborted. This should fix issues such as http://pulseaudio.org/ticket/595 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Fix destruction logic on failed constructionLennart Poettering2008-09-261-0/+6
| | | | | | | We need to stop the main loop first, then free the context and finally free the mainloop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Start PA event loop after we have created the contextLennart Poettering2008-09-261-3/+3
| | | | | | | | We shouldn't be passing the main loop object to the pa_context while that loop is running and not locked. Push the main loop startup after we created the main loop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Remove our own poll handler implementation entirelyLennart Poettering2008-09-031-24/+0
| | | | | Neither pcm_pulse.c nor ctl_pulse.c is using our poll handler implementation anymore, so let's get rid of the common parts previously used by them, too
* Save a byte of memoryLennart Poettering2008-09-031-1/+2
| | | | | | | Since we only need a single char, we should allocate only a single char, instead of a string of two bytes. Woah! We're saving memory, baby!
* Split out O_NONBLOCK setting into seperate functionLennart Poettering2008-09-031-2/+14
| | | | Since we set O_NONBLOCK more than once, make it a nice and correct function.
* A bag of minor clean-ups for pulse.cLennart Poettering2008-09-031-22/+60
| | | | Use more error checking where appropriate, optimize a few things.
* Get rid of pulse_poll_revents()Lennart Poettering2008-09-031-8/+0
| | | | pulse_poll_revents() has no real purpose, so let's remove it.
* Add trailing NUL character to snprintf outputLennart Poettering2008-09-031-0/+1
| | | | | snprintf doesn't necessarily append a trailing NUL to the strings it writes. So let's do it explicitly.
* use SNDERR instead of fprintf to print error messagesLennart Poettering2008-09-031-1/+1
| | | | | We shouldn't spam on stderr unconditionally, so let's use ALSA subsystem for printing errors.
* Call pa_context_disconnect() explicitlyLennart Poettering2008-09-031-0/+1
| | | | | | | | Make sure the pa_context is disconnected when we unref it. This is also done implicitly when the last reference to the pa_context is dropped, but that might be later then expected in case someone else took a reference on our object. To make sure that the pa_context will than not make any call into our code, disconnect it explicitly.
* Don't modify the SIGPIPE handlerLennart Poettering2008-09-031-2/+0
| | | | | | Since quite a while (2 years or so) PulsAudio doesn't require SIGPIPE anymore to be set to SIG_IGN. Since resetting this was incredibly ugly in the first place it is now time to get rid of this.
* Make pulse_new() a proper C functionLennart Poettering2008-09-031-1/+1
| | | | | C functions taking no argument need a (void) as argument list. It's C++ where () is allowed too.
* Add Emacs-style /*-*- linux-c -*-*/ header commentLennart Poettering2008-09-031-0/+2
| | | | | As suggested in the kernel's CodingStyle document force Emacs into kernel-style indenting to prevent future indenting chaos, at least for Emacs users.
* Reindent to Linux kernel styleLennart Poettering2008-09-031-133/+141
| | | | | | | The PulseAudio plugin was horrible mix-up of different indenting styles even in the same files. Indenting by 4, by 2, by 8 characters, sometimes with tabs, sometimes with spaces. To fix this chaos I ran all files through "indent -kr -i8". Hopefully future patches will follow kernel style indenting too.
* Follow Polypaudio/PulseAudio name changePierre Ossman2006-07-121-0/+260
Polypaudio recently changed its name to PulseAudio which affects the names of libraries of header files. Update the polyp, now pulse, plug-in to follow this name change. Signed-off-by: Pierre Ossman <ossman@cendio.se>