This repository has been archived by the owner on Mar 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,609 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ build | |
node_modules | ||
main.js | ||
.vscode | ||
dist | ||
dist | ||
play-opus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Play-opus | ||
|
||
Native bindings of libopus in node JS. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import fs from 'fs' | ||
|
||
if(fs.existsSync('./play-opus')) fs.rmSync('./play-opus', { recursive : true }) | ||
fs.mkdirSync('./play-opus') | ||
if(!fs.existsSync('./build/Release')) { | ||
console.log('\nNo Build Files found. Report to the developer.') | ||
process.exit(1) | ||
} | ||
const opusFiles = fs.readdirSync('./build/Release').filter((x) => x.startsWith('opus')) | ||
opusFiles.forEach((file) => { | ||
fs.copyFileSync(`./build/Release/${file}`, `./play-opus/${file}`) | ||
}) | ||
fs.copyFileSync('./src/opus.d.ts', './play-opus/opus.d.ts') | ||
fs.rmSync('./build', { recursive : true }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1 @@ | ||
// async function main() { | ||
// /* using 20 to make the progress bar length 20 charactes, multiplying by 5 below to arrive to 100 */ | ||
|
||
// for (let i = 0; i <= 20; i++) { | ||
// const dots = ".".repeat(i) | ||
// const left = 20 - i | ||
// const empty = " ".repeat(left) | ||
|
||
// /* need to use `process.stdout.write` becuase console.log print a newline character */ | ||
// /* \r clear the current line and then print the other characters making it looks like it refresh*/ | ||
// process.stdout.write('\x1B[?25l') | ||
// process.stdout.write(`\r[${dots}${empty}] ${i * 5}%`) | ||
// await wait(80) | ||
// } | ||
// process.stdout.write('\x1B[?25h') | ||
// console.log(process.stdout.columns) | ||
// } | ||
|
||
// main() | ||
|
||
// function wait(ms : number) { | ||
// return new Promise(res => setTimeout(res, ms)) | ||
// } | ||
|
||
// import { spawn } from 'child_process' | ||
|
||
// const x = spawn('node-gyp', ['build'], { shell : true }) | ||
|
||
// let count = 0 | ||
|
||
// x.stdout.on('data', (x) => console.log(++count)) | ||
|
||
// x.stderr.on('data', (y) => console.log(y.toString('utf-8'))) | ||
|
||
// x.on('error', (s) => console.log('ERROR :' + s)) | ||
|
||
// Configure = 12 | ||
// Build = 168 | ||
// Creating new dir = 1 | ||
// Moving = 1 | ||
|
||
import { ProgressBar } from './progressbar' | ||
|
||
const x = new ProgressBar('Title' , ['T 1', 'T 22222222'], 10) | ||
x.cursor.unhide() | ||
export { OpusHandler } from '../play-opus/opus' |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.