Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
304b693e
Commit
304b693e
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #8968: fix potential memory leak in audiorecord
parent
f692ee91
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/src/audio/audiorecord.cpp
+3
-11
3 additions, 11 deletions
daemon/src/audio/audiorecord.cpp
daemon/src/audio/audiorecord.h
+5
-6
5 additions, 6 deletions
daemon/src/audio/audiorecord.h
with
8 additions
and
17 deletions
daemon/src/audio/audiorecord.cpp
+
3
−
11
View file @
304b693e
...
...
@@ -57,24 +57,16 @@ AudioRecord::AudioRecord() : fileHandle_(NULL)
,
sndSmplRate_
(
8000
)
,
nbSamplesMic_
(
0
)
,
nbSamplesSpk_
(
0
)
,
nbSamplesMax_
(
3000
)
,
recordingEnabled_
(
false
)
,
mixBuffer_
(
new
SFLDataFormat
[
nbSamplesMax_
]
)
,
micBuffer_
(
new
SFLDataFormat
[
nbSamplesMax_
]
)
,
spkBuffer_
(
new
SFLDataFormat
[
nbSamplesMax_
]
)
,
mixBuffer_
()
,
micBuffer_
()
,
spkBuffer_
()
,
filename_
()
,
savePath_
()
{
createFilename
();
}
AudioRecord
::~
AudioRecord
()
{
delete
[]
mixBuffer_
;
delete
[]
micBuffer_
;
delete
[]
spkBuffer_
;
}
void
AudioRecord
::
setSndSamplingRate
(
int
smplRate
)
{
sndSmplRate_
=
smplRate
;
...
...
This diff is collapsed.
Click to expand it.
daemon/src/audio/audiorecord.h
+
5
−
6
View file @
304b693e
...
...
@@ -33,6 +33,7 @@
#include
<string>
#include
<cstdlib>
#include
<memory>
#include
"global.h"
#include
"noncopyable.h"
...
...
@@ -44,8 +45,6 @@ class AudioRecord {
AudioRecord
();
~
AudioRecord
();
void
setSndSamplingRate
(
int
smplRate
);
/**
* Get the recrding sampling rate
...
...
@@ -206,7 +205,7 @@ class AudioRecord {
/**
* Maximum number of samples
*/
int
nbSamplesMax_
;
static
const
int
NB_SAMPLES_MAX
=
3000
;
/**
* Recording flage
...
...
@@ -216,17 +215,17 @@ class AudioRecord {
/**
* Buffer used for mixing two channels
*/
SFLDataFormat
*
mixBuffer_
;
SFLDataFormat
mixBuffer_
[
NB_SAMPLES_MAX
]
;
/**
* Buffer used to copy mic info
*/
SFLDataFormat
*
micBuffer_
;
SFLDataFormat
micBuffer_
[
NB_SAMPLES_MAX
]
;
/**
* Buffer used to copy spkr info
*/
SFLDataFormat
*
spkBuffer_
;
SFLDataFormat
spkBuffer_
[
NB_SAMPLES_MAX
]
;
/**
* Filename for this recording
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment