Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: AudioAsset#loopOffset #64

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- feat-loopOffset

env:
NODE_VERSION: 18
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 1.13.0-beta.0
* オーディオアセットのループ開始位置サポートを追加
* `AudioAsset#loopOffset` を追加
* `ResourceFactory#createAudioAsset()` に引数を追加

## 1.12.0
* `PlatformButtonType` に `Unchanged` を追加

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akashic/pdi-types",
"version": "1.12.0",
"version": "1.13.0-beta.0",
"description": "Interface definition for Akashic Platform Dependent Implementation (PDI) Layer",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -47,6 +47,7 @@
"@akashic/trigger": "~2.0.0"
},
"publishConfig": {
"@akashic:registry": "https://registry.npmjs.org/"
"@akashic:registry": "https://registry.npmjs.org/",
"tag": "next"
}
}
7 changes: 7 additions & 0 deletions src/asset/audio/AudioAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export interface AudioAsset extends Asset {
*/
offset: number | undefined;

/**
* ループ再生時の再生開始位置。単位はミリ秒。
* `loop` が真でなければ参照されない。
* この値は参照のためにのみ公開されている。ゲーム開発者はこの値を直接変更してはならない。
*/
loopOffset: number | undefined;

/**
* @ignore
*/
Expand Down
3 changes: 2 additions & 1 deletion src/platform/ResourceFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export interface ResourceFactory {
system: AudioSystem,
loop: boolean,
hint: AudioAssetHint,
offset?: number
offset?: number,
loopOffset?: number
): AudioAsset;

createTextAsset(id: string, assetPath: string): TextAsset;
Expand Down