mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
commit glitch-free work
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2122 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
347cfc356a
commit
12c01e942d
50 changed files with 2877 additions and 1194 deletions
|
|
@ -62,10 +62,12 @@ struct pa_source_output {
|
|||
|
||||
uint32_t index;
|
||||
pa_core *core;
|
||||
|
||||
pa_source_output_state_t state;
|
||||
pa_source_output_flags_t flags;
|
||||
|
||||
char *name, *driver; /* may be NULL */
|
||||
pa_proplist *proplist;
|
||||
char *driver; /* may be NULL */
|
||||
pa_module *module; /* may be NULL */
|
||||
pa_client *client; /* may be NULL */
|
||||
|
||||
|
|
@ -74,6 +76,8 @@ struct pa_source_output {
|
|||
pa_sample_spec sample_spec;
|
||||
pa_channel_map channel_map;
|
||||
|
||||
pa_resample_method_t resample_method;
|
||||
|
||||
/* Pushes a new memchunk into the output. Called from IO thread
|
||||
* context. */
|
||||
void (*push)(pa_source_output *o, const pa_memchunk *chunk);
|
||||
|
|
@ -86,14 +90,14 @@ struct pa_source_output {
|
|||
* disconnected from its source. Called from IO thread context */
|
||||
void (*detach) (pa_source_output *o); /* may be NULL */
|
||||
|
||||
/* If non-NULL called whenever the the source this output is attached
|
||||
* to changes. Called from main context */
|
||||
void (*moved) (pa_source_output *o); /* may be NULL */
|
||||
|
||||
/* If non-NULL called whenever the the source this output is attached
|
||||
* to suspends or resumes. Called from main context */
|
||||
void (*suspend) (pa_source_output *o, pa_bool_t b); /* may be NULL */
|
||||
|
||||
/* If non-NULL called whenever the the source this output is attached
|
||||
* to changes. Called from main context */
|
||||
void (*moved) (pa_source_output *o); /* may be NULL */
|
||||
|
||||
/* Supposed to unlink and destroy this stream. Called from main
|
||||
* context. */
|
||||
void (*kill)(pa_source_output* o); /* may be NULL */
|
||||
|
|
@ -104,8 +108,6 @@ struct pa_source_output {
|
|||
thread instead. */
|
||||
pa_usec_t (*get_latency) (pa_source_output *o); /* may be NULL */
|
||||
|
||||
pa_resample_method_t resample_method;
|
||||
|
||||
struct {
|
||||
pa_source_output_state_t state;
|
||||
|
||||
|
|
@ -114,6 +116,9 @@ struct pa_source_output {
|
|||
pa_sample_spec sample_spec;
|
||||
|
||||
pa_resampler* resampler; /* may be NULL */
|
||||
|
||||
/* The requested latency for the source */
|
||||
pa_usec_t requested_source_latency;
|
||||
} thread_info;
|
||||
|
||||
void *userdata;
|
||||
|
|
@ -126,11 +131,14 @@ enum {
|
|||
PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY,
|
||||
PA_SOURCE_OUTPUT_MESSAGE_SET_RATE,
|
||||
PA_SOURCE_OUTPUT_MESSAGE_SET_STATE,
|
||||
PA_SOURCE_OUTPUT_MESSAGE_SET_REQUESTED_LATENCY,
|
||||
PA_SOURCE_OUTPUT_MESSAGE_MAX
|
||||
};
|
||||
|
||||
typedef struct pa_source_output_new_data {
|
||||
const char *name, *driver;
|
||||
pa_proplist *proplist;
|
||||
|
||||
const char *driver;
|
||||
pa_module *module;
|
||||
pa_client *client;
|
||||
|
||||
|
|
@ -152,7 +160,7 @@ typedef struct pa_source_output_move_hook_data {
|
|||
pa_source_output_new_data* pa_source_output_new_data_init(pa_source_output_new_data *data);
|
||||
void pa_source_output_new_data_set_sample_spec(pa_source_output_new_data *data, const pa_sample_spec *spec);
|
||||
void pa_source_output_new_data_set_channel_map(pa_source_output_new_data *data, const pa_channel_map *map);
|
||||
void pa_source_output_new_data_set_volume(pa_source_output_new_data *data, const pa_cvolume *volume);
|
||||
void pa_source_output_new_data_done(pa_source_output_new_data *data);
|
||||
|
||||
/* To be called by the implementing module only */
|
||||
|
||||
|
|
@ -166,6 +174,8 @@ void pa_source_output_unlink(pa_source_output*o);
|
|||
|
||||
void pa_source_output_set_name(pa_source_output *i, const char *name);
|
||||
|
||||
void pa_source_output_set_requested_latency(pa_source_output *i, pa_usec_t usec);
|
||||
|
||||
/* Callable by everyone */
|
||||
|
||||
/* External code may request disconnection with this funcion */
|
||||
|
|
@ -186,6 +196,7 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest);
|
|||
/* To be used exclusively by the source driver thread */
|
||||
|
||||
void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk);
|
||||
|
||||
int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue