Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem_Warning_Fixed
Dependents: DISCO-F746_WAV_PLAYER WAV
Diff: SD_PlayerSkeleton.hpp
- Revision:
- 18:6631cd0fbbcd
- Parent:
- 17:abfd6af9a236
diff -r abfd6af9a236 -r 6631cd0fbbcd SD_PlayerSkeleton.hpp
--- a/SD_PlayerSkeleton.hpp Thu Mar 23 02:58:48 2017 +0000
+++ b/SD_PlayerSkeleton.hpp Tue Jun 04 21:35:59 2019 +0000
@@ -1,7 +1,3 @@
-//--------------------------------------------------------------
-// SD プレーヤー用抽象基底クラス(ヘッダ)
-//
-// 2017/03/22, Copyright (c) 2016 MIKAMI, Naoki
//--------------------------------------------------------------
#ifndef F746_SD_PLAYER_SKELETON_HPP
@@ -19,60 +15,55 @@
class SD_PlayerSkeleton
{
public:
- // リセット・ボタンを使う場合は resetButton を true とする
+ // Đặt resetButton thành true nếu sử dụng nút reset
SD_PlayerSkeleton(string str, bool resetButton = false);
virtual ~SD_PlayerSkeleton() { if (reset_ != NULL) delete reset_; }
- // SD プレーヤーの処理の実行
+ // thực thi xử lý trình phát SD
void Execute();
protected:
- // ボタン用の定数
+
static const uint16_t BG_LEFT_ = 414;
static const uint16_t BG_WIDTH_ = 66;
static const uint16_t BG_HEIGHT_ = 36;
- const int32_t BUFF_SIZE_; // バッファのサイズ
- Array<int16_t> sn_; // バッファ
+ const int32_t BUFF_SIZE_; // Kích thước của bộ đệm
+ Array<int16_t> sn_; // bộ đệm
SaiIO mySai_;
- SD_WavReader sdReader_; // SD カード読み込み用オブジェクト
+ SD_WavReader sdReader_; // Đối tượng đọc thẻ SD
- // 選択されたファイル名を取得
+ // Lấy tên tệp đã chọn
string GetFileName() { return fileName_; }
- // 選択されたファイル名から拡張子を除いたものを取得
+ // Nhận tên tệp đã chọn mà không có phần mở rộng
string GetFileNameNoExt();
private:
- string fileName_; // 選択されたファイル名
- Label title_; // 上部に表示されるタイトル
+ string fileName_; // Tên tệp đã chọn
+ Label title_; // Tiêu đề hiển thị ở trên cùng
FileSelector selector_;
ButtonGroup menu_;
- ResetButton *reset_; // リセットボタン用オブジェクトのポインタ
+ ResetButton *reset_; // Con trỏ cho nut Reset
- // SD カードのファイルのオープン
+ // Mở tệp thẻ SD
int32_t SD_Open();
- // ファイルの選択
+ // Chọn tệp
void SelectFile();
- // パネルが操作された場合の処理
+ // Xử lý khi bảng điều khiển được vận hành
void DoIfHandled();
-
- // メニューのいずれかのボタンがタッチされるまで DoIfHandled() を実行しながら待つ
+// Đợi trong khi thực hiện Do IfHandled () cho đến khi một trong các nút menu được chạm
int WaitTouched();
- // コピー・コンストラクタとオブジェクトの代入演算子は使用禁止
+ // Không sử dụng hàm tạo sao chép và toán tử gán đối tượng
SD_PlayerSkeleton(const SD_PlayerSkeleton&);
SD_PlayerSkeleton& operator=(const SD_PlayerSkeleton&);
- //-------------------------------------
- // 以下は仮想関数
- //-------------------------------------
- // 1ブロック分の信号処理
virtual void SignalProcessing() = 0;
- // 信号処理のパラメータ変更など
+ // Thay đổi tham số xử lý tín hiệu, v.v.
virtual void Modefy() {}
- // 曲の再生時の表示
+ // Hiển thị khi phát một bài hát
virtual void Display() {}
- // 信号処理で必要になるクリア処理
+ // *Xóa quá trình cần thiết để xử lý tín hiệu*//
virtual void Clear() {}
};
}