Skip to content

Commit

Permalink
fix: 音声処理手直し、リファクタリング
Browse files Browse the repository at this point in the history
  • Loading branch information
famibee committed Nov 2, 2024
1 parent 4bdbc88 commit 3f8f950
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 75 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- fix: 音声処理手直し、リファクタリング


## [1.61.1](https://github.com/famibee/SKYNovel/compare/v1.61.0...v1.61.1) (2024-11-02)


Expand Down
116 changes: 56 additions & 60 deletions dist/SoundMng.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/SoundMng.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/sn/SndBuf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export declare class SndBuf {
static delLoopPlay(buf: string): void;
static getVol(hArg: HArg, def: number): number;
static xchgbuf({ buf: buf1, buf2 }: HArg): void;
static generate(hArg: HArg): boolean;
private constructor();
readonly needLoad: boolean;
constructor(hArg: HArg, buf: string, fn: string);
setVol(vol: number): void;
ws: (hArg: HArg) => boolean;
stopse({ buf }: HArg): void;
Expand Down
2 changes: 1 addition & 1 deletion dist/sn/SndBuf.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sn/SoundMng.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions src/sn/SndBuf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,13 @@ export class SndBuf {


static readonly #MAX_END_MS = 999000;
static generate(hArg: HArg): boolean {
const {buf = BUF_SE, fn = ''} = hArg;
const sb = hSndBuf[buf] = new SndBuf(hArg, buf, fn);
return sb.#init_wait;
}


readonly #si : SndInf;
readonly #init_wait;
readonly needLoad;


private constructor(
constructor(
readonly hArg : HArg,
readonly buf : string,
readonly fn : string,
Expand Down Expand Up @@ -300,11 +295,11 @@ export class SndBuf {
}));
if (pan !== 0) snd.filters = [new filters.StereoFilter(pan)];
}
this.#init_wait = false;
this.needLoad = false;
return;
}

const join = this.#init_wait = argChk_Boolean(hArg, 'join', true);
const join = this.needLoad = argChk_Boolean(hArg, 'join', true);
if (join) {
disableEvent();
const old = o.loaded!;
Expand Down
Loading

0 comments on commit 3f8f950

Please sign in to comment.