mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 21:06:32 +02:00
fixed crash when audioscope frame size is reduced
This commit is contained in:
parent
e50bd1bed9
commit
7a8a8684d6
1 changed files with 2 additions and 2 deletions
|
@ -1236,8 +1236,6 @@ void Audio::selectAudioFilterSmiley() {
|
|||
void Audio::toggleScope() {
|
||||
_scopeEnabled = !_scopeEnabled;
|
||||
if (_scopeEnabled) {
|
||||
_scopeInputOffset = 0;
|
||||
_scopeOutputOffset = 0;
|
||||
allocateScope();
|
||||
} else {
|
||||
freeScope();
|
||||
|
@ -1275,6 +1273,8 @@ void Audio::selectAudioScopeFiftyFrames() {
|
|||
}
|
||||
|
||||
void Audio::allocateScope() {
|
||||
_scopeInputOffset = 0;
|
||||
_scopeOutputOffset = 0;
|
||||
int num = _samplesPerScope * sizeof(int16_t);
|
||||
_scopeInput = new QByteArray(num, 0);
|
||||
_scopeOutputLeft = new QByteArray(num, 0);
|
||||
|
|
Loading…
Reference in a new issue