import { BaseRawEngine, FloatArrayPointer, InternalPointer } from '../../engine-assemblyscript/run/types'; import { AudioSettings } from '../../compile/types'; import { FloatArray } from '../../run/types'; import { CoreExportsAssemblyScript } from './types'; export type TypedArrayConstructor = typeof Int8Array | typeof Uint8Array | typeof Int16Array | typeof Uint16Array | typeof Int32Array | typeof Uint32Array | typeof Uint8ClampedArray | typeof Float32Array | typeof Float64Array; export interface CoreRawModule { globals: { core: CoreExportsAssemblyScript; }; } export type CoreRawModuleWithDependencies = CoreRawModule & BaseRawEngine; /** @copyright Assemblyscript ESM bindings */ export declare const liftString: (rawModule: CoreRawModuleWithDependencies, pointer: number) => string; /** @copyright Assemblyscript ESM bindings */ export declare const lowerString: (rawModule: CoreRawModuleWithDependencies, value: string) => number; /** @copyright Assemblyscript ESM bindings */ export declare const lowerBuffer: (rawModule: CoreRawModuleWithDependencies, value: ArrayBuffer) => number; /** * @returns A typed array which shares buffer with the wasm module, * thus allowing direct read / write between the module and the host environment. * * @copyright Assemblyscript ESM bindings `liftTypedArray` */ export declare const readTypedArray: <_TypedArrayConstructor extends TypedArrayConstructor>(rawModule: CoreRawModuleWithDependencies, constructor: _TypedArrayConstructor, pointer: FloatArrayPointer) => InstanceType<_TypedArrayConstructor>; /** @param bitDepth : Must be the same value as what was used to compile the engine. */ export declare const lowerFloatArray: (rawModule: CoreRawModuleWithDependencies, bitDepth: AudioSettings['bitDepth'], data: Array | FloatArray) => { array: FloatArray; arrayPointer: number; }; /** @param bitDepth : Must be the same value as what was used to compile the engine. */ export declare const lowerListOfFloatArrays: (rawModule: CoreRawModuleWithDependencies, bitDepth: AudioSettings['bitDepth'], data: Array | FloatArray>) => InternalPointer; /** @param bitDepth : Must be the same value as what was used to compile the engine. */ export declare const readListOfFloatArrays: (rawModule: CoreRawModuleWithDependencies, bitDepth: AudioSettings['bitDepth'], listOfArraysPointer: InternalPointer) => (Float32Array | Float64Array | Uint16Array | Uint32Array | Uint8Array | Int8Array | Int16Array | Int32Array | Uint8ClampedArray)[];