star-audio 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2784,6 +2784,11 @@ var StarAudioImpl = class {
2784
2784
  this.music.fadeTo = this.music.crossfadeTo;
2785
2785
  this.music.switchTo = this.music.crossfadeTo;
2786
2786
  this.musicFadeTo = this.music.crossfadeTo;
2787
+ for (const presetName of Object.keys(PRESET_DEFINITIONS)) {
2788
+ this._loadProceduralSound(presetName, presetName).catch((err) => {
2789
+ console.warn(`[StarAudio] Failed to auto-preload preset ${presetName}:`, err);
2790
+ });
2791
+ }
2787
2792
  }
2788
2793
  get state() {
2789
2794
  return this._state;
@@ -2888,11 +2893,9 @@ var StarAudioImpl = class {
2888
2893
  // --- Playback ---
2889
2894
  play(id, opts = {}) {
2890
2895
  if (isPreset(id) && !this._sounds.has(id)) {
2891
- console.info(`[StarAudio] Auto-generating preset: ${id}`);
2892
2896
  this._loadProceduralSound(id, id).catch((err) => {
2893
2897
  console.error(`[StarAudio] Failed to generate preset ${id}:`, err);
2894
2898
  });
2895
- console.warn(`[StarAudio] Preset ${id} is generating, try again in a moment`);
2896
2899
  return null;
2897
2900
  }
2898
2901
  if ((opts.src || opts.url) && !this._sounds.has(id)) {