mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +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
|
||||
|
||||
Reference in New Issue
Block a user