#define foosamplehfoo
#include <inttypes.h>
-
-#include "memblock.h"
-
-enum sample_format {
- SAMPLE_U8,
- SAMPLE_ALAW,
- SAMPLE_ULAW,
- SAMPLE_S16LE,
- SAMPLE_S16BE,
- SAMPLE_FLOAT32
+#include <sys/types.h>
+
+enum pa_sample_format {
+ PA_SAMPLE_U8,
+ PA_SAMPLE_ALAW,
+ PA_SAMPLE_ULAW,
+ PA_SAMPLE_S16LE,
+ PA_SAMPLE_S16BE,
+ PA_SAMPLE_FLOAT32,
+ PA_SAMPLE_MAX
};
-#define SAMPLE_S16NE SAMPLE_S16LE
+#define PA_SAMPLE_S16NE PA_SAMPLE_S16LE
-struct sample_spec {
- enum sample_format format;
+struct pa_sample_spec {
+ enum pa_sample_format format;
uint32_t rate;
- uint32_t channels;
+ uint8_t channels;
};
-#define DEFAULT_SAMPLE_SPEC default_sample_spec
-
-extern struct sample_spec default_sample_spec;
-
-struct memblock *silence(struct memblock* b, struct sample_spec *spec);
-void add_clip(struct memchunk *target, struct memchunk *chunk, struct sample_spec *spec);
+size_t pa_bytes_per_second(struct pa_sample_spec *spec);
+size_t pa_sample_size(struct pa_sample_spec *spec);
+uint32_t pa_samples_usec(size_t length, struct pa_sample_spec *spec);
-size_t bytes_per_second(struct sample_spec *spec);
-size_t sample_size(struct sample_spec *spec);
+int pa_sample_spec_valid(struct pa_sample_spec *spec);
#endif