[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-247-ga3b5a94
Lennart Poettering
gitmailer-noreply at 0pointer.de
Fri Nov 20 08:49:13 PST 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 9033140f18db820f3be9a6acae88a118d9154cf6 (commit)
- Log -----------------------------------------------------------------
a3b5a94 pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state
b8acf55 daemon: complain if user passes too many arguments
-----------------------------------------------------------------------
Summary of changes:
src/daemon/main.c | 37 +++++++++++++++++++++++++++++++++++++
src/pulse/stream.c | 17 ++++++++++++++++-
2 files changed, 53 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
commit b8acf5586f3f8e2af61b81569a53749f4afd090b
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Nov 20 17:48:04 2009 +0100
daemon: complain if user passes too many arguments
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 4891182..e656836 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -537,6 +537,12 @@ int main(int argc, char *argv[]) {
goto finish;
case PA_CMD_DUMP_CONF: {
+
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
s = pa_daemon_conf_dump(conf);
fputs(s, stdout);
pa_xfree(s);
@@ -547,6 +553,11 @@ int main(int argc, char *argv[]) {
case PA_CMD_DUMP_RESAMPLE_METHODS: {
int i;
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
for (i = 0; i < PA_RESAMPLER_MAX; i++)
if (pa_resample_method_supported(i))
printf("%s\n", pa_resample_method_to_string(i));
@@ -561,6 +572,12 @@ int main(int argc, char *argv[]) {
goto finish;
case PA_CMD_VERSION :
+
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
printf(PACKAGE_NAME" "PACKAGE_VERSION"\n");
retval = 0;
goto finish;
@@ -568,6 +585,11 @@ int main(int argc, char *argv[]) {
case PA_CMD_CHECK: {
pid_t pid;
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
if (pa_pid_file_check_running(&pid, "pulseaudio") < 0)
pa_log_info(_("Daemon not running"));
else {
@@ -580,6 +602,11 @@ int main(int argc, char *argv[]) {
}
case PA_CMD_KILL:
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
if (pa_pid_file_kill(SIGINT, NULL, "pulseaudio") < 0)
pa_log(_("Failed to kill daemon: %s"), pa_cstrerror(errno));
else
@@ -589,6 +616,11 @@ int main(int argc, char *argv[]) {
case PA_CMD_CLEANUP_SHM:
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
if (pa_shm_cleanup() >= 0)
retval = 0;
@@ -598,6 +630,11 @@ int main(int argc, char *argv[]) {
pa_assert(conf->cmd == PA_CMD_DAEMON || conf->cmd == PA_CMD_START);
}
+ if (d < argc) {
+ pa_log("Too many arguments.\n");
+ goto finish;
+ }
+
if (getuid() == 0 && !conf->system_instance)
pa_log_warn(_("This program is not intended to be run as root (unless --system is specified)."));
#ifndef HAVE_DBUS /* A similar, only a notice worthy check was done earlier, if D-Bus is enabled. */
commit a3b5a944885ff92233aa02e390312fbc04671686
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Nov 20 17:49:30 2009 +0100
pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 2997962..04a4242 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -376,6 +376,22 @@ static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t
if (!s->smoother)
return;
+ if (!s->timing_info_valid &&
+ !aposteriori &&
+ !force_start &&
+ !force_stop &&
+ s->context->version >= 13) {
+
+ /* If the server supports STARTED and UNDERFLOW events we take
+ * them as indications when audio really starts/stops playing,
+ * if we don't have any timing info yet -- instead of trying
+ * to be smart and guessing the server time. Otherwise the
+ * unknown transport delay we don't know might add too much
+ * noise to our time calculations. */
+
+ return;
+ }
+
x = pa_rtclock_now();
if (s->timing_info_valid) {
@@ -390,7 +406,6 @@ static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t
else if (force_start || s->buffer_attr.prebuf == 0)
pa_smoother_resume(s->smoother, x, TRUE);
-
/* Please note that we have no idea if playback actually started
* if prebuf is non-zero! */
}
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list