4track 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/audio/engine.svelte.js +15 -0
- package/package.json +8 -2
|
@@ -577,6 +577,21 @@ export class AudioEngine {
|
|
|
577
577
|
}
|
|
578
578
|
/** Loads a .4trk file, restoring all track buffers, mixer settings, and master volume. */
|
|
579
579
|
async importProject(file) {
|
|
580
|
+
// Stop any in-progress recording or playback
|
|
581
|
+
if (this.playState === "recording")
|
|
582
|
+
this.stopRecording();
|
|
583
|
+
this.stopAllPlayback();
|
|
584
|
+
this.playState = "stopped";
|
|
585
|
+
this.stopMonitoring();
|
|
586
|
+
// Clear all existing track data before loading
|
|
587
|
+
for (const track of this.tracks) {
|
|
588
|
+
if (!track.hidden) {
|
|
589
|
+
track.buffer = null;
|
|
590
|
+
track.hasContent = false;
|
|
591
|
+
track.trimStart = 0;
|
|
592
|
+
track.level = 0;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
580
595
|
const { masterVolume } = await _importProject(file, this.tracks, () => this.ensureContext());
|
|
581
596
|
this.setMasterVolume(masterVolume);
|
|
582
597
|
this.rewind();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "4track",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A 4-track cassette recorder component for Svelte 5",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"author": "Andre Boekhorst",
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/andreboekhorst/4track.cc.git"
|
|
10
10
|
},
|
|
11
|
-
"keywords": [
|
|
11
|
+
"keywords": [
|
|
12
|
+
"svelte",
|
|
13
|
+
"audio",
|
|
14
|
+
"recorder",
|
|
15
|
+
"cassette",
|
|
16
|
+
"4-track"
|
|
17
|
+
],
|
|
12
18
|
"type": "module",
|
|
13
19
|
"svelte": "./dist/index.js",
|
|
14
20
|
"types": "./dist/index.d.ts",
|