# Issues

Issue #58 invalid

# Sounds in Beamer are distorted

ian_fin
created an issue

I'm trying to add sounds to slides for the first time and when I play them in Adobe Reader, the audio is getting distorted.

I've been trying to trace the problem back and as far as I can see it's happening when the .tex file is being built. I've tried my PDF on a couple of machines, as well as comparing with someone else's script which worked for them. Also tried changing between .au and .aiff, as well as double (triple, quadruple...) checking that the specs of the format I used match the default arguments of \sound.

It builds without error, so doesn't seem to be a problem with what's there.

{{{

# !LaTeX

\documentclass{beamer} \mode<presentation> \usepackage{multimedia} \begin{document} \begin{frame}

\sound[inlinesound,automute]{Substitution}{substitution.aiff}

\end{frame} \end{document} }}}

Building in Windows 7 in TeXnicCenter, using MiKTeX

it would certainly help if you could attach the soundfile too...

1. reporter

Gave it a try on a machine running Linux and the sound works... I'm guessing it's a problem with the software that various PDF viewers use to play media, and Beamer is not to blame.

*Closed*

2. I'm afraid the issue is by no means solved.

Consider the following small, self-contained, correct example:

\documentclass{beamer}

\mode<presentation>
\usepackage{multimedia}

\begin{document}

\begin{frame}
\sound[inlinesound,encoding=Signed]{Click me!}{Glass.raw}
\end{frame}

\end{document}


With MacTeX 2009, which packs pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009), everything works fine. However, after an upgrade to MacTeX 2010, which packs pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010), the same example generates a pdf file in which the sound is played back distorted.

To be precise:

/usr/local/texlive/2009/bin/universal-darwin/pdflatex sound_issue


produces sound_issue_2009.pdf, while

/usr/local/texlive/2010/bin/universal-darwin/pdflatex sound_issue


produces sound_issue_2010.pdf (which has distorted sound).

This seems to strongly indicate that TeXLive 2010 ships with a pdftex version which handles beamer's multimedia sound differently than the version in TeXLive 2009, and causes the sound to be distorted in the PDF viewer.

3. repo owner

I'm not sure that this is a Beamer issue. Can you check if the same thing happens with \documentclass{article}?

Indeed,

\documentclass{article}

\usepackage{hyperref, multimedia}

\begin{document}

\sound[inlinesound,encoding=Signed]{Click me!}{Glass.raw}

\end{document}



produces the same distorted audio with MacTeX 2010, but works normally with MacTeX 2009. So it's not an issue with beamer per se, but as far as I can tell, multimedia is a sub-package of beamer, right?

I can't help but notice that the version of pdfTeX that comes with TeXLive 2010 is a newer version than the current stable release at http://www.tug.org/applications/pdftex/ (3.1415926-1.40.10-2.2), so maybe the TeXLive people built the bundled binaries using unstable code... I'll check over there and report back.

4. repo owner

I haven't changed anything in multimedia.sty, aside from moving it to a different location. Perhaps pdfTeX changed in some way.

I doubt that unstable version is actually shipped; it's probably that webpage isn't maintained.

I got a sound correctly reproduced by specifying some encoding properties in the code (and also converting the sound either to .aiff or .au, with .wav doesn't work). ex:

\sound[inlinesound,encoding=signed,channels=2]{Play the sound!}{test.aiff}

5. reporter

I've encountered the problem again in Linux using TexLive 2010.

It only happens with the newer version of PDFLaTeX (3.1415926-1.40.11-2.2; I have an old version of Ubuntu which happens to have 3.1415926-1.40.10-2.2, and it works fine). The obvious response is of course to put the blame on PDFLaTeX, but I've never had any problems with the audio when including videos using the flashmovie package.

6. reporter

Further update: I get the same problem when trying to build with LuaLaTeX as well.

7. Sound playback is the job of the PDF viewer, and indeed insertion into the output is an engine job. beamer has not control over this other than saying 'include sound here' => not a beamer bug.