mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #144 , improved file deleter , no dependency of QObject anymore, now using single deleter object
This commit is contained in:
@@ -19,7 +19,6 @@ using namespace BlackMisc::Voice;
|
||||
namespace BlackSound
|
||||
{
|
||||
QDateTime CSoundGenerator::s_selcalStarted = QDateTime::currentDateTimeUtc();
|
||||
BlackMisc::CFileDeleter CSoundGenerator::s_fileDeleter = BlackMisc::CFileDeleter();
|
||||
|
||||
CSoundGenerator::CSoundGenerator(const QAudioDeviceInfo &device, const QAudioFormat &format, const QList<Tone> &tones, PlayMode mode, QObject *parent)
|
||||
: QIODevice(parent),
|
||||
@@ -459,6 +458,6 @@ namespace BlackSound
|
||||
mediaPlayer->setVolume(volume); // 0-100
|
||||
mediaPlayer->play();
|
||||
// I cannot delete the file here, only after it has been played
|
||||
if (removeFileAfterPlaying) CSoundGenerator::s_fileDeleter.addFileForDeletion(file);
|
||||
if (removeFileAfterPlaying) BlackMisc::CFileDeleter::addFileForDeletion(file);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -290,7 +290,6 @@ namespace BlackSound
|
||||
QIODevice *m_pushModeIODevice; /*!< IO device when used in push mode */
|
||||
QThread *m_ownThread;
|
||||
static QDateTime s_selcalStarted;
|
||||
static BlackMisc::CFileDeleter s_fileDeleter;
|
||||
|
||||
//! \brief Header for saving .wav files
|
||||
struct chunk
|
||||
|
||||
Reference in New Issue
Block a user