Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ void task_llm(void *pvParameters)
{
break;
}
vTaskDelay(10);
}

LLM_setup("jp");
Expand Down
15 changes: 14 additions & 1 deletion src/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,27 @@ static Note MELODY_SE_END[] = {
{-1, -1}, // Terminater
};

/**
* @brief 会話開始時の効果音データ
* @note 短いビープ音を2回再生
*/
static Note MELODY_SE_TALK[] = {
{880, NOTE_64_MS}, // A5
{0, NOTE_64_MS}, // r
{880, NOTE_64_MS}, // A5
{-1, -1}, // Terminater
};

/**
* @brief 効果音データの配列
* @note SOUND_SE 列挙型のインデックスに対応
*/
static Note *MELODY_SE_LIST[] = {
MELODY_SE_START,
MELODY_SE_END,
MELODY_SE_TALK,
};
static const size_t MELODY_SE_COUNT = sizeof(MELODY_SE_LIST) / sizeof(MELODY_SE_LIST[0]);

/**
* @brief 指定した波形、周波数、時間で音を再生する
Expand Down Expand Up @@ -253,7 +266,7 @@ void sound_play(const int type, const float freq, const uint32_t duration)
*/
void sound_play_SE(const SOUND_SE no)
{
if (no < 0 || no >= 3)
if (no < 0 || no >= MELODY_SE_COUNT)
{
return;
}
Expand Down