The Play function will happily accept arbitrary values for its SampleDepth and SampleRate options. For example, if I do:

Play[Sin[2 π 440 t], {t, 0, 1}, SampleDepth -> 240, SampleRate -> 480000]

… this will evaluate without a problem, and when I hit the play button, I will hear the sound.

But I know that my computer hardware is not capable of outputting sound at 240 bits and 480 kHz.

So what sample depth and rate am I actually hearing? Does Mathematica use some standard rate for output (maybe 16 bits at 44.1 kHz)? Does it use the maximum capability of my hardware (in my case, 24 bits at 48 kHz)? Or something else?

Is there any way to query Mathematica for my system’s audio capabilities?

  • $\begingroup$ I don't know; this is marginally related and shows you how to query recording capabilities. Some spelunking reveals that when playing sound, the SampledSoundList is wrapped in FEPrivate`EmitSound and sent to the front end for playing. From there on everything's opaque to me. I don't know any way to discover what the front end does with this data. $\endgroup$
    – Szabolcs
    Commented Jun 11, 2014 at 23:47
  • 1
    $\begingroup$ If you get no response here, try writing to Wolfram support and ask. If they reply, let us know what they said (you can answer your own question). $\endgroup$
    – Szabolcs
    Commented Jun 11, 2014 at 23:48
  • 1
    $\begingroup$ IIRC, on Windows MM uses wave output, which then goes through SRC in the Windows audio stack to match whatever the output device is set to. $\endgroup$
    – ciao
    Commented Jun 12, 2014 at 0:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.