[pulseaudio-commits] r1596 - in /branches/lennart/src/pulsecore: core-scache.c core-scache.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Aug 9 06:47:26 PDT 2007


Author: lennart
Date: Thu Aug  9 15:47:25 2007
New Revision: 1596

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1596&root=3Dpulseaudio&vi=
ew=3Drev
Log:
add new function pa_scache_play_item_by_name

Modified:
    branches/lennart/src/pulsecore/core-scache.c
    branches/lennart/src/pulsecore/core-scache.h

Modified: branches/lennart/src/pulsecore/core-scache.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
core-scache.c?rev=3D1596&root=3Dpulseaudio&r1=3D1595&r2=3D1596&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/core-scache.c (original)
+++ branches/lennart/src/pulsecore/core-scache.c Thu Aug  9 15:47:25 2007
@@ -304,6 +304,19 @@
     return 0;
 }
 =

+int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*s=
ink_name, pa_volume_t volume, int autoload) {
+    pa_sink *sink;
+    =

+    pa_assert(c);
+    pa_assert(name);
+
+    if (!(sink =3D pa_namereg_get(c, sink_name, PA_NAMEREG_SINK, autoload)=
))
+        return -1;
+
+    return pa_scache_play_item(c, name, sink, volume);
+}
+
+
 const char * pa_scache_get_name_by_id(pa_core *c, uint32_t id) {
     pa_scache_entry *e;
     assert(c && id !=3D PA_IDXSET_INVALID);

Modified: branches/lennart/src/pulsecore/core-scache.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
core-scache.h?rev=3D1596&root=3Dpulseaudio&r1=3D1595&r2=3D1596&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/core-scache.h (original)
+++ branches/lennart/src/pulsecore/core-scache.h Thu Aug  9 15:47:25 2007
@@ -55,6 +55,7 @@
 =

 int pa_scache_remove_item(pa_core *c, const char *name);
 int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_vo=
lume_t volume);
+int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*s=
ink_name, pa_volume_t volume, int autoload);
 void pa_scache_free(pa_core *c);
 =

 const char *pa_scache_get_name_by_id(pa_core *c, uint32_t id);




More information about the pulseaudio-commits mailing list