Changes in / [a5f4b7d:bb42f65]


Ignore:
Location:
src/io
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink.h

    ra5f4b7d rbb42f65  
    11/*
    2   Copyright (C) 2012 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2424/** \file
    2525
    26   Media sink
     26  Media sink to write blocks of consecutive audio samples to file.
    2727
    2828  \example io/test-sink.c
     
    3434#endif
    3535
     36/** media sink object */
    3637typedef struct _aubio_sink_t aubio_sink_t;
     38
     39/**
     40
     41  create new ::aubio_sink_t
     42
     43  \param uri the file path or uri to write to
     44  \param samplerate sample rate to write the file at
     45
     46  \return newly created ::aubio_sink_t
     47
     48  Creates a new sink object.
     49
     50*/
    3751aubio_sink_t * new_aubio_sink(char_t * uri, uint_t samplerate);
    38 void aubio_sink_do(aubio_sink_t * s, fvec_t * write_data, uint_t written);
     52
     53/**
     54
     55  write monophonic vector of length hop_size to sink
     56
     57  \param s sink, created with ::new_aubio_sink
     58  \param write_data ::fvec_t samples to write to sink
     59  \param write number of frames to write
     60
     61*/
     62void aubio_sink_do(aubio_sink_t * s, fvec_t * write_data, uint_t write);
     63
     64/**
     65
     66  close sink and cleanup memory
     67
     68  \param s source object, created with ::new_aubio_source
     69
     70*/
    3971void del_aubio_sink(aubio_sink_t * s);
    4072
  • src/io/sink_apple_audio.h

    ra5f4b7d rbb42f65  
    11/*
    2   Copyright (C) 2012 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2424/** \file
    2525
    26   Apple Audio Media
     26  Write to file using Apple AudioToolbox's
     27  [ExtAudioFileRef](https://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html)
     28
     29  Avoid including this file directly! Prefer using ::aubio_sink_t instead to
     30  make your code portable.
     31
     32  To read from file, use ::aubio_source_t.
    2733
    2834  \example io/test-sink_apple_audio.c
     
    3541
    3642typedef struct _aubio_sink_apple_audio_t aubio_sink_apple_audio_t;
    37 aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(char_t * method, uint_t samplerate);
     43
     44/**
     45
     46  create new ::aubio_sink_apple_audio_t
     47
     48  \param uri the file path or uri to write to
     49  \param samplerate sample rate to write the file at
     50
     51  \return newly created ::aubio_sink_apple_audio_t
     52
     53  Creates a new sink object.
     54
     55*/
     56aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(char_t * uri, uint_t samplerate);
     57
     58/**
     59
     60  write monophonic vector of length hop_size to sink
     61
     62  \param s sink, created with ::new_aubio_sink_apple_audio
     63  \param write_data ::fvec_t samples to write to sink
     64  \param write number of frames to write
     65
     66*/
    3867void aubio_sink_apple_audio_do(aubio_sink_apple_audio_t * s, fvec_t * write_data, uint_t write);
     68
     69/**
     70
     71  close sink and cleanup memory
     72
     73  \param s sink, created with ::new_aubio_sink_apple_audio
     74
     75*/
    3976void del_aubio_sink_apple_audio(aubio_sink_apple_audio_t * s);
    4077
  • src/io/sink_sndfile.h

    ra5f4b7d rbb42f65  
    11/*
    2   Copyright (C) 2012 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2424/** \file
    2525
    26   sndfile sink
     26  Write to file using [libsndfile](http://www.mega-nerd.com/libsndfile/)
     27
     28  Avoid including this file directly! Prefer using ::aubio_sink_t instead to
     29  make your code portable.
     30
     31  To read from file, use ::aubio_source_t.
    2732
    2833  \example io/test-sink_sndfile.c
     
    3540
    3641typedef struct _aubio_sink_sndfile_t aubio_sink_sndfile_t;
    37 aubio_sink_sndfile_t * new_aubio_sink_sndfile(char_t * method, uint_t samplerate);
     42
     43/**
     44
     45  create new ::aubio_sink_sndfile_t
     46
     47  \param uri the file path or uri to write to
     48  \param samplerate sample rate to write the file at
     49
     50  \return newly created ::aubio_sink_sndfile_t
     51
     52  Creates a new sink object.
     53
     54*/
     55aubio_sink_sndfile_t * new_aubio_sink_sndfile(char_t * uri, uint_t samplerate);
     56
     57/**
     58
     59  write monophonic vector of length hop_size to sink
     60
     61  \param s sink, created with ::new_aubio_sink_sndfile
     62  \param write_data ::fvec_t samples to write to sink
     63  \param write number of frames to write
     64
     65*/
    3866void aubio_sink_sndfile_do(aubio_sink_sndfile_t * s, fvec_t * write_data, uint_t write);
     67
     68/**
     69
     70  close sink and cleanup memory
     71
     72  \param s sink, created with ::new_aubio_sink_sndfile
     73
     74*/
    3975void del_aubio_sink_sndfile(aubio_sink_sndfile_t * s);
    4076
  • src/io/source.h

    ra5f4b7d rbb42f65  
    11/*
    2   Copyright (C) 2012 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2424/** \file
    2525
    26   Media source object
     26  Media source to read blocks of consecutive audio samples from file
    2727
    2828  \example io/test-source.c
     
    3434#endif
    3535
    36 /** source object structure */
     36/** media source object */
    3737typedef struct _aubio_source_t aubio_source_t;
    3838
     
    4242
    4343  \param uri the file path or uri to read from
    44   \param samplerate the sample rate to read the file at
    45   \param hop_size the size of the blocks to read from
     44  \param samplerate sampling rate to view the fie at
     45  \param block_size the size of the blocks to read from
    4646
    4747  Creates a new source object. If `0` is passed as `samplerate`, the sample
    4848  rate of the original file is used.
    4949
    50   The samplerate of the current source can be obtained with
     50  The samplerate of newly created source can be obtained using
    5151  ::aubio_source_get_samplerate.
    5252
    5353*/
    54 aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size);
     54aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t block_size);
    5555
    5656/**
    5757
    58   read monophonic vector of length hop_size from source object
     58  read monophonic vector of length block_size from source object
    5959
    6060  \param s source object, created with ::new_aubio_source
    61   \param read_data ::fvec_t of data to read to
    62   \param read number of frames actually read
     61  \param read_to ::fvec_t of data to read to
     62  \param read upon returns, equals to number of frames actually read
    6363
    6464  Upon returns, `read` contains the number of frames actually read from the
    65   source. `hop_size` if enough frames could be read, less otherwise.
     65  source. `block_size` if enough frames could be read, less otherwise.
    6666
    6767*/
    68 void aubio_source_do(aubio_source_t * s, fvec_t * read_data, uint_t * read);
     68void aubio_source_do(aubio_source_t * s, fvec_t * read_to, uint_t * read);
    6969
    7070/**
     
    8080/**
    8181
    82   destroy source object
     82  close source and cleanup memory
    8383
    8484  \param s source object, created with ::new_aubio_source
  • src/io/source_apple_audio.h

    ra5f4b7d rbb42f65  
    11/*
    2   Copyright (C) 2012 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2424/** \file
    2525
    26   aubio source using ExtAudioFileRef
     26  Read from file using Apple AudioToolbox's
     27  [ExtAudioFileRef](https://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html)
     28
     29  Avoid including this file directly! Prefer using ::aubio_source_t instead to
     30  make your code portable.
     31
     32  To write to file, use ::aubio_sink_t.
    2733
    2834  \example io/test-source_apple_audio.c
     
    3440#endif
    3541
     42/** apple audio media source object */
    3643typedef struct _aubio_source_apple_audio_t aubio_source_apple_audio_t;
    37 aubio_source_apple_audio_t * new_aubio_source_apple_audio(char_t * path, uint_t samplerate, uint_t block_size);
     44
     45/**
     46
     47  create new ::aubio_source_apple_audio_t
     48
     49  \param uri the file path or uri to read from
     50  \param samplerate sampling rate to view the fie at
     51  \param block_size the size of the blocks to read from
     52
     53  Creates a new source object. If `0` is passed as `samplerate`, the sample
     54  rate of the original file is used.
     55
     56  The samplerate of newly created source can be obtained using
     57  ::aubio_source_apple_audio_get_samplerate.
     58
     59*/
     60aubio_source_apple_audio_t * new_aubio_source_apple_audio(char_t * uri, uint_t samplerate, uint_t block_size);
     61
     62/**
     63
     64  read monophonic vector of length block_size from source object
     65
     66  \param s source object, created with ::new_aubio_source_apple_audio
     67  \param read_to ::fvec_t of data to read to
     68  \param read upon returns, equals to number of frames actually read
     69
     70  Upon returns, `read` contains the number of frames actually read from the
     71  source. `block_size` if enough frames could be read, less otherwise.
     72
     73*/
    3874void aubio_source_apple_audio_do(aubio_source_apple_audio_t * s, fvec_t * read_to, uint_t * read);
     75void aubio_source_apple_audio_do_multi(aubio_source_apple_audio_t * s, fmat_t * read_to, uint_t * read);
     76
     77/**
     78
     79  get samplerate of source object
     80
     81  \param s source object, created with ::new_aubio_source_apple_audio
     82  \return samplerate, in Hz
     83
     84*/
    3985uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s);
     86
     87/**
     88
     89  close source and cleanup memory
     90
     91  \param s source object, created with ::new_aubio_source_apple_audio
     92
     93*/
    4094void del_aubio_source_apple_audio(aubio_source_apple_audio_t * s);
    4195
  • src/io/source_sndfile.h

    ra5f4b7d rbb42f65  
    11/*
    2   Copyright (C) 2012 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2424/** \file
    2525
     26  Read from file using [libsndfile](http://www.mega-nerd.com/libsndfile/)
     27
     28  Avoid including this file directly! Prefer using ::aubio_source_t instead to
     29  make your code portable.
     30
     31  To write to file, use ::aubio_sink_t.
     32
    2633  \example io/test-source_sndfile.c
    2734
     
    3239#endif
    3340
     41/** sndfile media source object */
    3442typedef struct _aubio_source_sndfile_t aubio_source_sndfile_t;
    35 aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * path, uint_t samplerate, uint_t block_size);
     43
     44/**
     45
     46  create new ::aubio_source_sndfile_t
     47
     48  \param uri the file path or uri to read from
     49  \param samplerate sampling rate to view the fie at
     50  \param block_size the size of the blocks to read from
     51
     52  Creates a new source object. If `0` is passed as `samplerate`, the sample
     53  rate of the original file is used.
     54
     55  The samplerate of newly created source can be obtained using
     56  ::aubio_source_sndfile_get_samplerate.
     57
     58*/
     59aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * uri, uint_t samplerate, uint_t block_size);
     60
     61/**
     62
     63  read monophonic vector of length block_size from source object
     64
     65  \param s source object, created with ::new_aubio_source_sndfile
     66  \param read_to ::fvec_t of data to read to
     67  \param read upon returns, equals to number of frames actually read
     68
     69  Upon returns, `read` contains the number of frames actually read from the
     70  source. `block_size` if enough frames could be read, less otherwise.
     71
     72*/
    3673void aubio_source_sndfile_do(aubio_source_sndfile_t * s, fvec_t * read_to, uint_t * read);
     74
     75/**
     76
     77  get samplerate of source object
     78
     79  \param s source object, created with ::new_aubio_source_sndfile
     80  \return samplerate, in Hz
     81
     82*/
    3783uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s);
     84
     85/**
     86
     87  close source and cleanup memory
     88
     89  \param s source object, created with ::new_aubio_source_sndfile
     90
     91*/
    3892void del_aubio_source_sndfile(aubio_source_sndfile_t * s);
    3993
Note: See TracChangeset for help on using the changeset viewer.