mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
add pa_ prefix to all identifiers.
fix downsampling/resampling add support for U8 samples git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@49 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a8a5ab1c79
commit
e61c2dddb7
91 changed files with 1795 additions and 1643 deletions
36
src/client.c
36
src/client.c
|
|
@ -6,12 +6,12 @@
|
|||
#include "client.h"
|
||||
#include "strbuf.h"
|
||||
|
||||
struct client *client_new(struct core *core, const char *protocol_name, char *name) {
|
||||
struct client *c;
|
||||
struct pa_client *pa_client_new(struct pa_core *core, const char *protocol_name, char *name) {
|
||||
struct pa_client *c;
|
||||
int r;
|
||||
assert(core);
|
||||
|
||||
c = malloc(sizeof(struct client));
|
||||
c = malloc(sizeof(struct pa_client));
|
||||
assert(c);
|
||||
c->name = name ? strdup(name) : NULL;
|
||||
c->core = core;
|
||||
|
|
@ -20,48 +20,48 @@ struct client *client_new(struct core *core, const char *protocol_name, char *na
|
|||
c->kill = NULL;
|
||||
c->userdata = NULL;
|
||||
|
||||
r = idxset_put(core->clients, c, &c->index);
|
||||
assert(c->index != IDXSET_INVALID && r >= 0);
|
||||
r = pa_idxset_put(core->clients, c, &c->index);
|
||||
assert(c->index != PA_IDXSET_INVALID && r >= 0);
|
||||
|
||||
fprintf(stderr, "client: created %u \"%s\"\n", c->index, c->name);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void client_free(struct client *c) {
|
||||
void pa_client_free(struct pa_client *c) {
|
||||
assert(c && c->core);
|
||||
|
||||
idxset_remove_by_data(c->core->clients, c, NULL);
|
||||
pa_idxset_remove_by_data(c->core->clients, c, NULL);
|
||||
fprintf(stderr, "client: freed %u \"%s\"\n", c->index, c->name);
|
||||
free(c->name);
|
||||
free(c);
|
||||
}
|
||||
|
||||
void client_kill(struct client *c) {
|
||||
void pa_client_kill(struct pa_client *c) {
|
||||
assert(c);
|
||||
if (c->kill)
|
||||
c->kill(c);
|
||||
}
|
||||
|
||||
char *client_list_to_string(struct core *c) {
|
||||
struct strbuf *s;
|
||||
struct client *client;
|
||||
uint32_t index = IDXSET_INVALID;
|
||||
char *pa_client_list_to_string(struct pa_core *c) {
|
||||
struct pa_strbuf *s;
|
||||
struct pa_client *client;
|
||||
uint32_t index = PA_IDXSET_INVALID;
|
||||
assert(c);
|
||||
|
||||
s = strbuf_new();
|
||||
s = pa_strbuf_new();
|
||||
assert(s);
|
||||
|
||||
strbuf_printf(s, "%u client(s).\n", idxset_ncontents(c->clients));
|
||||
pa_strbuf_printf(s, "%u client(s).\n", pa_idxset_ncontents(c->clients));
|
||||
|
||||
for (client = idxset_first(c->clients, &index); client; client = idxset_next(c->clients, &index))
|
||||
strbuf_printf(s, " index: %u, name: <%s>, protocol_name: <%s>\n", client->index, client->name, client->protocol_name);
|
||||
for (client = pa_idxset_first(c->clients, &index); client; client = pa_idxset_next(c->clients, &index))
|
||||
pa_strbuf_printf(s, " index: %u, name: <%s>, protocol_name: <%s>\n", client->index, client->name, client->protocol_name);
|
||||
|
||||
return strbuf_tostring_free(s);
|
||||
return pa_strbuf_tostring_free(s);
|
||||
}
|
||||
|
||||
|
||||
void client_rename(struct client *c, const char *name) {
|
||||
void pa_client_rename(struct pa_client *c, const char *name) {
|
||||
assert(c);
|
||||
free(c->name);
|
||||
c->name = name ? strdup(name) : NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue