aubio
0.4.9
|
Media sink to write blocks of consecutive audio samples to file. More...
Go to the source code of this file.
Typedefs | |
typedef struct _aubio_sink_t | aubio_sink_t |
media sink object | |
Functions | |
aubio_sink_t * | new_aubio_sink (const char_t *uri, uint_t samplerate) |
create new aubio_sink_t More... | |
uint_t | aubio_sink_preset_samplerate (aubio_sink_t *s, uint_t samplerate) |
preset sink samplerate More... | |
uint_t | aubio_sink_preset_channels (aubio_sink_t *s, uint_t channels) |
preset sink channels More... | |
uint_t | aubio_sink_get_samplerate (const aubio_sink_t *s) |
get samplerate of sink object More... | |
uint_t | aubio_sink_get_channels (const aubio_sink_t *s) |
get channels of sink object More... | |
void | aubio_sink_do (aubio_sink_t *s, fvec_t *write_data, uint_t write) |
write monophonic vector of length hop_size to sink More... | |
void | aubio_sink_do_multi (aubio_sink_t *s, fmat_t *write_data, uint_t write) |
write polyphonic vector of length hop_size to sink More... | |
uint_t | aubio_sink_close (aubio_sink_t *s) |
close sink More... | |
void | del_aubio_sink (aubio_sink_t *s) |
close sink and cleanup memory More... | |
Media sink to write blocks of consecutive audio samples to file.
To read from file, use aubio_source_t.
Depending on how aubio was compiled, the following sinks will be available.
When creating a new sink using new_aubio_sink, the new function of each of the compiled-in sinks will be attempted, in the following order, until one of them gets successfully created. If all sinks returned NULL, new_aubio_sink will return NULL.
sink_apple_audio
: ExtAudioFileRef
This sink uses CoreAudio Extended Audio File Services to write 16-bits encoded WAV files.
sink_sndfile
: libsndfile
This sink uses libsndfile to write 16-bits encoded WAV files.
sink_wavwrite
: native WAV write
A simple sink to write 16-bits PCM RIFF encoded WAV files.
Definition in file sink.h.
uint_t aubio_sink_close | ( | aubio_sink_t * | s | ) |
close sink
s | sink object, created with new_aubio_sink |
void aubio_sink_do | ( | aubio_sink_t * | s, |
fvec_t * | write_data, | ||
uint_t | write | ||
) |
write monophonic vector of length hop_size to sink
s | sink, created with new_aubio_sink |
write_data | fvec_t samples to write to sink |
write | number of frames to write |
void aubio_sink_do_multi | ( | aubio_sink_t * | s, |
fmat_t * | write_data, | ||
uint_t | write | ||
) |
write polyphonic vector of length hop_size to sink
s | sink, created with new_aubio_sink |
write_data | fmat_t samples to write to sink |
write | number of frames to write |
uint_t aubio_sink_get_channels | ( | const aubio_sink_t * | s | ) |
get channels of sink object
s | sink object, created with new_aubio_sink |
uint_t aubio_sink_get_samplerate | ( | const aubio_sink_t * | s | ) |
get samplerate of sink object
s | sink object, created with new_aubio_sink |
uint_t aubio_sink_preset_channels | ( | aubio_sink_t * | s, |
uint_t | channels | ||
) |
preset sink channels
s | sink, created with new_aubio_sink |
channels | number of channels to preset the sink to |
Preset the samplerate of the sink. The file should have been created using a samplerate of 0.
The file will be opened only when both samplerate and channels have been set.
uint_t aubio_sink_preset_samplerate | ( | aubio_sink_t * | s, |
uint_t | samplerate | ||
) |
preset sink samplerate
s | sink, created with new_aubio_sink |
samplerate | samplerate to preset the sink to, in Hz |
Preset the samplerate of the sink. The file should have been created using a samplerate of 0.
The file will be opened only when both samplerate and channels have been set.
void del_aubio_sink | ( | aubio_sink_t * | s | ) |
close sink and cleanup memory
s | sink object, created with new_aubio_sink |
aubio_sink_t* new_aubio_sink | ( | const char_t * | uri, |
uint_t | samplerate | ||
) |
create new aubio_sink_t
uri | the file path or uri to write to |
samplerate | sample rate to write the file at |
Creates a new sink object.
If samplerate is set to 0, the creation of the file will be delayed until both aubio_sink_preset_samplerate and aubio_sink_preset_channels have been called.