Giter Site home page Giter Site logo

derekli66 / learning-core-audio-swift-samplecode Goto Github PK

View Code? Open in Web Editor NEW
151.0 12.0 27.0 712 KB

Swift sample code for the book, Learning Core Audio. The original sample code was written in C/Objective-C but I tried to make it in Swift version.

License: MIT License

Swift 98.22% C++ 1.04% Objective-C 0.74%
swift swift3 audio coreaudio apple

learning-core-audio-swift-samplecode's Introduction

Learning-Core-Audio-Swift-SampleCode

This repo is my practice for learning Apple Core Audio API. Thanks Chris Adamson and Kevin Avila two authors they created the book, Learning Core Audio: A Hands-On Guide to Audio Programming for Mac and iOS. This book let me have a gentle guide to walk through the basic of audio programming.

Practice is the best way to learn something you are not familiar with. Therefore, I decided to use Swift to do practices on the original sample codes which were written in C/Objective-C.

I wish I could learn more about unsafe Swift and also audio programming at the same time in this practice.

If you happen to learn Core Audio as well as using this book, you may want to see the Swift version sample code. Hope this repo will help you.

If you would like to share your Swift knowledge to make these sample code better, please send me PR. I will be happy to learn from it.


The following chapters were finished in Swift.

  • Chapter 3 - Audio Processing with Core Audio
  • Chapter 4 - Recording
  • Chapter 5 - Playback
  • Chapter 6 - Conversion
  • Chapter 7 - Audio Units: Generators, Effects, and Rendering
  • Chapter 8 - Audio Units: Input and Mixing
  • Chpater 9 - Positional Sound
  • Chapter 10 - Core Audio on iOS
  • Chapter 11 - Core MIDI
  • Chapter 12 - Coda (AUSampler)

Revision Notes

2019/12/21

  • Update sample codes to support Swift 5.

learning-core-audio-swift-samplecode's People

Contributors

dereklee-pg avatar derekli66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learning-core-audio-swift-samplecode's Issues

Can I ask a question about the book?

• mSampleRate is defined to be the number of samples per channel per second of uncompressed data. This makes it equal to the number of frames per second, which means you can multiply it by mFramesPerPacket to determine packet length in seconds.

The book describes it this way inside, but this multiplication, I feel, is wrong. Frames per second, multiplied by the number of frames per packet, feels like it doesn't make any sense, unless it's a division.

Thank you

Thank you:
But there are new problems. output file duration is very short.
You can open the compressed audio file, the sound content will play very fast, completely can not hear the content.

Originally posted by @little-dandan in #3 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.