Changeset 41b985f for doc/xcode_frameworks.rst
- Timestamp:
- Mar 12, 2017, 11:26:24 AM (7 years ago)
- Branches:
- sampler
- Children:
- bde49c4a
- Parents:
- 71f2e5f (diff), 67b6618 (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
-
doc/xcode_frameworks.rst
r71f2e5f r41b985f 35 35 import aubio 36 36 37 Using aubio from swift 38 ...................... 39 40 Here is a short example showing how to read a sound file in swift: 41 42 43 .. code-block:: swift 44 45 import aubio 46 47 let path = Bundle.main.path(forResource: "example", ofType: "mp4") 48 if (path != nil) { 49 let hop_size : uint_t = 512 50 let a = new_fvec(hop_size) 51 let b = new_aubio_source(path, 0, hop_size) 52 var read: uint_t = 0 53 var total_frames : uint_t = 0 54 while (true) { 55 aubio_source_do(b, a, &read) 56 total_frames += read 57 if (read < hop_size) { break } 58 } 59 print("read", total_frames, "frames at", aubio_source_get_samplerate(b), "Hz") 60 del_aubio_source(b) 61 del_fvec(a) 62 } else { 63 print("could not find file") 64 } 65 66 37 67 .. _Binary frameworks: https://aubio.org/download 38 68 .. _iOS: https://aubio.org/download#ios
Note: See TracChangeset
for help on using the changeset viewer.