25 for(k = 0; k < stream->
len; k++) {
26 stream->
buf[k] = (rand() % 255) / 255.0;
37 for(k = 0; k < stream->
len; k++) {
43 stream->
buf[k] = sin(x);
54 for(k = 0; k < stream->
len; k++) {
59 stream->
buf[k] = (
dsp_t)(32768+32767*x);
70 for(k = 0; k < stream->
len; k++) {
77 stream->
buf[k] = (
dsp_t)(32768+32767*x);
88 double lo = mn * bandwidth * 1.5 / samplefreq;
89 double hi = mx * bandwidth * 0.5 / samplefreq;
int len
The buffers length.
#define dsp_buffer_copy(in, out, len)
Fill the output buffer with the values of the elements of the input stream by casting them to the out...
void dsp_buffer_sum(dsp_stream_p stream, dsp_t *in, int inlen)
Sum elements of one stream to another's.
void dsp_buffer_deviate(dsp_stream_p stream, dsp_t *deviation, dsp_t mindeviation, dsp_t maxdeviation)
Deviate forward the first input stream using the second stream as indexing reference.
DLL_EXPORT void dsp_stream_free(dsp_stream_p stream)
Free the DSP stream passed as argument.
DLL_EXPORT dsp_stream_p dsp_stream_new(void)
Allocate a new DSP stream type.
DLL_EXPORT void dsp_stream_free_buffer(dsp_stream_p stream)
Free the buffer of the DSP Stream passed as argument.
void dsp_signals_sawtoothwave(dsp_stream_p stream, double samplefreq, double freq)
Generate a sawtooth wave.
void dsp_signals_sinewave(dsp_stream_p stream, double samplefreq, double freq)
Generate a sinusoidal wave.
void dsp_signals_triwave(dsp_stream_p stream, double samplefreq, double freq)
Generate a triangular wave.
void dsp_modulation_amplitude(dsp_stream_p stream, double samplefreq, double freq)
Generate an amplitude modulated wave.
void dsp_modulation_frequency(dsp_stream_p stream, double samplefreq, double freq, double bandwidth)
Generate a frequency modulated wave.
void dsp_signals_whitenoise(dsp_stream_p stream)
Generate white noise.
#define dsp_stats_min(buf, len)
Gets the minimum value of the input stream.
#define dsp_stats_max(buf, len)
Gets the maximum value of the input stream.
Contains a set of informations and data relative to a buffer and how to use it.