Mercurial > hg > svapp
comparison audio/AudioRecordTarget.cpp @ 480:1d4cb8befcfd recording
New filename for each audio recording
author | Chris Cannam |
---|---|
date | Wed, 19 Aug 2015 17:21:40 +0100 |
parents | 411e019474e5 |
children | 493f2af85497 |
comparison
equal
deleted
inserted
replaced
479:6f475df6f833 | 480:1d4cb8befcfd |
---|---|
95 return 0; | 95 return 0; |
96 } else { | 96 } else { |
97 recordedDir = parent.filePath(subdirname); | 97 recordedDir = parent.filePath(subdirname); |
98 } | 98 } |
99 | 99 |
100 //!!! todo proper temp name as in TempDirectory | 100 QDateTime now = QDateTime::currentDateTime(); |
101 | 101 |
102 QString filename = "recorded.wav"; //!!! | 102 // Don't use QDateTime::toString(Qt::ISODate) as the ":" character |
103 // isn't permitted in filenames on Windows | |
104 QString filename = QString("recorded-%1.wav") | |
105 .arg(now.toString("yyyyMMdd-HHmmss-zzz")); | |
103 | 106 |
104 m_audioFileName = recordedDir.filePath(filename); | 107 m_audioFileName = recordedDir.filePath(filename); |
105 | 108 |
106 m_model = new WritableWaveFileModel(m_recordSampleRate, 2, m_audioFileName); | 109 m_model = new WritableWaveFileModel(m_recordSampleRate, 2, m_audioFileName); |
107 | 110 |