Skip to content

Drop in utility for recording and playing back audio, as well as listening to ambient sounds.

License

Notifications You must be signed in to change notification settings

colinhumber/HUMAudioRecorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HUMAudioRecorder

[![CI Status](http://img.shields.io/travis/Colin Humber/HUMAudioRecorder.svg?style=flat)](https://travis-ci.org/Colin Humber/HUMAudioRecorder) Version Carthage compatible License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

HUMAudioRecorder is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "HUMAudioRecorder"

Or, if you're using Carthage, simply add HUMAudioRecorder to your Cartfile:

github "colinhumber/HUMAudioRecorder"

Usage

Using HUMAudioRecorder is super easy! Just make a URL where you want the file to live, setup your audio session settings, and create a new HUMAudioRecorder instance.

For a list of AVFoundation settings, go here.

NSURL *url = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.m4a", [NSUUID UUID].UUIDString]]];

NSDictionary *settings = @{ AVFormatIDKey : @(kAudioFormatMPEG4AAC),
                            AVSampleRateKey : @44100,
                            AVNumberOfChannelsKey : @1,
                            AVEncoderAudioQualityKey : @(AVAudioQualityHigh)};

HUMAudioRecorder *audioRecorder = [[HUMAudioRecorder alloc] initWithURL:url settings:settings];

The header is well documented, so check it out for a list of properties and methods. There are well defined states that can be used when this is used as the backing recorder/player for your UI.

Author

Colin Humber, colinhumber@gmail.com

License

HUMAudioRecorder is available under the MIT license. See the LICENSE file for more info.

About

Drop in utility for recording and playing back audio, as well as listening to ambient sounds.

Resources

License

Stars

Watchers

Forks

Packages