File: audio_conversion.h

package info (click to toggle)
moc 1%3A2.5.0~alpha4%2Bsvn20091009-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,620 kB
  • ctags: 2,745
  • sloc: ansic: 28,068; cpp: 523; makefile: 235; sh: 19
file content (32 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef AUDIO_CONVERSION_H
#define AUDIO_CONVERSION_H

#include <sys/types.h>

#ifdef HAVE_SAMPLERATE
# include <samplerate.h>
#endif

#include "audio.h"

struct audio_conversion
{
	struct sound_params from;
	struct sound_params to;
	
#ifdef HAVE_SAMPLERATE
	SRC_STATE *src_state;
	float *resample_buf;
	size_t resample_buf_nsamples; /* in samples ( sizeof(float) ) */
#endif
	
};

int audio_conv_new (struct audio_conversion *conv,
		const struct sound_params *from,
		const struct sound_params *to);
char *audio_conv (struct audio_conversion *conv,
		const char *buf, const size_t size, size_t *conv_len);
void audio_conv_destroy (struct audio_conversion *conv);

#endif