- Timestamp:
- Mar 18, 2013, 4:32:08 PM (12 years ago)
- 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:
- bb42f65
- Parents:
- de5d3f1
- Location:
- src/io
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink.h
rde5d3f1 rac20c85 1 1 /* 2 Copyright (C) 2012 Paul Brossier <piem@aubio.org>2 Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. … … 24 24 /** \file 25 25 26 Media sink 26 Media sink to write blocks of consecutive audio samples to file. 27 27 28 28 \example io/test-sink.c … … 34 34 #endif 35 35 36 /** media sink object */ 36 37 typedef 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 */ 37 51 aubio_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 */ 62 void 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 */ 39 71 void del_aubio_sink(aubio_sink_t * s); 40 72 -
src/io/sink_apple_audio.h
rde5d3f1 rac20c85 1 1 /* 2 Copyright (C) 2012 Paul Brossier <piem@aubio.org>2 Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. … … 24 24 /** \file 25 25 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. 27 33 28 34 \example io/test-sink_apple_audio.c … … 35 41 36 42 typedef 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 */ 56 aubio_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 */ 38 67 void 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 */ 39 76 void del_aubio_sink_apple_audio(aubio_sink_apple_audio_t * s); 40 77 -
src/io/sink_sndfile.h
rde5d3f1 rac20c85 1 1 /* 2 Copyright (C) 2012 Paul Brossier <piem@aubio.org>2 Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. … … 24 24 /** \file 25 25 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. 27 32 28 33 \example io/test-sink_sndfile.c … … 35 40 36 41 typedef 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 */ 55 aubio_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 */ 38 66 void 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 */ 39 75 void del_aubio_sink_sndfile(aubio_sink_sndfile_t * s); 40 76 -
src/io/source.h
rde5d3f1 rac20c85 1 1 /* 2 Copyright (C) 2012 Paul Brossier <piem@aubio.org>2 Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. … … 24 24 /** \file 25 25 26 Media source object26 Media source to read blocks of consecutive audio samples from file 27 27 28 28 \example io/test-source.c … … 34 34 #endif 35 35 36 /** source object structure*/36 /** media source object */ 37 37 typedef struct _aubio_source_t aubio_source_t; 38 38 … … 42 42 43 43 \param uri the file path or uri to read from 44 \param samplerate the sample rate to read the file at45 \param hop_size the size of the blocks to read from44 \param samplerate sampling rate to view the fie at 45 \param block_size the size of the blocks to read from 46 46 47 47 Creates a new source object. If `0` is passed as `samplerate`, the sample 48 48 rate of the original file is used. 49 49 50 The samplerate of the current source can be obtained with50 The samplerate of newly created source can be obtained using 51 51 ::aubio_source_get_samplerate. 52 52 53 53 */ 54 aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size);54 aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t block_size); 55 55 56 56 /** 57 57 58 read monophonic vector of length hop_size from source object58 read monophonic vector of length block_size from source object 59 59 60 60 \param s source object, created with ::new_aubio_source 61 \param read_ data::fvec_t of data to read to62 \param read number of frames actually read61 \param read_to ::fvec_t of data to read to 62 \param read upon returns, equals to number of frames actually read 63 63 64 64 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. 66 66 67 67 */ 68 void aubio_source_do(aubio_source_t * s, fvec_t * read_ data, uint_t * read);68 void aubio_source_do(aubio_source_t * s, fvec_t * read_to, uint_t * read); 69 69 70 70 /** … … 80 80 /** 81 81 82 destroy source object82 close source and cleanup memory 83 83 84 84 \param s source object, created with ::new_aubio_source -
src/io/source_apple_audio.h
rde5d3f1 rac20c85 1 1 /* 2 Copyright (C) 2012 Paul Brossier <piem@aubio.org>2 Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. … … 24 24 /** \file 25 25 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. 27 33 28 34 \example io/test-source_apple_audio.c … … 34 40 #endif 35 41 42 /** apple audio media source object */ 36 43 typedef 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 */ 60 aubio_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 */ 38 74 void aubio_source_apple_audio_do(aubio_source_apple_audio_t * s, fvec_t * read_to, uint_t * read); 75 void 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 */ 39 85 uint_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 */ 40 94 void del_aubio_source_apple_audio(aubio_source_apple_audio_t * s); 41 95 -
src/io/source_sndfile.h
rde5d3f1 rac20c85 1 1 /* 2 Copyright (C) 2012 Paul Brossier <piem@aubio.org>2 Copyright (C) 2012-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. … … 24 24 /** \file 25 25 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 26 33 \example io/test-source_sndfile.c 27 34 … … 32 39 #endif 33 40 41 /** sndfile media source object */ 34 42 typedef 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 */ 59 aubio_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 */ 36 73 void 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 */ 37 83 uint_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 */ 38 92 void del_aubio_source_sndfile(aubio_source_sndfile_t * s); 39 93
Note: See TracChangeset
for help on using the changeset viewer.