/// declare class Metaflac { buffer: Buffer; marker: string; streamInfo: any; blocks: any[]; padding: any; vorbisComment: any; vendorString: string; tags: any; pictures: Buffer[]; picturesSpecs: object[]; picturesDatas: string[]; framesOffset: number; constructor(flac: Buffer); init(): void; parseVorbisComment(): void; parsePictureBlock(): void; getPicturesSpecs(): object[]; /** * Get the MD5 signature from the STREAMINFO block. */ getMd5sum(): any; /** * Get the minimum block size from the STREAMINFO block. */ getMinBlocksize(): any; /** * Get the maximum block size from the STREAMINFO block. */ getMaxBlocksize(): any; /** * Get the minimum frame size from the STREAMINFO block. */ getMinFramesize(): any; /** * Get the maximum frame size from the STREAMINFO block. */ getMaxFramesize(): any; /** * Get the sample rate from the STREAMINFO block. */ getSampleRate(): number; /** * Get the number of channels from the STREAMINFO block. */ getChannels(): number; /** * Get the # of bits per sample from the STREAMINFO block. */ getBps(): number; /** * Get the total # of samples from the STREAMINFO block. */ getTotalSamples(): number; /** * Show the vendor string from the VORBIS_COMMENT block. */ getVendorTag(): string; /** * Get all tags where the the field name matches NAME. * * @param {string} name */ getTag(name: string): any; /** * Remove all tags whose field name is NAME. * * @param {string} name */ removeTag(name: string): void; /** * Remove first tag whose field name is NAME. * * @param {string} name */ removeFirstTag(name: string): void; /** * Remove all tags, leaving only the vendor string. */ removeAllTags(): void; /** * Add a tag. * The FIELD must comply with the Vorbis comment spec, of the form NAME=VALUE. If there is currently no tag block, one will be created. * * @param {string} field */ setTag(field: string): void; /** * Import a picture and store it in a PICTURE metadata block. * * @param {string} filename */ importPicture(picture: Buffer, dimension: number, mime: 'image/jpeg' | 'image/png'): void; /** * Return all tags. */ getAllTags(): any; buildSpecification(spec?: {}): { type: number; mime: string; description: string; width: number; height: number; depth: number; colors: number; }; /** * Build a picture block. * * @param {Buffer} picture * @param {Object} specification * @returns {Buffer} */ buildPictureBlock(picture: Buffer, specification?: any): Buffer; buildMetadataBlock(type: number, block: Buffer, isLast?: boolean): Buffer; buildMetadata(): Buffer[]; buildStream(): Buffer[]; /** * Save changes to buffer and return changed buffer */ getBuffer(): Buffer; } export default Metaflac;