The software processes for playing back and capturing audio data are similar.
This section describes the common steps.
Opening your PCM device
The first thing you need to do in order to play back or capture sound is open a connection to a PCM playback or capture device.
Configuring the PCM device
The next step in playing back or capturing the sound stream is to inform the device of the format of the data that you're about to send it or want to receive from it.