Home
last modified time | relevance | path

Searched refs:sox_sample_t (Results 1 – 25 of 102) sorted by relevance

12345

/OK3568_Linux_fs/buildroot/dl/sox/git/src/
H A Dreverse.c33 static int flow(sox_effect_t * effp, const sox_sample_t * ibuf, in flow()
34 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in flow()
45 static int drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in drain()
53 if (p->pos % sizeof(sox_sample_t) != 0) { in drain()
57 p->pos /= sizeof(sox_sample_t); in drain()
60 fseeko(p->tmp_file, (off_t)(p->pos * sizeof(sox_sample_t)), SEEK_SET); in drain()
61 if (fread(obuf, sizeof(sox_sample_t), *osamp, p->tmp_file) != *osamp) { in drain()
66 sox_sample_t temp = obuf[i]; in drain()
H A Dmcompand.c63 sox_sample_t *delay_buf; /* Old samples, used for delay processing */
71 sox_sample_t *band_buf1, *band_buf2, *band_buf3;
266 double s = samp/(~((sox_sample_t)1<<31)); in doVolume()
275 …w_1(sox_effect_t * effp, priv_t * c, comp_band_t * l, const sox_sample_t *ibuf, sox_sample_t *obuf… in sox_mcompand_flow_1()
360 static int flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in flow()
366 sox_sample_t *abuf, *bbuf, *cbuf, *oldabuf, *ibuf_copy; in flow()
370 c->band_buf1 = lsx_realloc(c->band_buf1,len*sizeof(sox_sample_t)); in flow()
371 c->band_buf2 = lsx_realloc(c->band_buf2,len*sizeof(sox_sample_t)); in flow()
372 c->band_buf3 = lsx_realloc(c->band_buf3,len*sizeof(sox_sample_t)); in flow()
378 ibuf_copy = lsx_malloc(*isamp * sizeof(sox_sample_t)); in flow()
[all …]
H A Dsilence.c37 sox_sample_t *start_holdoff;
49 sox_sample_t *stop_holdoff;
260 silence->start_holdoff = lsx_malloc(sizeof(sox_sample_t)*silence->start_duration); in sox_silence_start()
265 silence->stop_holdoff = lsx_malloc(sizeof(sox_sample_t)*silence->stop_duration); in sox_silence_start()
276 sox_sample_t value /* >= 0 */, double threshold, int unit) in aboveThreshold()
280 sox_sample_t masked_value = value & (-1 << (32 - effp->in_signal.precision)); in aboveThreshold()
292 static sox_sample_t compute_rms(sox_effect_t * effp, sox_sample_t sample) in compute_rms()
296 sox_sample_t rms; in compute_rms()
307 static void update_rms(sox_effect_t * effp, sox_sample_t sample) in update_rms()
322 static int sox_silence_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in sox_silence_flow()
[all …]
H A Dadpcm.c41 sox_sample_t step; /* step size */
55 sox_sample_t stepAdjustTable[] = {
79 static inline sox_sample_t AdpcmDecode(sox_sample_t c, MsState_t *state, in AdpcmDecode()
80 sox_sample_t sample1, sox_sample_t sample2) in AdpcmDecode()
82 sox_sample_t vlin; in AdpcmDecode()
83 sox_sample_t sample; in AdpcmDecode()
84 sox_sample_t step; in AdpcmDecode()
89 sox_sample_t nstep; in AdpcmDecode()
H A Dsplice.c21 const sox_sample_t * a, const sox_sample_t * b, size_t length) in difference()
33 static size_t best_overlap_position(sox_sample_t const * f1, in best_overlap_position()
34 sox_sample_t const * f2, uint64_t overlap, uint64_t search, size_t channels) in best_overlap_position()
62 sox_sample_t * buffer;
66 static void splice(sox_effect_t * effp, const sox_sample_t * in1, const in splice()
67 sox_sample_t * in2, sox_sample_t * output, uint64_t overlap, size_t channels) in splice()
108 sox_sample_t * f, uint64_t overlap, uint64_t search, size_t channels) in do_splice()
200 static int flow(sox_effect_t * effp, const sox_sample_t * ibuf, in flow()
201 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in flow()
263 static int drain(sox_effect_t * effp, sox_sample_t * obuf, size_t * osamp) in drain()
H A Decho.c169 static int sox_echo_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in sox_echo_flow()
175 sox_sample_t out; in sox_echo_flow()
191 out = SOX_24BIT_CLIP_COUNT((sox_sample_t) d_out, effp->clips); in sox_echo_flow()
205 static int sox_echo_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in sox_echo_drain()
209 sox_sample_t out; in sox_echo_drain()
225 out = SOX_24BIT_CLIP_COUNT((sox_sample_t) d_out, effp->clips); in sox_echo_drain()
H A Deffects.c36 int lsx_flow_copy(sox_effect_t * effp UNUSED, const sox_sample_t * ibuf, in lsx_flow_copy()
37 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in lsx_flow_copy()
45 static int default_drain(sox_effect_t * effp UNUSED, sox_sample_t *obuf UNUSED, size_t *osamp) in default_drain()
235 static void interleave(size_t flows, size_t length, sox_sample_t *from,
236 size_t bufsiz, size_t offset, sox_sample_t *to);
237 static void deinterleave(size_t flows, size_t length, sox_sample_t *from,
238 sox_sample_t *to, size_t bufsiz, size_t offset);
268 sox_sample_t *obuf = il_change ? chain->il_buf : effp->obuf; in flow_effect()
363 sox_sample_t *obuf = il_change ? chain->il_buf : effp->obuf; in drain_effect()
425 chain->il_buf = lsx_malloc(sox_globals.bufsiz * sizeof(sox_sample_t)); in sox_flow_effects()
[all …]
H A Dearwax.c19 static const sox_sample_t filt[32 * 2] = {
55 typedef struct {sox_sample_t tap[NUMTAPS];} priv_t; /* FIR filter z^-1 delays */
70 static int flow(sox_effect_t * effp, const sox_sample_t * ibuf, in flow()
71 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in flow()
H A Dechos.c166 static int sox_echos_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in sox_echos_flow()
172 sox_sample_t out; in sox_echos_flow()
186 out = SOX_24BIT_CLIP_COUNT((sox_sample_t) d_out, effp->clips); in sox_echos_flow()
208 static int sox_echos_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in sox_echos_drain()
212 sox_sample_t out; in sox_echos_drain()
226 out = SOX_24BIT_CLIP_COUNT((sox_sample_t) d_out, effp->clips); in sox_echos_drain()
H A Dtx16w.c47 sox_sample_t odd;
180 static size_t read_samples(sox_format_t * ft, sox_sample_t *buf, size_t len) in read_samples()
219 *buf = (sox_sample_t) s1; in read_samples()
222 *buf = (sox_sample_t) s2; in read_samples()
254 static size_t write_samples(sox_format_t * ft, const sox_sample_t *buf, size_t len0) in write_samples()
258 sox_sample_t w1, w2; in write_samples()
294 sox_sample_t pad = 0; in stopwrite()
H A Dsox.h451 typedef sox_int32_t sox_sample_t; typedef
690 #define SOX_SAMPLE_MAX (sox_sample_t)SOX_INT_MAX(32)
696 #define SOX_SAMPLE_MIN (sox_sample_t)SOX_INT_MIN(32)
727 #define SOX_SAMPLE_LOCALS sox_sample_t sox_macro_temp_sample LSX_UNUSED; \
770 #define SOX_SIGNED_TO_SAMPLE(bits,d) ((sox_sample_t)(d) << (32-bits))
844 ((sox_sample_t)(d) ^ SOX_SAMPLE_NEG)
853 #define SOX_SIGNED_32BIT_TO_SAMPLE(d,clips) (sox_sample_t)(d)
872 (sox_sample_t)( \
1137 …LSX_PARAM_OUT_CAP_POST_COUNT(len,return) sox_sample_t *buf, /**< Buffer from which to read samples…
1169 LSX_PARAM_IN_COUNT(len) sox_sample_t const * buf, /**< Buffer to which samples are written. */
[all …]
H A Dchorus.c241 static int sox_chorus_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in sox_chorus_flow()
247 sox_sample_t out; in sox_chorus_flow()
262 out = SOX_24BIT_CLIP_COUNT((sox_sample_t) d_out, effp->clips); in sox_chorus_flow()
279 static int sox_chorus_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in sox_chorus_drain()
286 sox_sample_t out; in sox_chorus_drain()
299 out = SOX_24BIT_CLIP_COUNT((sox_sample_t) d_out, effp->clips); in sox_chorus_drain()
H A Dnulfile.c34 static size_t read_samples(sox_format_t * ft, sox_sample_t * buf, size_t len) in read_samples()
38 memset(buf, 0, sizeof(sox_sample_t) * len); in read_samples()
43 sox_format_t * ft, sox_sample_t const * buf, size_t len) in write_samples()
H A Dbiquad.h67 sox_sample_t i1, i2; /* Filter memory */
75 int lsx_biquad_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf,
H A Dpulseaudio.c97 static size_t read_samples(sox_format_t *ft, sox_sample_t *buf, size_t nsamp) in read_samples()
105 len = nsamp * sizeof(sox_sample_t); in read_samples()
123 static size_t write_samples(sox_format_t *ft, const sox_sample_t *buf, size_t nsamp) in write_samples()
134 len = nsamp * sizeof(sox_sample_t); in write_samples()
H A Draw.c71 sox_format_t * ft, sox_sample_t *buf, size_t len) \
99 sox_format_t * ft, sox_sample_t const * buf, size_t len) \
168 (sox_format_t * ft, sox_sample_t * buf, size_t len);
173 size_t lsx_rawread(sox_format_t * ft, sox_sample_t * buf, size_t nsamp) in GET_FORMAT()
183 (sox_format_t * ft, sox_sample_t const * buf, size_t len);
189 sox_format_t * ft, sox_sample_t const * buf, size_t nsamp) in GET_FORMAT()
H A Ddivide.c27 sox_sample_t * last;
37 static int flow(sox_effect_t * effp, const sox_sample_t * ibuf, in flow()
38 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in flow()
H A Dskeleff.c63 static int flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in flow()
96 static int drain(sox_effect_t UNUSED * effp, sox_sample_t UNUSED *obuf, size_t *osamp) in drain()
H A Dstretch.c44 sox_sample_t *ibuf; /* input buffer */
141 p->ibuf = lsx_malloc(p->segment * sizeof(sox_sample_t)); in start()
208 static int flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in flow()
220 memcpy(p->ibuf + p->index, ibuf + iindex, tocopy * sizeof(sox_sample_t)); in flow()
275 static int drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in drain()
H A Dladspa.c324 static int sox_ladspa_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in sox_ladspa_flow()
356 const sox_sample_t s = *ibuf++; in sox_ladspa_flow()
413 static int sox_ladspa_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in sox_ladspa_drain()
416 sox_sample_t *ibuf, *dbuf; in sox_ladspa_drain()
428 ibuf = lsx_calloc(isamp, sizeof(sox_sample_t)); in sox_ladspa_drain()
429 dbuf = lsx_calloc(dsamp, sizeof(sox_sample_t)); in sox_ladspa_drain()
433 memcpy(obuf, dbuf, *osamp * sizeof(sox_sample_t)); in sox_ladspa_drain()
H A Dflac.c38 sox_sample_t *req_buffer; /* this may be on the stack */
40 sox_sample_t *leftover_buf; /* heap */
156 sox_sample_t * dst = p->req_buffer; in decoder_write_callback()
177 p->leftover_buf = lsx_malloc(to_stash * sizeof(sox_sample_t)); in decoder_write_callback()
260 static size_t read_samples(sox_format_t * const ft, sox_sample_t * sampleBuffer, size_t const reque… in read_samples()
285 size_t req_bytes = requested * sizeof(sox_sample_t); in read_samples()
290 (size_t)p->number_of_leftover_samples * sizeof(sox_sample_t)); in read_samples()
296 p->number_of_leftover_samples * sizeof(sox_sample_t)); in read_samples()
527 static size_t write_samples(sox_format_t * const ft, sox_sample_t const * const sampleBuffer, size_… in write_samples()
H A Ddelay.c27 sox_sample_t * buffer;
111 static int flow(sox_effect_t * effp, const sox_sample_t * ibuf, in flow()
112 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in flow()
132 static int drain(sox_effect_t * effp, sox_sample_t * obuf, size_t * osamp) in drain()
H A Dvox.h20 size_t lsx_vox_read(sox_format_t * ft, sox_sample_t *buffer, size_t len);
22 size_t lsx_vox_write(sox_format_t * ft, const sox_sample_t *buffer, size_t length);
H A Dexample1.c36 sox_effect_t * effp, sox_sample_t * obuf, size_t * osamp) in input_drain()
59 static int output_flow(sox_effect_t *effp LSX_UNUSED, sox_sample_t const * ibuf, in output_flow()
60 sox_sample_t * obuf LSX_UNUSED, size_t * isamp, size_t * osamp) in output_flow()
H A Drepeat.c60 static int flow(sox_effect_t * effp, const sox_sample_t * ibuf, in flow()
61 sox_sample_t * obuf, size_t * isamp, size_t * osamp) in flow()
75 static int drain(sox_effect_t * effp, sox_sample_t * obuf, size_t * osamp) in drain()

12345