Browse Source

Updating instructions to remove libgroove

Noah 8 years ago
parent
commit
7dc0304b84
2 changed files with 7 additions and 23 deletions
  1. 5 22
      INSTALL.md
  2. 2 1
      lib/pcm.js

+ 5 - 22
INSTALL.md View File

5
 * [Node.js/NPM](https://nodejs.org/) v0.11.2 or greater
5
 * [Node.js/NPM](https://nodejs.org/) v0.11.2 or greater
6
 * [node-canvas dependencies](https://github.com/Automattic/node-canvas#installation)
6
 * [node-canvas dependencies](https://github.com/Automattic/node-canvas#installation)
7
 * [FFmpeg](https://www.ffmpeg.org/)
7
 * [FFmpeg](https://www.ffmpeg.org/)
8
-* [libgroove](https://github.com/andrewrk/libgroove)
9
 
8
 
10
 If you're using a particularly fancy distributed setup you'll also need to install [Redis](http://redis.io/).
9
 If you're using a particularly fancy distributed setup you'll also need to install [Redis](http://redis.io/).
11
 
10
 
22
 An example bootstrap script for installing Audiogram on Ubuntu looks like this:
21
 An example bootstrap script for installing Audiogram on Ubuntu looks like this:
23
 
22
 
24
 ```sh
23
 ```sh
25
-# 14.04 only: add PPAs for FFmpeg and Libgroove
24
+# 14.04 only: add PPA for FFmpeg
26
 # Not required for 15.04+
25
 # Not required for 15.04+
27
 sudo add-apt-repository ppa:mc3man/trusty-media --yes
26
 sudo add-apt-repository ppa:mc3man/trusty-media --yes
28
-sudo apt-add-repository ppa:andrewrk/libgroove --yes
29
 
27
 
30
 # Update/upgrade
28
 # Update/upgrade
31
 sudo apt-get update --yes && sudo apt-get upgrade --yes
29
 sudo apt-get update --yes && sudo apt-get upgrade --yes
39
 sudo apt-get install git nodejs npm \
37
 sudo apt-get install git nodejs npm \
40
 libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ \
38
 libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ \
41
 ffmpeg \
39
 ffmpeg \
42
-libgroove-dev zlib1g-dev libpng-dev \
43
 --yes
40
 --yes
44
 
41
 
45
 # Install Redis if you plan to use it to share rendering among multiple processes/servers
42
 # Install Redis if you plan to use it to share rendering among multiple processes/servers
82
 
79
 
83
 1. [Node.js/NPM](https://nodejs.org/)
80
 1. [Node.js/NPM](https://nodejs.org/)
84
 2. [node-canvas dependencies](https://github.com/Automattic/node-canvas#installation)
81
 2. [node-canvas dependencies](https://github.com/Automattic/node-canvas#installation)
85
-4. [libgroove](https://github.com/andrewrk/libgroove)
86
-
87
-You probably don't need to install FFmpeg separately because libgroove depends on it.
82
+4. [FFmpeg](https://www.ffmpeg.org/)
88
 
83
 
89
 You can install Node.js by [downloading it from the website](https://nodejs.org/).
84
 You can install Node.js by [downloading it from the website](https://nodejs.org/).
90
 
85
 
91
-Installation of node-canvas dependencies and libgroove might look like the following with [Homebrew](http://brew.sh/) (you'll want to make sure [XCode](https://developer.apple.com/xcode/) is installed and up-to-date too):
86
+Installation of node-canvas dependencies and FFmpeg might look like the following with [Homebrew](http://brew.sh/) (you'll want to make sure [XCode](https://developer.apple.com/xcode/) is installed and up-to-date too):
92
 
87
 
93
 ```sh
88
 ```sh
94
 # Install Git if you haven't already
89
 # Install Git if you haven't already
95
 brew install git
90
 brew install git
96
 
91
 
97
-# Install Cairo, Pango, libgif, libjpeg, libgroove, and FFmpeg
92
+# Install Cairo, Pango, libgif, libjpeg, libpng, and FFmpeg
98
 # You may not need to install zlib
93
 # You may not need to install zlib
99
-brew install pkg-config cairo pango libpng jpeg giflib libgroove ffmpeg
94
+brew install pkg-config cairo pango libpng jpeg giflib ffmpeg
100
 
95
 
101
 # Go to the directory where you want the audiogram directory
96
 # Go to the directory where you want the audiogram directory
102
 cd /where/to/put/this/
97
 cd /where/to/put/this/
147
 
142
 
148
 Follow the [Homebrew troubleshooting guide](https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting), particularly making sure that XCode is up to date.
143
 Follow the [Homebrew troubleshooting guide](https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting), particularly making sure that XCode is up to date.
149
 
144
 
150
-### Installing libgroove manually
151
-
152
-If you're on a Mac and installing [libgroove](https://github.com/andrewrk/libgroove) with Homebrew failed for some reason, you can try following the instructions in the repo to install it more manually.
153
-
154
-### Installing XCode command line tools
155
-
156
-Audiogram uses [waveform](https://github.com/andrewrk/waveform), which requires the development version of `zlib`. Your Mac might already have this, but if it doesn't, installing XCode command line tools might help:
157
-
158
-```sh
159
-xcode-select --install
160
-```
161
-
162
 ### Updating node-gyp
145
 ### Updating node-gyp
163
 
146
 
164
 Updating node-gyp to a current version with:
147
 Updating node-gyp to a current version with:

+ 2 - 1
lib/pcm.js View File

1
 var spawn = require("child_process").spawn,
1
 var spawn = require("child_process").spawn,
2
     stream = require("stream");
2
     stream = require("stream");
3
 
3
 
4
-// Forked from https://github.com/jhurliman/node-pcm
4
+// Based on https://github.com/jhurliman/node-pcm
5
+// Modified to respect channels, use fewer vars, and return a stream
5
 module.exports = function(filename, options) {
6
 module.exports = function(filename, options) {
6
   var sampleStream = new stream.Stream(),
7
   var sampleStream = new stream.Stream(),
7
       channels = 2,
8
       channels = 2,