You typically want to read the file’s contained data and convert it to linear PCM. Many applications that handle audio need to read and write the data, either to disk or to a buffer. Each approach has its advantages and capabilities. Alternatively, you could load the built-in File Player audio unit into your application.
For example, your Mac app can call Audio File Services to read a compressed sound file from disk, Audio Converter Services to convert the data to linear PCM, and Audio Queue Services to play it.
In other words, you can often do things in more than one way. This chapter describes how you can combine parts of Core Audio to accomplish some common tasks in OS X.Ĭore Audio is extremely modular, with few restrictions on how to use its various parts.