/// <summary>Creates a sound annotation.</summary> /// <remarks>Creates a sound annotation. Sound annotations are deprecated in PDF 2.0.</remarks> /// <param name="document"/> /// <param name="rect"/> /// <param name="soundStream"/> /// <param name="sampleRate"/> /// <param name="encoding"/> /// <param name="channels"/> /// <param name="sampleSizeInBits"/> public PdfSoundAnnotation(PdfDocument document, Rectangle rect, Stream soundStream, float sampleRate, PdfName encoding, int channels, int sampleSizeInBits) : base(rect) { PdfStream sound = new PdfStream(document, JavaUtil.CorrectWavFile(soundStream)); sound.Put(PdfName.R, new PdfNumber(sampleRate)); sound.Put(PdfName.E, encoding); sound.Put(PdfName.B, new PdfNumber(sampleSizeInBits)); sound.Put(PdfName.C, new PdfNumber(channels)); Put(PdfName.Sound, sound); }