sink-input,source-output: Add an update_rate() function
[profile/ivi/pulseaudio-panda.git] / src / pulsecore / source-output.h
index 4bcddba..e60430f 100644 (file)
 typedef struct pa_source_output pa_source_output;
 
 #include <pulse/sample.h>
-#include <pulsecore/source.h>
 #include <pulse/format.h>
 #include <pulsecore/memblockq.h>
 #include <pulsecore/resampler.h>
 #include <pulsecore/module.h>
 #include <pulsecore/client.h>
+#include <pulsecore/source.h>
+#include <pulsecore/core.h>
 #include <pulsecore/sink-input.h>
 
 typedef enum pa_source_output_state {
@@ -86,8 +87,6 @@ struct pa_source_output {
     pa_channel_map channel_map;
     pa_format_info *format;
 
-    pa_source_output *sync_prev, *sync_next;
-
     /* Also see http://pulseaudio.org/wiki/InternalVolumes */
     pa_cvolume volume;             /* The volume clients are informed about */
     pa_cvolume reference_ratio;    /* The ratio of the stream's volume to the source's reference volume */
@@ -125,11 +124,11 @@ struct pa_source_output {
      * changes. Called from IO context. */
     void (*update_source_requested_latency) (pa_source_output *o); /* may be NULL */
 
-    /* Called whenver the latency range of the source changes. Called
+    /* Called whenever the latency range of the source changes. Called
      * from IO context. */
     void (*update_source_latency_range) (pa_source_output *o); /* may be NULL */
 
-    /* Called whenver the fixed latency of the source changes, if there
+    /* Called whenever the fixed latency of the source changes, if there
      * is one. Called from IO context. */
     void (*update_source_fixed_latency) (pa_source_output *i); /* may be NULL */
 
@@ -164,7 +163,7 @@ struct pa_source_output {
      * context. */
     void (*kill)(pa_source_output* o);              /* may NOT be NULL */
 
-    /* Return the current latency (i.e. length of bufferd audio) of
+    /* Return the current latency (i.e. length of buffered audio) of
     this stream. Called from main context. This is added to what the
     PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY message sent to the IO thread
     returns */
@@ -207,8 +206,6 @@ struct pa_source_output {
          * don't implement rewind() */
         pa_memblockq *delay_memblockq;
 
-        pa_source_output *sync_prev, *sync_next;
-
         /* The requested latency for the source */
         pa_usec_t requested_source_latency;
 
@@ -253,8 +250,6 @@ typedef struct pa_source_output_new_data {
 
     pa_resample_method_t resample_method;
 
-    pa_source_output *sync_base;
-
     pa_sample_spec sample_spec;
     pa_channel_map channel_map;
     pa_format_info *format;
@@ -306,12 +301,13 @@ pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t
 void pa_source_output_cork(pa_source_output *o, pa_bool_t b);
 
 int pa_source_output_set_rate(pa_source_output *o, uint32_t rate);
+int pa_source_output_update_rate(pa_source_output *o);
 
 size_t pa_source_output_get_max_rewind(pa_source_output *o);
 
 /* Callable by everyone */
 
-/* External code may request disconnection with this funcion */
+/* External code may request disconnection with this function */
 void pa_source_output_kill(pa_source_output*o);
 
 pa_usec_t pa_source_output_get_latency(pa_source_output *o, pa_usec_t *source_latency);
@@ -334,7 +330,7 @@ pa_bool_t pa_source_output_may_move(pa_source_output *o);
 pa_bool_t pa_source_output_may_move_to(pa_source_output *o, pa_source *dest);
 int pa_source_output_move_to(pa_source_output *o, pa_source *dest, pa_bool_t save);
 
-/* The same as pa_source_output_move_to() but in two seperate steps,
+/* The same as pa_source_output_move_to() but in two separate steps,
  * first the detaching from the old source, then the attaching to the
  * new source */
 int pa_source_output_start_move(pa_source_output *o);