| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reviewed-by: Trust Me
(cherry picked from commit ac5c099cc3c5b8c7eec7a49fdeb8a21037230350)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change required a significant refactoring of the application,
including:
* Re-write WavFile class so that it inherits from QFile rather
than taking a QIODevice as an argument to its method calls.
* Modified Engine class so that its internal QByteArray buffer
(m_buffer) need not correspond to the entire clip. This was done
by introducing the m_bufferPosition variable, which indicates the
offset from the start of the clip to the start of the region of
the clip which is currently held in memory. For tone generation
and record/playback modes, the buffer does still map directly to
the whole clip, so m_bufferPosition is always zero. For file
playback, the WavFile instance is the QIODevice which is passed
to QAudioOutput; m_buffer is just the part of the file which is
currently in memory for spectrum analysis, level calculation and
waveform rendering.
* For file playback, introduced a second WavFile instance as a
member of the Engine class. This is because QFile::seek() is
called in order to read the part of the file currently required
for analysis. If the QAudioOutput implementation passes its
QIODevice across a thread boundary, this seeking causes playback
to jump around within the file rather than progressing smoothly
forward.
* Modified the audioLength utility function so that its return
value is always a multiple of the sample size.
In the process of making the above changes, a few other minor
modifications were made:
* Modify all internal APIs concerned with buffer offsets and lengths
to deal in bytes. Previously, some calls passed values in
microseconds and others in bytes, which was confusing.
* Remove write functionality from WavFile class, since it is not
used in this application.
Task-number: QTBUG-12936
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch ensures that the state of the application is not reset when:
- Any of the 'Play generated tone', 'Play file' or settings
dialogs are opened
- Any of the 'Play generated tone', 'Play file' or settings
dialogs are dismissed by pressing the Cancel button
- A new input or output device is selected via the settings
dialog, and that new device supports the data format which
is currently being used within the application
- The window function is changed via the settings dialog
Note that the application is still reset if a new input or output
device is selected via the settings dialog, and this device does not
support the current data format.
Task-number: QTBUG-12935
Task-number: QTBUG-14810
|
|
|
|
|
| |
Reviewed-by: Jason McDonald
Task-number: QTBUG-10887
|
|
This application is a demo which uses the QtMultimedia APIs to
capture and play back PCM audio. While either recording or playback
is ongoing, the application performs real-time level and frequency
spectrum analysis.
Reviewed-by: Alessandro Portale
|