Changeset 633400d for src/io/sink_apple_audio.c
- Timestamp:
- Dec 5, 2018, 10:34:39 PM (5 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 283a619a
- Parents:
- 5b46bc3 (diff), f19db54 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_apple_audio.c
r5b46bc3 r633400d 19 19 */ 20 20 21 #include " config.h"21 #include "aubio_priv.h" 22 22 23 23 #ifdef HAVE_SINK_APPLE_AUDIO 24 25 #include "aubio_priv.h"26 24 #include "fvec.h" 27 25 #include "fmat.h" 28 26 #include "io/sink_apple_audio.h" 27 #include "io/ioutils.h" 29 28 30 29 // CFURLRef, CFURLCreateWithFileSystemPath, ... … … 63 62 s->async = false; 64 63 65 if ( uri == NULL) {64 if ( (uri == NULL) || (strlen(uri) < 1) ) { 66 65 AUBIO_ERROR("sink_apple_audio: Aborted opening null path\n"); 67 66 goto beach; … … 74 73 s->channels = 0; 75 74 76 // negative samplerate given, abort77 if ((sint_t)samplerate < 0) goto beach;78 75 // zero samplerate given. do not open yet 79 if ((sint_t)samplerate == 0) return s; 76 if ((sint_t)samplerate == 0) { 77 return s; 78 } 79 // invalid samplerate given, abort 80 if (aubio_io_validate_samplerate("sink_apple_audio", s->path, samplerate)) { 81 goto beach; 82 } 80 83 81 84 s->samplerate = samplerate; … … 95 98 uint_t aubio_sink_apple_audio_preset_samplerate(aubio_sink_apple_audio_t *s, uint_t samplerate) 96 99 { 97 if ((sint_t)(samplerate) <= 0) return AUBIO_FAIL; 100 if (aubio_io_validate_samplerate("sink_apple_audio", s->path, samplerate)) { 101 return AUBIO_FAIL; 102 } 98 103 s->samplerate = samplerate; 99 104 // automatically open when both samplerate and channels have been set … … 106 111 uint_t aubio_sink_apple_audio_preset_channels(aubio_sink_apple_audio_t *s, uint_t channels) 107 112 { 108 if ((sint_t)(channels) <= 0) return AUBIO_FAIL; 113 if (aubio_io_validate_channels("sink_apple_audio", s->path, channels)) { 114 return AUBIO_FAIL; 115 } 109 116 s->channels = channels; 110 117 // automatically open when both samplerate and channels have been set
Note: See TracChangeset
for help on using the changeset viewer.