Changeset cf19b8a for src/io/sink_apple_audio.c
- Timestamp:
- Nov 29, 2016, 12:06:21 PM (7 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, sampler, yinfft+
- Children:
- bb96d02
- Parents:
- c8e08c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_apple_audio.c
rc8e08c2 rcf19b8a 27 27 #include "fmat.h" 28 28 #include "io/sink_apple_audio.h" 29 #include "io/ioutils.h" 29 30 30 31 // CFURLRef, CFURLCreateWithFileSystemPath, ... … … 74 75 s->channels = 0; 75 76 76 // negative samplerate given, abort77 if ((sint_t)samplerate < 0) goto beach;78 77 // zero samplerate given. do not open yet 79 if ((sint_t)samplerate == 0) return s; 78 if ((sint_t)samplerate == 0) { 79 return s; 80 } 81 // invalid samplerate given, abort 82 if (aubio_io_validate_samplerate("sink_apple_audio", s->path, samplerate)) { 83 goto beach; 84 } 80 85 81 86 s->samplerate = samplerate; … … 95 100 uint_t aubio_sink_apple_audio_preset_samplerate(aubio_sink_apple_audio_t *s, uint_t samplerate) 96 101 { 97 if ((sint_t)(samplerate) <= 0) return AUBIO_FAIL; 102 if (aubio_io_validate_samplerate("sink_apple_audio", s->path, samplerate)) { 103 return AUBIO_FAIL; 104 } 98 105 s->samplerate = samplerate; 99 106 // automatically open when both samplerate and channels have been set … … 106 113 uint_t aubio_sink_apple_audio_preset_channels(aubio_sink_apple_audio_t *s, uint_t channels) 107 114 { 108 if ((sint_t)(channels) <= 0) return AUBIO_FAIL; 115 if (aubio_io_validate_channels("sink_apple_audio", s->path, channels)) { 116 return AUBIO_FAIL; 117 } 109 118 s->channels = channels; 110 119 // automatically open when both samplerate and channels have been set
Note: See TracChangeset
for help on using the changeset viewer.