# Audio playback
The **gst-audio-decode-example** application demonstrates the playback of audio files in WAV, MP3, and FLAC formats. Separate pipelines for each audio format ensure efficient processing and compatibility.
This sample application provides a basic template that can be extended and adapted.
The following figure shows the pipeline, which reads and parses the audio file, and then decodes and plays the audio. For information about the plugins used in the pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-audio-decode-sample.html#section-ovq-ywt-4bc).
## Run the application
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/mm_sample_apps_prerequisites.html).
2. Input at least one of the `.mp3`, `.WAV`, or `.FLAC` audio files on the target device.
3. In the terminal of the target device, use the following command to run the application for different audio formats:
gst-audio-decode-example -i /etc/media/ --audio_format=
Copy to clipboard
| Command-line parameter | Description |
| --- | --- |
| `-i` | Specifies the absolute path to the input audio file to decode |
| `--audio_format` | Specifies the format of the audio file:
1 = MP3
2 = WAV
3 = FLAC
|
For example, use the following commands to run the application for MP3, WAV, or FLAC audio formats:
- Decode MP3:
``` {#codeblock_wtr_2m3_y1c}
gst-audio-decode-example -i /etc/media/.mp3 --audio_format=1
```
- Decode WAV:
``` {#codeblock_onz_2m3_y1c}
gst-audio-decode-example -i /etc/media/.wav --audio_format=2
```
- Decode FLAC:
``` {#codeblock_w2h_fm3_y1c}
gst-audio-decode-example -i /etc/media/.flac --audio_format=3
```
Copy to clipboard
4. To stop the use case, use **CTRL + C**.
5. In the terminal of the target device, run the following command in the SSH shell to display the available help options:
gst-audio-decode-example --help
Copy to clipboard
## Expected output
Based on the format (MP3, WAV, FLAC), the decoded audio file is played back.
## Pipeline flow
| Plugin | Description |
| --- | --- |
| filesrc | Reads the audio files. |
|
mpegaudioparse
wavparse
flacparse
| Parses the MPEG, WAV, and FLAC audio files respectively. |
|
mpg123audiodec
flacdec
| Decodes the MP3 and FLAC files respectively. |
| [pulsesink](https://docs.qualcomm.com/doc/80-80021-50/topic/pulsesink.html) | Plays the decoded audio. |
## Known issue
Audio playback may not work if the audio sink isn't selected using wpctl.
## Related information
[Audio use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/audio-use-cases.html)
Last Published: Mar 26, 2026
[Previous Topic
Audio and video encode](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-audio-video-encode.md) [Next Topic
Audio recording](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-audio-encode-example-without-flac.md)