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
0c721afd
Commit
0c721afd
authored
11 years ago
by
Alexandre Lision
Browse files
Options
Downloads
Patches
Plain Diff
* #29866: fixed deallocation of recorder
parent
9308e26d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/src/audio/opensl/opensllayer.cpp
+9
-3
9 additions, 3 deletions
daemon/src/audio/opensl/opensllayer.cpp
daemon/src/audio/opensl/opensllayer.h
+2
-2
2 additions, 2 deletions
daemon/src/audio/opensl/opensllayer.h
with
11 additions
and
5 deletions
daemon/src/audio/opensl/opensllayer.cpp
+
9
−
3
View file @
0c721afd
...
@@ -147,8 +147,8 @@ OpenSLLayer::OpenSLLayer()
...
@@ -147,8 +147,8 @@ OpenSLLayer::OpenSLLayer()
,
recorderBufferQueue_
(
0
)
,
recorderBufferQueue_
(
0
)
,
playbackBufferIndex_
(
0
)
,
playbackBufferIndex_
(
0
)
,
recordBufferIndex_
(
0
)
,
recordBufferIndex_
(
0
)
,
playbackBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
3000
))
,
playbackBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
BUFFER_SIZE
))
,
recordBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
3000
))
,
recordBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
BUFFER_SIZE
))
{
{
}
}
...
@@ -257,9 +257,15 @@ OpenSLLayer::shutdownAudioEngine()
...
@@ -257,9 +257,15 @@ OpenSLLayer::shutdownAudioEngine()
outputMixer_
=
NULL
;
outputMixer_
=
NULL
;
}
}
if
(
recorderObject_
!=
NULL
){
(
*
recorderObject_
)
->
Destroy
(
recorderObject_
);
recorderObject_
=
NULL
;
recorderInterface_
=
NULL
;
recorderBufferQueue_
=
NULL
;
}
// destroy engine object, and invalidate all associated interfaces
// destroy engine object, and invalidate all associated interfaces
DEBUG
(
"Shutdown audio engine
\n
"
);
DEBUG
(
"Shutdown audio engine
\n
"
);
if
(
engineObject_
!=
NULL
)
{
if
(
engineObject_
!=
NULL
)
{
(
*
engineObject_
)
->
Destroy
(
engineObject_
);
(
*
engineObject_
)
->
Destroy
(
engineObject_
);
engineObject_
=
NULL
;
engineObject_
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
daemon/src/audio/opensl/opensllayer.h
+
2
−
2
View file @
0c721afd
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include
<vector>
#include
<vector>
#include
"../audiolayer.h"
#include
"../audiolayer.h"
#include
"logger.h"
enum
PCMType
{
enum
PCMType
{
...
@@ -52,6 +53,7 @@ class AudioPreference;
...
@@ -52,6 +53,7 @@ class AudioPreference;
class
OpenSLThread
;
class
OpenSLThread
;
#define ANDROID_BUFFER_QUEUE_LENGTH 2
#define ANDROID_BUFFER_QUEUE_LENGTH 2
#define BUFFER_SIZE 5000
/**
/**
...
@@ -238,9 +240,7 @@ class OpenSLLayer : public AudioLayer {
...
@@ -238,9 +240,7 @@ class OpenSLLayer : public AudioLayer {
* Output mix interface
* Output mix interface
*/
*/
SLObjectItf
outputMixer_
;
SLObjectItf
outputMixer_
;
SLObjectItf
playerObject_
;
SLObjectItf
playerObject_
;
SLObjectItf
recorderObject_
;
SLObjectItf
recorderObject_
;
/**
/**
...
...
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