Mercurial > hg > svapp
comparison audio/AudioRecordTarget.cpp @ 546:4de547a5905c 3.0-integration
Update for bqaudioio changes
author | Chris Cannam |
---|---|
date | Tue, 06 Dec 2016 15:59:06 +0000 |
parents | b84d9b512dbd |
children | 7b115a6505b8 |
comparison
equal
deleted
inserted
replaced
543:699db455a3e1 | 546:4de547a5905c |
---|---|
25 QString clientName) : | 25 QString clientName) : |
26 m_viewManager(manager), | 26 m_viewManager(manager), |
27 m_clientName(clientName.toUtf8().data()), | 27 m_clientName(clientName.toUtf8().data()), |
28 m_recording(false), | 28 m_recording(false), |
29 m_recordSampleRate(44100), | 29 m_recordSampleRate(44100), |
30 m_recordChannelCount(2), | |
30 m_frameCount(0), | 31 m_frameCount(0), |
31 m_model(0) | 32 m_model(0) |
32 { | 33 { |
33 } | 34 } |
34 | 35 |
49 } | 50 } |
50 | 51 |
51 void | 52 void |
52 AudioRecordTarget::setSystemRecordLatency(int) | 53 AudioRecordTarget::setSystemRecordLatency(int) |
53 { | 54 { |
55 } | |
56 | |
57 void | |
58 AudioRecordTarget::setSystemRecordChannelCount(int c) | |
59 { | |
60 m_recordChannelCount = c; | |
54 } | 61 } |
55 | 62 |
56 void | 63 void |
57 AudioRecordTarget::putSamples(int nframes, float **samples) | 64 AudioRecordTarget::putSamples(int nframes, float **samples) |
58 { | 65 { |
151 QString filename = QString("recorded-%1.wav") | 158 QString filename = QString("recorded-%1.wav") |
152 .arg(now.toString("yyyyMMdd-HHmmss-zzz")); | 159 .arg(now.toString("yyyyMMdd-HHmmss-zzz")); |
153 | 160 |
154 m_audioFileName = recordedDir.filePath(filename); | 161 m_audioFileName = recordedDir.filePath(filename); |
155 | 162 |
156 m_model = new WritableWaveFileModel(m_recordSampleRate, 2, m_audioFileName); | 163 m_model = new WritableWaveFileModel(m_recordSampleRate, |
164 m_recordChannelCount, | |
165 m_audioFileName); | |
157 | 166 |
158 if (!m_model->isOK()) { | 167 if (!m_model->isOK()) { |
159 cerr << "ERROR: AudioRecordTarget::startRecording: Recording failed" | 168 cerr << "ERROR: AudioRecordTarget::startRecording: Recording failed" |
160 << endl; | 169 << endl; |
161 //!!! and throw? | 170 //!!! and throw? |