Click or drag to resize

PdfiumFPDFTOOLS_GetWaveData Method

Convert audio WAV file to PDF compatible format.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static byte[] FPDFTOOLS_GetWaveData(
	byte[] waveData,
	out SoundEncodingFormats format,
	out int chanels,
	out int rate,
	out int bps
)

Parameters

waveData  Byte
An array of bytes containing audio file.
format  SoundEncodingFormats
Gets the encoding format of the returned data.
chanels  Int32
Gets the number of sound channels.
rate  Int32
Gets the sampling rate, in samples per second.
bps  Int32
Gets the number of bits per sample.

Return Value

Byte
An array of bytes containing audio samples encoded to PDF compatible format.
Exceptions
ExceptionCondition
PdfiumExceptioncode= ERROR_BAD_FORMAT(11): waveData does not contain RIFF or RIFX section.
PdfiumExceptioncode= ERROR_UNEXPECTED_FORMAT(536871428): waveData is not in PCM format.
PdfiumExceptioncode= ERROR_UNEXPECTED_PARAMETER(536871429): bitsPerSample of waveData has wrong value.
PdfiumExceptioncode= ERROR_DOUBLE_SECTION(536871430): waveData has more than one FMT or DATA section.
PdfiumExceptioncode=ERROR_UNEXPECTED_DATA_LENGTH(536871433): the length of DATA section is wrong.
Remarks
Note  Note
Currently supported PCM WAV files only.
See Also