import { AudioFile } from "./AudioUtils.js"; import { DisplaySamples } from "./DisplaySamples.js"; import { Program } from "./Program.js"; import { WaveformAnnotation } from "./Annotations.js"; import { SimpleEventDispatcher } from "strongly-typed-events"; import { Cassette } from "trs80-base"; export interface SavedProgram { name: string; notes: string; /** * Representative timestamp, in seconds, for this program. This is roughly the half-way point of the * program on the tape. */ timestamp: number; screenshot: string; } export interface SavedTape { name: string; notes: string; programs: SavedProgram[]; } export interface SavedData { tapes: SavedTape[]; } export declare class Tape { name: string; notes: string; originalSamples: DisplaySamples; filteredSamples: DisplaySamples; lowSpeedSamples: DisplaySamples; sampleRate: number; programs: Program[]; readonly waveformAnnotations: WaveformAnnotation[]; readonly onName: SimpleEventDispatcher; readonly onNotes: SimpleEventDispatcher; /** * @param name text to display (e.g., "LOAD80-Feb82-s1"). * @param audioFile original samples from the tape. */ constructor(name: string, audioFile: AudioFile); /** * Create a fake Tape object from a CAS file. */ static fromCas(name: string, cas: Cassette): Tape; addProgram(program: Program): void; /** * Set the name of the tape, as set by the user. */ setName(name: string): void; /** * Set the notes for the tape, as set by the user. */ setNotes(notes: string): void; /** * Return a .cas file version of the tape. */ asCasFile(): Uint8Array; /** * Return a .wav file version of the tape. */ asWavFile(): Uint8Array; /** * Listen for changes to local storage and apply them. */ listenForStorageChanges(): void; /** * Load the saved user data and apply to existing programs. */ loadUserData(): void; /** * Synchronously saves all user data (names and notes) to local storage. */ saveUserData(): void; /** * Get user data as a SavedData object. */ static loadAllData(): SavedData; /** * Get user data as a formatted JSON object. */ static getAllDataAsJson(): string; /** * Set the full data from a JSON string. */ static saveAllDataAsJson(jsonData: string): void; } //# sourceMappingURL=Tape.d.ts.map