Skip to content

Commit 3317c76

Browse files
committed
Add ogg/flac versions
1 parent ab0965c commit 3317c76

File tree

12 files changed

+44
-4
lines changed

12 files changed

+44
-4
lines changed

flac-base64.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flac-datauri.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
module.exports = 'data:audio/flac;base64,' + require('./flac-base64') + '';

flac.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @module lena/flac.js
3+
*/
4+
'use strict';
5+
6+
module.exports = require('./decode')(require('./flac-base64'));

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ function lena (options) {
2020
lena.wav = require('./wav')
2121
lena.mp3 = require('./mp3')
2222
lena.raw = require('./raw')
23+
lena.ogg = require('./ogg')
24+
lena.flac = require('./flac')
2325

2426
lena.wavDatauri = require('./wav-datauri')
2527
lena.mp3Datauri = require('./mp3-datauri')
2628
lena.rawDatauri = require('./raw-datauri')
29+
lena.oggDatauri = require('./ogg-datauri')
30+
lena.flacDatauri = require('./flac-datauri')
2731

2832
lena.wavBase64 = require('./wav-base64')
2933
lena.mp3Base64 = require('./mp3-base64')
3034
lena.rawBase64 = require('./raw-base64')
35+
lena.oggBase64 = require('./ogg-base64')
36+
lena.flacBase64 = require('./flac-base64')

lena.flac

473 KB
Binary file not shown.

lena.ogg

109 KB
Binary file not shown.

ogg-base64.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ogg-datauri.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
module.exports = 'data:audio/ogg;base64,' + require('./ogg-base64') + '';

ogg.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @module lena/ogg.js
3+
*/
4+
'use strict';
5+
6+
module.exports = require('./decode')(require('./ogg-base64'));

readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Appropriate for testing size (1Mb), length (~12s), noisy background, visible spe
1313
| `wav size` | `1.03 Mb` |
1414
| `mp3 size` | `192.8 Kb` |
1515
| `bitRate` | `705kbps` |
16+
| `artist` | `Lena Stolze` |
17+
| `track title` | `Oh lad le` |
18+
| `album title` | `Das schreckliche Mädchen` |
19+
| `year` | `2014` |
1620

1721
## Usage
1822

@@ -70,12 +74,15 @@ audio.src = mp3
7074
| `audio-lena/raw` | _ArrayBuffer_ with float32 samples. |
7175
| `audio-lena/mp3` | _ArrayBuffer_ with encoded mp3 data. |
7276
| `audio-lena/wav` | _ArrayBuffer_ with encoded wav data. |
77+
| `audio-lena/ogg` | _ArrayBuffer_ with encoded ogg data. |
7378
| `audio-lena/raw-base64` | Base64 string with encoded float32 samples. |
7479
| `audio-lena/mp3-base64` | Base64 string with encoded mp3 data. |
7580
| `audio-lena/wav-base64` | Base64 string with encoded wav data. |
81+
| `audio-lena/ogg-base64` | Base64 string with encoded ogg data. |
7682
| `audio-lena/raw-datauri` | Data-URI string with encoded float32 samples. |
7783
| `audio-lena/mp3-datauri` | Data-URI string with encoded mp3 data. |
7884
| `audio-lena/wav-datauri` | Data-URI string with encoded wav data. |
85+
| `audio-lena/ogg-datauri` | Data-URI string with encoded ogg data. |
7986

8087
### let result = lena({format: 'mp3', type: 'float'}?)
8188

0 commit comments

Comments
 (0)