Changeset ae5d58a


Ignore:
Timestamp:
Apr 21, 2016, 6:47:50 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
b643a33
Parents:
1120f86
Message:

src/io/*.{c,h}: added const qualifiers to unmodified pointers

Location:
src/io
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink.c

    r1120f86 rae5d58a  
    5555};
    5656
    57 aubio_sink_t * new_aubio_sink(char_t * uri, uint_t samplerate) {
     57aubio_sink_t * new_aubio_sink(const char_t * uri, uint_t samplerate) {
    5858  aubio_sink_t * s = AUBIO_NEW(aubio_sink_t);
    5959#ifdef HAVE_SINK_APPLE_AUDIO
     
    121121}
    122122
    123 uint_t aubio_sink_get_samplerate(aubio_sink_t * s) {
     123uint_t aubio_sink_get_samplerate(const aubio_sink_t * s) {
    124124  return s->s_get_samplerate((void *)s->sink);
    125125}
    126126
    127 uint_t aubio_sink_get_channels(aubio_sink_t * s) {
     127uint_t aubio_sink_get_channels(const aubio_sink_t * s) {
    128128  return s->s_get_channels((void *)s->sink);
    129129}
  • src/io/sink.h

    r1120f86 rae5d58a  
    7777
    7878*/
    79 aubio_sink_t * new_aubio_sink(char_t * uri, uint_t samplerate);
     79aubio_sink_t * new_aubio_sink(const char_t * uri, uint_t samplerate);
    8080
    8181/**
     
    121121
    122122*/
    123 uint_t aubio_sink_get_samplerate(aubio_sink_t *s);
     123uint_t aubio_sink_get_samplerate(const aubio_sink_t *s);
    124124
    125125/**
     
    131131
    132132*/
    133 uint_t aubio_sink_get_channels(aubio_sink_t *s);
     133uint_t aubio_sink_get_channels(const aubio_sink_t *s);
    134134
    135135/**
  • src/io/sink_apple_audio.c

    r1120f86 rae5d58a  
    5858};
    5959
    60 aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(char_t * uri, uint_t samplerate) {
     60aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(const char_t * uri, uint_t samplerate) {
    6161  aubio_sink_apple_audio_t * s = AUBIO_NEW(aubio_sink_apple_audio_t);
    6262  s->path = uri;
     
    113113}
    114114
    115 uint_t aubio_sink_apple_audio_get_samplerate(aubio_sink_apple_audio_t *s)
     115uint_t aubio_sink_apple_audio_get_samplerate(const aubio_sink_apple_audio_t *s)
    116116{
    117117  return s->samplerate;
    118118}
    119119
    120 uint_t aubio_sink_apple_audio_get_channels(aubio_sink_apple_audio_t *s)
     120uint_t aubio_sink_apple_audio_get_channels(const aubio_sink_apple_audio_t *s)
    121121{
    122122  return s->channels;
  • src/io/sink_apple_audio.h

    r1120f86 rae5d58a  
    5959
    6060*/
    61 aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(char_t * uri, uint_t samplerate);
     61aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(const char_t * uri, uint_t samplerate);
    6262
    6363/**
     
    103103
    104104*/
    105 uint_t aubio_sink_apple_audio_get_samplerate(aubio_sink_apple_audio_t *s);
     105uint_t aubio_sink_apple_audio_get_samplerate(const aubio_sink_apple_audio_t *s);
    106106
    107107/**
     
    113113
    114114*/
    115 uint_t aubio_sink_apple_audio_get_channels(aubio_sink_apple_audio_t *s);
     115uint_t aubio_sink_apple_audio_get_channels(const aubio_sink_apple_audio_t *s);
    116116
    117117/**
  • src/io/sink_sndfile.c

    r1120f86 rae5d58a  
    5454uint_t aubio_sink_sndfile_open(aubio_sink_sndfile_t *s);
    5555
    56 aubio_sink_sndfile_t * new_aubio_sink_sndfile(char_t * path, uint_t samplerate) {
     56aubio_sink_sndfile_t * new_aubio_sink_sndfile(const char_t * path, uint_t samplerate) {
    5757  aubio_sink_sndfile_t * s = AUBIO_NEW(aubio_sink_sndfile_t);
    5858  s->max_size = MAX_SIZE;
     
    107107}
    108108
    109 uint_t aubio_sink_sndfile_get_samplerate(aubio_sink_sndfile_t *s)
     109uint_t aubio_sink_sndfile_get_samplerate(const aubio_sink_sndfile_t *s)
    110110{
    111111  return s->samplerate;
    112112}
    113113
    114 uint_t aubio_sink_sndfile_get_channels(aubio_sink_sndfile_t *s)
     114uint_t aubio_sink_sndfile_get_channels(const aubio_sink_sndfile_t *s)
    115115{
    116116  return s->channels;
  • src/io/sink_sndfile.h

    r1120f86 rae5d58a  
    5858
    5959*/
    60 aubio_sink_sndfile_t * new_aubio_sink_sndfile(char_t * uri, uint_t samplerate);
     60aubio_sink_sndfile_t * new_aubio_sink_sndfile(const char_t * uri, uint_t samplerate);
    6161
    6262/**
     
    102102
    103103*/
    104 uint_t aubio_sink_sndfile_get_samplerate(aubio_sink_sndfile_t *s);
     104uint_t aubio_sink_sndfile_get_samplerate(const aubio_sink_sndfile_t *s);
    105105
    106106/**
     
    112112
    113113*/
    114 uint_t aubio_sink_sndfile_get_channels(aubio_sink_sndfile_t *s);
     114uint_t aubio_sink_sndfile_get_channels(const aubio_sink_sndfile_t *s);
    115115
    116116/**
  • src/io/sink_wavwrite.c

    r1120f86 rae5d58a  
    7878}
    7979
    80 aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(char_t * path, uint_t samplerate) {
     80aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(const char_t * path, uint_t samplerate) {
    8181  aubio_sink_wavwrite_t * s = AUBIO_NEW(aubio_sink_wavwrite_t);
    8282
     
    143143}
    144144
    145 uint_t aubio_sink_wavwrite_get_samplerate(aubio_sink_wavwrite_t *s)
     145uint_t aubio_sink_wavwrite_get_samplerate(const aubio_sink_wavwrite_t *s)
    146146{
    147147  return s->samplerate;
    148148}
    149149
    150 uint_t aubio_sink_wavwrite_get_channels(aubio_sink_wavwrite_t *s)
     150uint_t aubio_sink_wavwrite_get_channels(const aubio_sink_wavwrite_t *s)
    151151{
    152152  return s->channels;
  • src/io/sink_wavwrite.h

    r1120f86 rae5d58a  
    5858
    5959*/
    60 aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(char_t * uri, uint_t samplerate);
     60aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(const char_t * uri, uint_t samplerate);
    6161
    6262/**
     
    102102
    103103*/
    104 uint_t aubio_sink_wavwrite_get_samplerate(aubio_sink_wavwrite_t *s);
     104uint_t aubio_sink_wavwrite_get_samplerate(const aubio_sink_wavwrite_t *s);
    105105
    106106/**
     
    112112
    113113*/
    114 uint_t aubio_sink_wavwrite_get_channels(aubio_sink_wavwrite_t *s);
     114uint_t aubio_sink_wavwrite_get_channels(const aubio_sink_wavwrite_t *s);
    115115
    116116/**
  • src/io/source.c

    r1120f86 rae5d58a  
    5656};
    5757
    58 aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size) {
     58aubio_source_t * new_aubio_source(const char_t * uri, uint_t samplerate, uint_t hop_size) {
    5959  aubio_source_t * s = AUBIO_NEW(aubio_source_t);
    6060#if HAVE_LIBAV
  • src/io/source.h

    r1120f86 rae5d58a  
    8686
    8787*/
    88 aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size);
     88aubio_source_t * new_aubio_source(const char_t * uri, uint_t samplerate, uint_t hop_size);
    8989
    9090/**
  • src/io/source_apple_audio.c

    r1120f86 rae5d58a  
    5555char_t *getPrintableOSStatusError(char_t *str, OSStatus error);
    5656
    57 uint_t aubio_source_apple_audio_open (aubio_source_apple_audio_t *s, char_t * path);
    58 
    59 aubio_source_apple_audio_t * new_aubio_source_apple_audio(char_t * path, uint_t samplerate, uint_t block_size)
     57uint_t aubio_source_apple_audio_open (aubio_source_apple_audio_t *s, const char_t * path);
     58
     59aubio_source_apple_audio_t * new_aubio_source_apple_audio(const char_t * path, uint_t samplerate, uint_t block_size)
    6060{
    6161  aubio_source_apple_audio_t * s = AUBIO_NEW(aubio_source_apple_audio_t);
     
    9292}
    9393
    94 uint_t aubio_source_apple_audio_open (aubio_source_apple_audio_t *s, char_t * path)
     94uint_t aubio_source_apple_audio_open (aubio_source_apple_audio_t *s, const char_t * path)
    9595{
    9696  OSStatus err = noErr;
     
    353353}
    354354
    355 uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s) {
     355uint_t aubio_source_apple_audio_get_samplerate(const aubio_source_apple_audio_t * s) {
    356356  return s->samplerate;
    357357}
    358358
    359 uint_t aubio_source_apple_audio_get_channels(aubio_source_apple_audio_t * s) {
     359uint_t aubio_source_apple_audio_get_channels(const aubio_source_apple_audio_t * s) {
    360360  return s->channels;
    361361}
  • src/io/source_apple_audio.h

    r1120f86 rae5d58a  
    5858
    5959*/
    60 aubio_source_apple_audio_t * new_aubio_source_apple_audio(char_t * uri, uint_t samplerate, uint_t hop_size);
     60aubio_source_apple_audio_t * new_aubio_source_apple_audio(const char_t * uri, uint_t samplerate, uint_t hop_size);
    6161
    6262/**
     
    9696
    9797*/
    98 uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s);
     98uint_t aubio_source_apple_audio_get_samplerate(const aubio_source_apple_audio_t * s);
    9999
    100100/**
     
    106106
    107107*/
    108 uint_t aubio_source_apple_audio_get_channels(aubio_source_apple_audio_t * s);
     108uint_t aubio_source_apple_audio_get_channels(const aubio_source_apple_audio_t * s);
    109109
    110110/**
  • src/io/source_avcodec.c

    r1120f86 rae5d58a  
    6767void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_samples);
    6868
    69 aubio_source_avcodec_t * new_aubio_source_avcodec(char_t * path, uint_t samplerate, uint_t hop_size) {
     69aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, uint_t samplerate, uint_t hop_size) {
    7070  aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t);
    7171  int err;
     
    370370}
    371371
    372 uint_t aubio_source_avcodec_get_samplerate(aubio_source_avcodec_t * s) {
     372uint_t aubio_source_avcodec_get_samplerate(const aubio_source_avcodec_t * s) {
    373373  return s->samplerate;
    374374}
    375375
    376 uint_t aubio_source_avcodec_get_channels(aubio_source_avcodec_t * s) {
     376uint_t aubio_source_avcodec_get_channels(const aubio_source_avcodec_t * s) {
    377377  return s->input_channels;
    378378}
  • src/io/source_avcodec.h

    r1120f86 rae5d58a  
    5757
    5858*/
    59 aubio_source_avcodec_t * new_aubio_source_avcodec(char_t * uri, uint_t samplerate, uint_t hop_size);
     59aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * uri, uint_t samplerate, uint_t hop_size);
    6060
    6161/**
     
    9595
    9696*/
    97 uint_t aubio_source_avcodec_get_samplerate(aubio_source_avcodec_t * s);
     97uint_t aubio_source_avcodec_get_samplerate(const aubio_source_avcodec_t * s);
    9898
    9999/**
     
    105105
    106106*/
    107 uint_t aubio_source_avcodec_get_channels (aubio_source_avcodec_t * s);
     107uint_t aubio_source_avcodec_get_channels (const aubio_source_avcodec_t * s);
    108108
    109109/**
  • src/io/source_sndfile.c

    r1120f86 rae5d58a  
    6868};
    6969
    70 aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * path, uint_t samplerate, uint_t hop_size) {
     70aubio_source_sndfile_t * new_aubio_source_sndfile(const char_t * path, uint_t samplerate, uint_t hop_size) {
    7171  aubio_source_sndfile_t * s = AUBIO_NEW(aubio_source_sndfile_t);
    7272  SF_INFO sfinfo;
  • src/io/source_sndfile.h

    r1120f86 rae5d58a  
    5757
    5858*/
    59 aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * uri, uint_t samplerate, uint_t hop_size);
     59aubio_source_sndfile_t * new_aubio_source_sndfile(const char_t * uri, uint_t samplerate, uint_t hop_size);
    6060
    6161/**
  • src/io/source_wavread.c

    r1120f86 rae5d58a  
    6868}
    6969
    70 aubio_source_wavread_t * new_aubio_source_wavread(char_t * path, uint_t samplerate, uint_t hop_size) {
     70aubio_source_wavread_t * new_aubio_source_wavread(const char_t * path, uint_t samplerate, uint_t hop_size) {
    7171  aubio_source_wavread_t * s = AUBIO_NEW(aubio_source_wavread_t);
    7272  size_t bytes_read = 0, bytes_expected = 44;
  • src/io/source_wavread.h

    r1120f86 rae5d58a  
    6262
    6363*/
    64 aubio_source_wavread_t * new_aubio_source_wavread(char_t * uri, uint_t samplerate, uint_t hop_size);
     64aubio_source_wavread_t * new_aubio_source_wavread(const char_t * uri, uint_t samplerate, uint_t hop_size);
    6565
    6666/**
Note: See TracChangeset for help on using the changeset viewer.