Ignore:
Timestamp:
Feb 23, 2014, 4:58:25 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
14ac1db
Parents:
222b176
Message:

src/io/sink_wavwrite.h: add do_multi, preset_samplerate, preset_channels, get_samplerate, and get_channels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_wavwrite.h

    r222b176 r870ad70  
    2424/** \file
    2525
    26   Write to file using [libsndfile](http://www.mega-nerd.com/libsndfile/)
     26  Write to file using native file writer.
    2727
    2828  Avoid including this file directly! Prefer using ::aubio_sink_t instead to
     
    3939#endif
    4040
     41/** sink_wavwrite object */
    4142typedef struct _aubio_sink_wavwrite_t aubio_sink_wavwrite_t;
    4243
     
    5253  Creates a new sink object.
    5354
     55  If samplerate is set to 0, the creation of the file will be delayed until
     56  both ::aubio_sink_preset_samplerate and ::aubio_sink_preset_channels have
     57  been called.
     58
    5459*/
    5560aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(char_t * uri, uint_t samplerate);
     61
     62/**
     63
     64  preset sink samplerate
     65
     66  \param s sink, created with ::new_aubio_sink_wavwrite
     67  \param samplerate samplerate to preset the sink to, in Hz
     68
     69  \return 0 on success, 1 on error
     70
     71  Preset the samplerate of the sink. The file should have been created using a
     72  samplerate of 0.
     73
     74  The file will be opened only when both samplerate and channels have been set.
     75
     76*/
     77uint_t aubio_sink_wavwrite_preset_samplerate(aubio_sink_wavwrite_t *s, uint_t samplerate);
     78
     79/**
     80
     81  preset sink channels
     82
     83  \param s sink, created with ::new_aubio_sink_wavwrite
     84  \param channels number of channels to preset the sink to
     85
     86  \return 0 on success, 1 on error
     87
     88  Preset the samplerate of the sink. The file should have been created using a
     89  samplerate of 0.
     90
     91  The file will be opened only when both samplerate and channels have been set.
     92
     93*/
     94uint_t aubio_sink_wavwrite_preset_channels(aubio_sink_wavwrite_t *s, uint_t channels);
     95
     96/**
     97
     98  get samplerate of sink object
     99
     100  \param s sink object, created with ::new_aubio_sink_wavwrite
     101  \return samplerate, in Hz
     102
     103*/
     104uint_t aubio_sink_wavwrite_get_samplerate(aubio_sink_wavwrite_t *s);
     105
     106/**
     107
     108  get channels of sink object
     109
     110  \param s sink object, created with ::new_aubio_sink_wavwrite
     111  \return number of channels
     112
     113*/
     114uint_t aubio_sink_wavwrite_get_channels(aubio_sink_wavwrite_t *s);
    56115
    57116/**
     
    65124*/
    66125void aubio_sink_wavwrite_do(aubio_sink_wavwrite_t * s, fvec_t * write_data, uint_t write);
     126
     127/**
     128
     129  write polyphonic vector of length hop_size to sink
     130
     131  \param s sink, created with ::new_aubio_sink_wavwrite
     132  \param write_data ::fmat_t samples to write to sink
     133  \param write number of frames to write
     134
     135*/
     136void aubio_sink_wavwrite_do_multi(aubio_sink_wavwrite_t * s, fmat_t * write_data, uint_t write);
    67137
    68138/**
Note: See TracChangeset for help on using the changeset viewer.