mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
voicefont: make format version a parameter.
Make hardcoded format version a parameter to allow adjusting depending on the installed Rockbox version. Rockbox Utility will read the version from the installed version. Since the command line voicefont tool is only intended for use in the current tree it uses a fixed version. Change-Id: I1ec935d47c71961e93b3c6bc6c5d816cd9fc83ff
This commit is contained in:
parent
7c78963bbb
commit
b2380b535e
6 changed files with 15 additions and 5 deletions
|
|
@ -26,6 +26,7 @@ RockboxInfo::RockboxInfo(QString mountpoint, QString fname)
|
|||
qDebug() << "[RockboxInfo] Getting version info from rockbox-info.txt";
|
||||
QFile file(mountpoint + "/" + fname);
|
||||
m_success = false;
|
||||
m_voicefmt = 400; // default value for compatibility
|
||||
if(!file.exists())
|
||||
return;
|
||||
|
||||
|
|
@ -40,6 +41,7 @@ RockboxInfo::RockboxInfo(QString mountpoint, QString fname)
|
|||
QRegExp features("^Features:\\s+(\\S.*)");
|
||||
QRegExp targetid("^Target id:\\s+(\\S.*)");
|
||||
QRegExp memory("^Memory:\\s+(\\S.*)");
|
||||
QRegExp voicefmt("^Voice format:\\s+(\\S.*)");
|
||||
while (!file.atEnd())
|
||||
{
|
||||
QString line = file.readLine().trimmed();
|
||||
|
|
@ -68,6 +70,9 @@ RockboxInfo::RockboxInfo(QString mountpoint, QString fname)
|
|||
else if(memory.indexIn(line) >= 0) {
|
||||
m_ram = memory.cap(1).toInt();
|
||||
}
|
||||
else if(voicefmt.indexIn(line) >= 0) {
|
||||
m_voicefmt = voicefmt.cap(1).toInt();
|
||||
}
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue