Local Music Example

Source code path: example/multimedia/audio/local_music

Supported Platforms

  • sf32lb52-lcd_n16r8

  • eh-lb525

Overview

This example demonstrates local music playback, including:

  • Preset a wav audio file in the root partition.

  • Play the preset wav file.

Example Usage

Hardware Requirements

Before running this example, prepare:

Compilation and Programming

Switch to the example project directory and run the scons command to execute compilation:

> scons --board=eh-lb525 -j32

Switch to the example project/build_xx directory and run uart_download.bat, select the port as prompted for download:

$ ./uart_download.bat

     Uart Download

please input the serial port num:5

For detailed steps on compilation and download, please refer to the relevant introduction in Quick Start.

Expected Results of Example

After the example starts: Play the preset 16k.wav audio file once. Expected to complete normal playback.

Tip

If you need to play MP3 files, you can preset an MP3 file (note whether the audio file size exceeds the file system capacity) and configure the playback path:

#define MUSIC_FILE_PATH "/Cloudy_Day.mp3"

## Exception Diagnosis


## Reference Documents
<!-- For rt_device examples, RT-Thread official website documentation provides detailed explanations, web links can be added here, for example, refer to RT-Thread's [RTC documentation](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/programming-manual/device/rtc/rtc) -->

## Update History
|Version |Date   |Release Notes |
|:---|:---|:---|
|0.0.1 |10/2024 |Initial version |
| | | |
| | | |