mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
add new function pa_scache_play_item_by_name
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1596 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
23ba125725
commit
0c29a2f1db
2 changed files with 14 additions and 0 deletions
|
|
@ -304,6 +304,19 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
|
|||
return 0;
|
||||
}
|
||||
|
||||
int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_name, pa_volume_t volume, int autoload) {
|
||||
pa_sink *sink;
|
||||
|
||||
pa_assert(c);
|
||||
pa_assert(name);
|
||||
|
||||
if (!(sink = 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 != PA_IDXSET_INVALID);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname);
|
|||
|
||||
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_volume_t volume);
|
||||
int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue