# 사운드 (Sound)

![](/files/VEfg6v7UtybB8h16QYZm)    ![](/files/b0NRGZUbRZJdJM5a8lof)

1. **음악 플레이어 생성**
   * 위 코드에서 `AudioPlayer`를 사용하여 음악 플레이어를 생성합니다.
   * `List.generate`를 사용하여 여러 개의 플레이어를 생성할 수 있습니다.
2. **현재 선택된 플레이어 설정**
   * `selectedPlayerIdx` 변수를 사용하여 현재 선택된 플레이어 인덱스를 저장합니다.
   * `selectedPlayer` 게터 메서드를 사용하여 현재 선택된 플레이어를 가져올 수 있습니다.
3. **커스텀 사운드 위젯 사용**

   * `Sound` 위젯을 사용하여 사운드를 플레이합니다. 이 위젯은 `AudioPlayer`를 통해 사운드를 제어합니다.
   * 위 코드에서는 현재 선택된 플레이어를 사용하여 사운드를 재생하도록 설정되어 있습니다.

사운드는 앱을 더욱 흥미롭게 만들고 사용자에게 더 나은 경험을 제공하는 데 도움이 됩니다. 음악, 효과음 및 녹음된 메시지와 같은 사운드를 통해 앱을 풍부하게 만들어보세요. 사용자들은 이러한 사운드가 앱의 상호작용 및 엔터테인먼트 요소를 더욱 즐길 수 있을 것입니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.aliothx.net/start/uiux/ui-ux/sound.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
