@@ -39,8 +39,8 Widget::Widget(QWidget *parent) | |||||
39 | setLayout(mainLayout); |
|
39 | setLayout(mainLayout); | |
40 |
|
40 | |||
41 | QAudioFormat formatAudio; |
|
41 | QAudioFormat formatAudio; | |
42 |
formatAudio.set |
|
42 | formatAudio.setSampleRate(8000); | |
43 |
formatAudio.setChannel |
|
43 | formatAudio.setChannelCount(1); | |
44 | formatAudio.setSampleSize(8); |
|
44 | formatAudio.setSampleSize(8); | |
45 | formatAudio.setCodec("audio/pcm"); |
|
45 | formatAudio.setCodec("audio/pcm"); | |
46 | formatAudio.setByteOrder(QAudioFormat::LittleEndian); |
|
46 | formatAudio.setByteOrder(QAudioFormat::LittleEndian); |
@@ -13,13 +13,13 Widget::Widget(QWidget *parent) | |||||
13 | // Create a list of executables |
|
13 | // Create a list of executables | |
14 | QList<QFileInfo> appList; |
|
14 | QList<QFileInfo> appList; | |
15 | m_appFolder = QDir(QApplication::applicationDirPath()); |
|
15 | m_appFolder = QDir(QApplication::applicationDirPath()); | |
16 |
#ifdef Q_ |
|
16 | #ifdef Q_OS_MAC | |
17 | // The executable is inside an application bundle (a folder) on OSX |
|
17 | // The executable is inside an application bundle (a folder) on OSX | |
18 | m_appFolder.cdUp(); |
|
18 | m_appFolder.cdUp(); | |
19 | m_appFolder.cdUp(); |
|
19 | m_appFolder.cdUp(); | |
20 | m_appFolder.cdUp(); |
|
20 | m_appFolder.cdUp(); | |
21 | appList = m_appFolder.entryInfoList(QStringList("*.app"), QDir::Executable | QDir::Dirs | QDir::NoDotAndDotDot); |
|
21 | appList = m_appFolder.entryInfoList(QStringList("*.app"), QDir::Executable | QDir::Dirs | QDir::NoDotAndDotDot); | |
22 |
#elif defined(Q_ |
|
22 | #elif defined(Q_OS_WIN) | |
23 | appList = m_appFolder.entryInfoList(QStringList("*.exe"), QDir::Executable | QDir::Files | QDir::NoDotAndDotDot); |
|
23 | appList = m_appFolder.entryInfoList(QStringList("*.exe"), QDir::Executable | QDir::Files | QDir::NoDotAndDotDot); | |
24 | #else |
|
24 | #else | |
25 | appList = m_appFolder.entryInfoList(QDir::Executable | QDir::Files | QDir::NoDotAndDotDot); |
|
25 | appList = m_appFolder.entryInfoList(QDir::Executable | QDir::Files | QDir::NoDotAndDotDot); |
General Comments 0
You need to be logged in to leave comments.
Login now