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:
- 6:6fe2b62f259d
- Parent:
- 5:7c8f0fc9dfb6
- Child:
- 7:930d50953ec2
--- a/SD_PlayerSkeleton.hpp Tue Nov 08 05:03:43 2016 +0000 +++ b/SD_PlayerSkeleton.hpp Wed Nov 09 13:19:52 2016 +0000 @@ -1,7 +1,7 @@ //-------------------------------------------------------------- // SD プレーヤー用抽象基底クラス(ヘッダ) // -// 2016/11/08, Copyright (c) 2016 MIKAMI, Naoki +// 2016/11/09, Copyright (c) 2016 MIKAMI, Naoki //-------------------------------------------------------------- #ifndef F746_SD_PLAYER_SKELETON_HPP @@ -22,6 +22,7 @@ // リセット・ボタンを使う場合は resetButton を true とする SD_PlayerSkeleton(string str, int fs, bool resetButton = false); virtual ~SD_PlayerSkeleton() { if (reset_ != NULL) delete reset_; } + // SD プレーヤーの処理の実行 void Execute(); protected: @@ -36,7 +37,9 @@ SaiIO mySai_; SD_WavReader sdReader_; // SD カード読み込み用オブジェクト + // 選択されたファイル名を取得 string GetFileName() { return fileName_; } + // 選択されたファイル名から拡張子を除いたものを取得 string GetFileNameNoExt(); private: @@ -51,7 +54,12 @@ // ファイルの選択 void SelectFile(); // パネルが操作された場合の処理 - void CheckCtrl(); + void DoIfHandled(); + + // メニュ-のボタンがタッチされるまで DoIfHandled() を実行しながら待つ + void WaitTouched(int num) + { while (!menu_.Touched(num)) DoIfHandled(); } + int WaitTouched(); // コピー・コンストラクタとオブジェクトの代入演算子は使用禁止 SD_PlayerSkeleton(const SD_PlayerSkeleton&); @@ -66,7 +74,7 @@ virtual void Modefy() {} // 曲の再生時のに表示 virtual void Display() {} - // 信号処理で必要になる,データ等のクリア + // 信号処理で必要になるクリア処理 virtual void Clear() {} }; }