UNPKG

@bscotch/yy

Version:

Stringify, parse, read, and write GameMaker yy and yyp files.

119 lines 4.45 kB
import { z } from 'zod'; export declare enum SoundBitDepth { Bit8 = 0, Bit16 = 1 } export declare enum SoundChannel { Mono = 0, Stereo = 1, ThreeD = 2 } export declare enum SoundCompression { Uncompressed = 0, Compressed = 1, UncompressedOnLoad = 2, CompressedStreamed = 3 } export type SoundChannelAsString = keyof typeof SoundChannel; export type SoundCompressionAsString = keyof typeof SoundCompression; export type SoundSampleRate = z.infer<typeof soundSampleRateSchema>; declare const soundSampleRateSchema: z.ZodUnion<[z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>; export type YySound = z.infer<typeof yySoundSchema>; export declare const yySoundSchema: z.ZodObject<z.objectUtil.extendShape<{ "%Name": z.ZodOptional<z.ZodString>; ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>; name: z.ZodString; resourceType: z.ZodString; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; parent: z.ZodDefault<z.ZodObject<{ name: z.ZodString; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; name: string; }, { path: string; name: string; }>>; resourceVersion: z.ZodDefault<z.ZodString>; }, { compression: z.ZodDefault<z.ZodNativeEnum<typeof SoundCompression>>; conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; volume: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodNumber, number, number | import("./utility.js").FixedNumber>, import("./utility.js").FixedNumber, number | import("./utility.js").FixedNumber>>; preload: z.ZodDefault<z.ZodBoolean>; bitRate: z.ZodDefault<z.ZodNumber>; sampleRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>; type: z.ZodDefault<z.ZodNativeEnum<typeof SoundChannel>>; bitDepth: z.ZodDefault<z.ZodNativeEnum<typeof SoundBitDepth>>; audioGroupId: z.ZodDefault<z.ZodObject<{ name: z.ZodString; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; name: string; }, { path: string; name: string; }>>; /** `${name}.${ext} (e.g. mySound) */ soundFile: z.ZodString; /** * Duration of the sound. Automatically * computed by GameMaker, so Stitch can generally * ignore it. */ duration: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodNumber, number, number | import("./utility.js").FixedNumber>, import("./utility.js").FixedNumber, number | import("./utility.js").FixedNumber>>; resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>; }>, z.UnknownKeysParam, z.ZodTypeAny, { type: SoundChannel; name: string; resourceType: "GMSound"; parent: { path: string; name: string; }; resourceVersion: string; volume: import("./utility.js").FixedNumber; compression: SoundCompression; conversionMode: number; preload: boolean; bitRate: number; sampleRate: 5512 | 11025 | 22050 | 32000 | 44100 | 48000; bitDepth: SoundBitDepth; audioGroupId: { path: string; name: string; }; soundFile: string; "%Name"?: string | undefined; ConfigValues?: Record<string, Record<string, string>> | undefined; tags?: string[] | undefined; duration?: import("./utility.js").FixedNumber | undefined; }, { name: string; soundFile: string; type?: SoundChannel | undefined; "%Name"?: string | undefined; ConfigValues?: Record<string, Record<string, string>> | undefined; resourceType?: "GMSound" | undefined; tags?: string[] | undefined; parent?: { path: string; name: string; } | undefined; resourceVersion?: string | undefined; volume?: number | import("./utility.js").FixedNumber | undefined; compression?: SoundCompression | undefined; conversionMode?: number | undefined; preload?: boolean | undefined; bitRate?: number | undefined; sampleRate?: 5512 | 11025 | 22050 | 32000 | 44100 | 48000 | undefined; bitDepth?: SoundBitDepth | undefined; audioGroupId?: { path: string; name: string; } | undefined; duration?: number | import("./utility.js").FixedNumber | undefined; }>; export {}; //# sourceMappingURL=YySound.d.ts.map