7 #ifndef HAS_LIVES_AUDIO_H
8 #define HAS_LIVES_AUDIO_H
10 #define SAMPLE_MAX_16BIT_P 32767.0f
11 #define SAMPLE_MAX_16BIT_N 32768.0f
12 #define SAMPLE_MAX_16BITI 32768
24 # define DEFAULT_AUDIO_RATE 44100
25 # define DEFAULT_AUDIO_CHANS 2
26 # define DEFAULT_AUDIO_SAMPS 16
27 # define DEFAULT_AUDIO_SIGNED8 (AFORM_UNSIGNED)
28 # define DEFAULT_AUDIO_SIGNED16 (!AFORM_UNSIGNED)
31 #define LIVES_ACONNECT_TIMEOUT (10 * U_SEC)
34 #define MAX_AUDIO_MEM 8*1024*1024
37 #define RENDER_BLOCK_SIZE 1024
40 #define SILENCE_BLOCK_SIZE 65536
43 #define READ_BLOCK_SIZE 4096
46 #define XSAMPLES 128000
53 #define ASERVER_CMD_PROCESSED 0
54 #define ASERVER_CMD_FILE_OPEN 1
55 #define ASERVER_CMD_FILE_CLOSE 2
56 #define ASERVER_CMD_FILE_SEEK 3
59 typedef struct _aserver_message_t {
62 volatile struct _aserver_message_t *
next;
139 typedef enum lives_audio_loop {
150 uint64_t nsamples,
size_t tbytes,
float scale,
int nDstChannels,
int nSrcChannels,
int swap_sign);
153 uint64_t nsamples,
size_t tbytes,
float scale,
int nDstChannels,
int nSrcChannels,
int swap_endian,
int swap_sign);
156 uint64_t nsamples,
size_t tbytes,
float scale,
int nDstChannels,
int nSrcChannels,
int swap_sign);
158 void sample_move_d16_float (
float *dst,
short *src, uint64_t nsamples, uint64_t src_skip,
int is_unsigned,
float vol);
160 int64_t
sample_move_float_int(
void *holding_buff,
float **float_buffer,
int nsamps,
float scale,
int chans,
int asamps,
int usigned, gboolean swap_endian, gboolean float_interleaved,
float vol);
171 int64_t
render_audio_segment(gint nfiles, gint *from_files, gint to_file, gdouble *avels, gdouble *fromtime, weed_timecode_t tc_start, weed_timecode_t tc_end, gdouble *chvol, gdouble opvol_start, gdouble opvol_end,
lives_audio_buf_t *obuf);
173 void aud_fade(gint fileno, gdouble startt, gdouble endt, gdouble startv, gdouble endv);
185 void jack_rec_audio_end(
void);
188 #ifdef HAVE_PULSE_AUDIO
190 void pulse_rec_audio_end(
void);