-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 parent
039c3f5
commit 555d0db
Showing
7 changed files
with
35 additions
and
34 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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<br /> | ||
<p align="center"> | ||
<a href="https://github.com/littledivy/deno_audio"> | ||
<img src="./icon.webp" alt="deno_audio logo" height="240"> | ||
</a> | ||
<h3 align="center">deno_audio</h3> | ||
|
||
<p align="center"> | ||
|
@@ -21,7 +24,7 @@ | |
## Example | ||
|
||
```typescript | ||
import { play } from "https://deno.land/[email protected]/mod.ts"; | ||
import { play } from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
// supports mp3, wav, vorbis, flac | ||
await play("music.mp3"); | ||
|
@@ -52,4 +55,6 @@ Pull request, issues and feedback are very welcome. Code style is formatted with | |
|
||
## Copyright | ||
|
||
Logo by [@carazmatic](https://picsart.com/i/284157719013211) at picsart.com (cute, isn't it?) | ||
|
||
deno_audio is licensed under the MIT license. Please see the [LICENSE](LICENSE) file. |
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,10 +1,10 @@ | ||
// @ts-ignore | ||
export const core = Deno.core as { | ||
ops: () => { [key: string]: number }; | ||
setAsyncHandler(rid: number, handler: (response: Uint8Array) => void): void; | ||
dispatch( | ||
rid: number, | ||
msg?: any, | ||
buf?: ArrayBufferView, | ||
): Uint8Array | undefined; | ||
ops: () => { [key: string]: number }; | ||
setAsyncHandler(rid: number, handler: (response: Uint8Array) => void): void; | ||
dispatch( | ||
rid: number, | ||
msg?: any, | ||
buf?: ArrayBufferView, | ||
): Uint8Array | undefined; | ||
}; |
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,15 +1,14 @@ | ||
|
||
export default function filename(filenameBase: string): string { | ||
let filenameSuffix = ".so"; | ||
let filenamePrefix = "lib"; | ||
if (Deno.build.os === "windows") { | ||
filenameSuffix = ".dll"; | ||
filenamePrefix = ""; | ||
} | ||
if (Deno.build.os === "darwin") { | ||
filenameSuffix = ".dylib"; | ||
} | ||
return `${filenamePrefix}${filenameBase}${filenameSuffix}`; | ||
} | ||
let filenameSuffix = ".so"; | ||
let filenamePrefix = "lib"; | ||
|
||
if (Deno.build.os === "windows") { | ||
filenameSuffix = ".dll"; | ||
filenamePrefix = ""; | ||
} | ||
if (Deno.build.os === "darwin") { | ||
filenameSuffix = ".dylib"; | ||
} | ||
|
||
return `${filenamePrefix}${filenameBase}${filenameSuffix}`; | ||
} |
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,4 +1,3 @@ | ||
import { play } from "./mod.ts"; | ||
|
||
await play("music.mp3"); | ||
|
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
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 |
---|---|---|
|
@@ -22,4 +22,3 @@ if (isDev) { | |
}, | ||
}); | ||
} | ||
|