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
Revision 4:d730d024ac32, committed 2016-11-07
- Comitter:
- MikamiUitOpen
- Date:
- Mon Nov 07 00:54:55 2016 +0000
- Parent:
- 3:dd3b8a21417b
- Child:
- 5:7c8f0fc9dfb6
- Commit message:
- 5
Changed in this revision
| SD_PlayerSkeleton.cpp | Show annotated file Show diff for this revision Revisions of this file |
| SD_PlayerSkeleton.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SD_PlayerSkeleton.cpp Wed Nov 02 12:59:58 2016 +0000
+++ b/SD_PlayerSkeleton.cpp Mon Nov 07 00:54:55 2016 +0000
@@ -1,7 +1,7 @@
//--------------------------------------------------------------
// SD プレーヤー用抽象基底クラス
//
-// 2016/10/01, Copyright (c) 2016 MIKAMI, Naoki
+// 2016/11/07, Copyright (c) 2016 MIKAMI, Naoki
//--------------------------------------------------------------
#include "SD_PlayerSkeleton.hpp"
@@ -120,6 +120,17 @@
}
}
+ // 拡張子を除いたファイル名を取得
+ string SD_PlayerSkeleton::GetFileNameNoExt()
+ {
+ string fName = fileName_;
+ int k = fName.rfind(".");
+ if (k != string::npos)
+ return fName.erase(k);
+ else
+ return fName;
+ }
+
// SD カードのファイルのオープン
int32_t SD_PlayerSkeleton::SD_Open()
{
@@ -149,3 +160,4 @@
Modefy();
}
}
+
--- a/SD_PlayerSkeleton.hpp Wed Nov 02 12:59:58 2016 +0000
+++ b/SD_PlayerSkeleton.hpp Mon Nov 07 00:54:55 2016 +0000
@@ -1,7 +1,7 @@
//--------------------------------------------------------------
// SD プレーヤー用抽象基底クラス(ヘッダ)
//
-// 2016/10/02, Copyright (c) 2016 MIKAMI, Naoki
+// 2016/11/07, Copyright (c) 2016 MIKAMI, Naoki
//--------------------------------------------------------------
#ifndef F746_SD_PLAYER_SKELETON_HPP
@@ -37,6 +37,7 @@
SD_WavReader sdReader_; // SD カード読み込み用オブジェクト
string GetFileName() { return fileName_; }
+ string GetFileNameNoExt();
private:
string fileName_; // 選択されたファイル名
@@ -71,3 +72,4 @@
};
}
#endif // F746_SD_PLAYER_SKELETON_HPP
+