Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
50379b1
add WebGL audio system pause/resume support
hkmt-mmy Jun 9, 2026
08ea288
fix pause/resume when called within PlayScheduleDelay window
hkmt-mmy Jun 9, 2026
16ae4b1
bump version to 2.4.0
hkmt-mmy Jun 9, 2026
1abf46b
add referenceSampleRate to CueSheet for runtime sample position conve…
hkmt-mmy Jun 9, 2026
108ae1c
prevent GC collection of visibility change delegate in WebGL
hkmt-mmy Jun 9, 2026
e34307f
add referenceSampleRate migration dialog on editor startup
hkmt-mmy Jun 9, 2026
0a412a1
warn about unset referenceSampleRate in validation, build, and editor UI
hkmt-mmy Jun 9, 2026
ae14442
add tests for referenceSampleRate conversion and apply behavior
hkmt-mmy Jun 9, 2026
95d10d2
update docs and changelog for referenceSampleRate feature
hkmt-mmy Jun 9, 2026
2e9f4b8
fix comment wording and test source reference in AudioClipPlayer
hkmt-mmy Jun 10, 2026
2cf3478
Merge branch 'main' into develop
hkmt-mmy Jun 11, 2026
0629856
fix out-of-range TimeSamples assignment in Setup
hkmt-mmy Jun 11, 2026
f913726
fix reference_sample_rate_warning to reference correct migration entr…
hkmt-mmy Jun 11, 2026
58a71de
fix tooltip for referenceSampleRate to include Apply button
hkmt-mmy Jun 11, 2026
97ddd8c
disable system pause temporarily for debugging
hkmt-mmy Jun 11, 2026
2db64ff
guard DisplayDialogComplex against batchmode in migration
hkmt-mmy Jun 11, 2026
c5d62dc
guard RegisterVisibilityChange against listener leak on double-register
hkmt-mmy Jun 11, 2026
1747bf1
fix audioConductorListener scoping by declaring it as a jslib shared …
hkmt-mmy Jun 11, 2026
e36036c
fix scheduled-stop arm dropped before first AudioContext activation o…
hkmt-mmy Jun 12, 2026
b3a64ef
Revert "disable system pause temporarily for debugging"
hkmt-mmy Jun 12, 2026
86a54cd
support seamless loop on WebGL via native-loop and crossover per backend
hkmt-mmy Jun 26, 2026
7e61c6b
update changelog
hkmt-mmy Jun 26, 2026
9b031c2
review
hkmt-mmy Jun 26, 2026
61907f0
cancel pending WebGL binds when pausing before playback starts
hkmt-mmy Jun 26, 2026
8885479
fix system resume sample to startSample when paused before playback
hkmt-mmy Jun 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Assets/Development.meta

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

8 changes: 8 additions & 0 deletions Assets/Development/WebGLLoopTest.meta

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

17 changes: 17 additions & 0 deletions Assets/Development/WebGLLoopTest/AudioConductor.Development.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "AudioConductor.Development",
"rootNamespace": "AudioConductor.Development",
"references": [
"AudioConductor",
"UnityEngine.UI"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

113 changes: 113 additions & 0 deletions Assets/Development/WebGLLoopTest/BgmLoopTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// --------------------------------------------------------------
// Copyright 2026 CyberAgent, Inc.
// --------------------------------------------------------------

#nullable enable

using System.Collections.Generic;
using System.Threading.Tasks;
using AudioConductor.Core;
using AudioConductor.Core.Models;
using AudioConductor.Core.Providers;
using UnityEngine;

namespace AudioConductor.Development
{
// Dev-only WebGL loop verification scene; not part of the distributed package sample.
public class BgmLoopTest : MonoBehaviour
{
// One cue per AudioClipLoadType, all sharing the same intro + partial-loop
// settings, so seamless-loop behavior can be compared across load types in one scene.
private const string CueSheetName = "CueSheets/BgmLoopTestCueSheet";
private static readonly string[] CueNames = { "DecompressOnLoad", "CompressedInMemory", "Streaming" };
private readonly Dictionary<string, PlaybackHandle> _playbacks = new();

private Conductor? _conductor;
private string _log = "";
private CueSheetHandle _sheetHandle;
private bool _sheetRegistered;

private void Start()
{
var settings = ScriptableObject.CreateInstance<AudioConductorSettings>();
// Each looping cue uses 2 sources for crossover; 3 cues at once need 6, plus margin.
settings.managedPoolCapacity = 8;
_conductor = new Conductor(settings, new ResourcesCueSheetProvider());
}

private void OnDestroy()
{
_conductor?.Dispose();
}

private void OnGUI()
{
GUILayout.BeginArea(new Rect(20, 20, 460, 700));

GUILayout.Label("BGM Loop Test — loadType comparison (intro + partial loop)");
GUILayout.Space(10);

foreach (var cueName in CueNames)
{
var playing = _playbacks.ContainsKey(cueName);

GUILayout.BeginHorizontal();
GUILayout.Label(cueName + (playing ? " [playing]" : ""), GUILayout.Width(230));
if (GUILayout.Button(playing ? "■ Stop" : "▶ Play", GUILayout.Height(44)))
{
if (playing)
StopCue(cueName);
else
_ = PlayCue(cueName);
}

GUILayout.EndHorizontal();
GUILayout.Space(6);
}

GUILayout.Space(10);
if (GUILayout.Button("■ Stop All"))
StopAll();

GUILayout.Space(10);
GUILayout.Label(_log);
GUILayout.EndArea();
}

private async Task PlayCue(string cueName)
{
if (_conductor == null)
return;

if (!_sheetRegistered)
{
_sheetHandle = await _conductor.RegisterCueSheetAsync(CueSheetName);
_sheetRegistered = true;
_log = "Sheet registered.";
}

var handle = _conductor.Play(_sheetHandle, cueName, new PlayOptions { IsLoop = true });
_playbacks[cueName] = handle;
_log += "\nPlay: " + cueName;
}

private void StopCue(string cueName)
{
if (_conductor == null)
return;

if (!_playbacks.TryGetValue(cueName, out var handle))
return;

_conductor.Stop(handle);
_playbacks.Remove(cueName);
_log += "\nStop: " + cueName;
}

private void StopAll()
{
foreach (var cueName in new List<string>(_playbacks.Keys))
StopCue(cueName);
}
}
}
11 changes: 11 additions & 0 deletions Assets/Development/WebGLLoopTest/BgmLoopTest.cs.meta

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

Loading