Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fulldecent committed Sep 27, 2016
1 parent 7b560c2 commit 45d55a6
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 59 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ All notable changes to this project will be documented in this file.

---

## [Master](https://github.com/fulldecent/FDWaveformView/compare/1.0.2...master)
## [Master](https://github.com/fulldecent/FDWaveformView/compare/2.0.0...master)

---

## [2.0.0](https://github.com/fulldecent/FDWaveformView/releases/tag/2.0.0)
Released on 2016-09-27.

#### Added
Automated CocoaPods Quality Indexes testing
- Automated CocoaPods Quality Indexes testing
Added by [Hayden Holligan](https://github.com/haydenholligan)
- Use GPU to process waveforms
Added by [Hayden Holligan](https://github.com/haydenholligan)
---

## [1.0.2](https://github.com/fulldecent/FDWaveformView/releases/tag/1.0.2)
Expand Down
65 changes: 29 additions & 36 deletions Example/Source/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="GzX-4u-840">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A320" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="GzX-4u-840">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -14,97 +15,89 @@
<viewControllerLayoutGuide type="bottom" id="01F-59-2xz"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="oh1-vd-YBA">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pHr-84-A7W" customClass="FDWaveformView" customModule="FDWaveformView">
<rect key="frame" x="0.0" y="210" width="600" height="390"/>
<color key="backgroundColor" red="1" green="0.93725496529999996" blue="0.92549026010000002" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" red="0.99811935424804688" green="0.92034381628036499" blue="0.90713727474212646" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="wavesColor">
<color key="value" red="0.17254901959999999" green="0.50980392159999999" blue="0.78823529410000004" alpha="1" colorSpace="calibratedRGB"/>
<color key="value" red="0.17254901959999999" green="0.50980392159999999" blue="0.78823529410000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ip2-HE-aX1">
<rect key="frame" x="0.0" y="20" width="195" height="30"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.37647058820000001" blue="0.25882352939999997" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.37647058820000001" blue="0.25882352939999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Load AAC">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doLoadAAC" destination="GzX-4u-840" eventType="touchUpInside" id="92l-zv-E96"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V6O-ov-C15">
<rect key="frame" x="203" y="20" width="194" height="30"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.37647058820000001" blue="0.25882352939999997" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.37647058820000001" blue="0.25882352939999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Load MP3">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doLoadMP3" destination="GzX-4u-840" eventType="touchUpInside" id="i44-Ny-Czm"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QiA-5t-Tep">
<rect key="frame" x="405" y="20" width="195" height="30"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.37647058820000001" blue="0.25882352939999997" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.37647058820000001" blue="0.25882352939999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Load OGG">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doLoadOGG" destination="GzX-4u-840" eventType="touchUpInside" id="rhB-PI-RJC"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Eo2-dg-ThD">
<rect key="frame" x="0.0" y="96" width="600" height="30"/>
<color key="backgroundColor" red="0.93333333330000001" green="0.90196078430000004" blue="0.3411764706" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" red="0.91658645868301392" green="0.89184486865997314" blue="0.27463445067405701" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Zoom in">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doZoomIn" destination="GzX-4u-840" eventType="touchUpInside" id="9jC-Su-4m8"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XOT-uC-eqi">
<rect key="frame" x="0.0" y="134" width="600" height="30"/>
<color key="backgroundColor" red="0.93333333330000001" green="0.90196078430000004" blue="0.3411764706" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" red="0.91658645868301392" green="0.89184486865997314" blue="0.27463445067405701" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Zoom out">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doZoomOut" destination="GzX-4u-840" eventType="touchUpInside" id="AYs-Ev-ApW"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WLG-lH-cUv">
<rect key="frame" x="0.0" y="58" width="600" height="30"/>
<color key="backgroundColor" red="0.93333333330000001" green="0.90196078430000004" blue="0.3411764706" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" red="0.91658645868301392" green="0.89184486865997314" blue="0.27463445067405701" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Randomly set play progress">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doAnimation" destination="GzX-4u-840" eventType="touchUpInside" id="fb7-NT-Wds"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C2Y-UB-xTc">
<rect key="frame" x="0.0" y="172" width="600" height="30"/>
<color key="backgroundColor" red="0.93333333330000001" green="0.90196078430000004" blue="0.3411764706" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" red="0.91658645868301392" green="0.89184486865997314" blue="0.27463445067405701" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Run performance profiling">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="doRunPerformanceProfile" destination="GzX-4u-840" eventType="touchUpInside" id="qKf-b0-xNq"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="deviceRGB"/>
<color key="backgroundColor" red="0.93609845638275146" green="0.93607044219970703" blue="0.93608629703521729" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Eo2-dg-ThD" secondAttribute="trailing" id="0h3-Y1-yc0"/>
<constraint firstItem="WLG-lH-cUv" firstAttribute="top" secondItem="Ip2-HE-aX1" secondAttribute="bottom" constant="8" id="4ZM-7Q-VFH"/>
Expand Down
2 changes: 1 addition & 1 deletion FDWaveformView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FDWaveformView'
s.version = '1.0.2'
s.version = '2.0.0'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Reads an audio file and displays the waveform'
s.description = <<-DESC
Expand Down
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ Usage

To use it, add an `FDWaveformView` using Interface Builder or programmatically and then just load your audio as per this example. Note: if your audio file does not have file extension, see <a href="https://stackoverflow.com/questions/9290972/is-it-possible-to-make-avurlasset-work-without-a-file-extension">this SO question</a>.

```objective-c
NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
NSString *filePath = [thisBundle pathForResource:@"Submarine" ofType:@"aiff"];
NSURL *url = [NSURL fileURLWithPath:filePath];
self.waveform.audioURL = url;
```swift
let thisBundle = Bundle(for: type(of: self))
let url = thisBundle.url(forResource: "Submarine", withExtension: "aiff")
self.waveform.audioURL = url
```

<p align="center">
Expand All @@ -30,8 +29,8 @@ Features

**Set play progress** to highlight part of the waveform:

```objective-c
self.waveform.progressSamples = self.waveform.totalSamples / 2;
```swift
self.waveform.progressSamples = self.waveform.totalSamples / 2
```

<p align="center">
Expand All @@ -40,9 +39,9 @@ self.waveform.progressSamples = self.waveform.totalSamples / 2;

**Zoom in** to show only part of the waveform, of course, zooming in will smoothly rerender to show progressively more detail:

```objective-c
self.waveform.zoomStartSamples = 0;
self.waveform.zoomEndSamples = self.waveform.totalSamples / 4;
```swift
self.waveform.zoomStartSamples = 0
self.waveform.zoomEndSamples = self.waveform.totalSamples / 4
```

<p align="center">
Expand All @@ -51,10 +50,10 @@ self.waveform.zoomEndSamples = self.waveform.totalSamples / 4;

**Enable gestures** for zooming in, panning around or scrubbing:

```objective-c
self.waveform.doesAllowScrubbing = YES;
self.waveform.doesAllowStretch = YES;
self.waveform.doesAllowScroll = YES;
```swift
self.waveform.doesAllowScrubbing = true
self.waveform.doesAllowStretch = true
self.waveform.doesAllowScroll = true
```

<p align="center">
Expand All @@ -63,11 +62,11 @@ self.waveform.doesAllowScroll = YES;

**Supports animation** for changing properties:

```objective-c
[UIView animateWithDuration:0.3 animations:^{
NSInteger randomNumber = arc4random() % self.waveform.totalSamples;
self.waveform.progressSamples = randomNumber;
}];
```swift
UIView.animate(withDuration: 0.3) {
let randomNumber = arc4random() % self.waveform.totalSamples
self.waveform.progressSamples = randomNumber
}
```

<p align="center">
Expand All @@ -77,7 +76,7 @@ self.waveform.doesAllowScroll = YES;

Creates **antialiased waveforms** by drawing more pixels than are seen on screen. Also, if you resize me (autolayout) I will render more detail if necessary to avoid pixelation.

**Supports ARC** and **iOS7+**.
Supports **iOS8+** and Swift 3.

**Includes unit tests** which run successfully using Travis CI.

Expand Down

0 comments on commit 45d55a6

Please sign in to comment.