AudioType

AudioType[audio]

returns the data type used to represent samples in the Audio object audio.

Details

  • Possible types returned by AudioType are:
  • "SignedInteger8"signed 8-bit integers from through
    "SignedInteger16"signed 16-bit integers from through
    "SignedInteger32"signed 32-bit integers from through
    "Real32"single-precision real (32-bit)
    "Real64"double-precision real (64-bit)

Examples

open allclose all

Basic Examples  (3)

Extract the type of an audio object:

A real audio object:

An out-of-core audio object always assumes a "Real32" type:

Scope  (6)

Generate an audio object of type "SignedInteger8":

Extract the type:

A 16-bit audio object:

A "Real32" audio object:

Use the Audio construct to convert an audio object to a different type:

Compare the byte counts of different data types:

The byte count of an out-of-core audio object does not increase for larger data types:

The byte counts of the stored files are different:

The byte counts of out-of-core audio objects are the same:

Possible Issues  (1)

An out-of-core audio object supports only a "Real32" type:

The type of the imported audio is the same as what is stored in the file:

Introduced in 2016
 (11.0)
 |
Updated in 2019
 (12.0)