Skip to content
GitLab
Explore
Sign in
Register
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
10dadd02
Commit
10dadd02
authored
17 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
Change to static variables
parent
35a4aa42
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
src/audio/pulselayer.cpp
+11
-7
11 additions, 7 deletions
src/audio/pulselayer.cpp
src/audio/pulselayer.h
+2
-2
2 additions, 2 deletions
src/audio/pulselayer.h
with
13 additions
and
9 deletions
src/audio/pulselayer.cpp
+
11
−
7
View file @
10dadd02
...
@@ -20,14 +20,14 @@
...
@@ -20,14 +20,14 @@
#include
"pulselayer.h"
#include
"pulselayer.h"
static
pa_context
*
context
=
NULL
;
static
pa_context
*
context
=
NULL
;
static
pa_stream
*
playback
=
NULL
;
static
pa_stream
*
record
=
NULL
;
static
pa_mainloop_api
*
mainloop_api
=
NULL
;
static
pa_mainloop_api
*
mainloop_api
=
NULL
;
static
pa_sample_spec
sample_spec
;
static
pa_sample_spec
sample_spec
;
static
pa_channel_map
channel_map
;
static
pa_channel_map
channel_map
;
PulseLayer
::
PulseLayer
(
ManagerImpl
*
manager
)
PulseLayer
::
PulseLayer
(
ManagerImpl
*
manager
)
:
AudioLayer
(
manager
,
PULSEAUDIO
)
:
AudioLayer
(
manager
,
PULSEAUDIO
)
,
playback
(
NULL
)
,
record
(
NULL
)
{
{
_debug
(
"Pulse audio constructor: Create context
\n
"
);
_debug
(
"Pulse audio constructor: Create context
\n
"
);
create_context
();
create_context
();
...
@@ -79,6 +79,10 @@ void
...
@@ -79,6 +79,10 @@ void
PulseLayer
::
context_state_callback
(
pa_context
*
c
,
void
*
user_data
)
PulseLayer
::
context_state_callback
(
pa_context
*
c
,
void
*
user_data
)
{
{
_debug
(
"The state of the context changed
\n
"
);
_debug
(
"The state of the context changed
\n
"
);
sample_spec
.
format
=
PA_SAMPLE_S16LE
;
sample_spec
.
channels
=
1
;
channel_map
.
channels
=
1
;
pa_stream_flags_t
flag
=
PA_STREAM_START_CORKED
;
assert
(
c
);
assert
(
c
);
switch
(
pa_context_get_state
(
c
)){
switch
(
pa_context_get_state
(
c
)){
case
PA_CONTEXT_CONNECTING
:
case
PA_CONTEXT_CONNECTING
:
...
@@ -121,11 +125,11 @@ PulseLayer::openDevice(int indexIn, int indexOut, int sampleRate, int frameSize
...
@@ -121,11 +125,11 @@ PulseLayer::openDevice(int indexIn, int indexOut, int sampleRate, int frameSize
_sampleRate
=
sampleRate
;
_sampleRate
=
sampleRate
;
_frameSize
=
frameSize
;
_frameSize
=
frameSize
;
sample_spec
.
rate
=
sampleRate
;
//
sample_spec.rate = sampleRate;
sample_spec
.
format
=
PA_SAMPLE_S16LE
;
//
sample_spec.format = PA_SAMPLE_S16LE;
sample_spec
.
channels
=
1
;
//
sample_spec.channels = 1;
channel_map
.
channels
=
1
;
//
channel_map.channels = 1;
pa_stream_flags_t
flag
=
PA_STREAM_START_CORKED
;
//
pa_stream_flags_t flag = PA_STREAM_START_CORKED ;
_debug
(
" Setting PulseLayer: device in=%2d, out=%2d
\n
"
,
indexIn
,
indexOut
);
_debug
(
" Setting PulseLayer: device in=%2d, out=%2d
\n
"
,
indexIn
,
indexOut
);
_debug
(
" : nb channel in=%2d, out=%2d
\n
"
,
_inChannel
,
_outChannel
);
_debug
(
" : nb channel in=%2d, out=%2d
\n
"
,
_inChannel
,
_outChannel
);
...
...
This diff is collapsed.
Click to expand it.
src/audio/pulselayer.h
+
2
−
2
View file @
10dadd02
...
@@ -130,8 +130,8 @@ class PulseLayer : public AudioLayer {
...
@@ -130,8 +130,8 @@ class PulseLayer : public AudioLayer {
void
create_context
(
void
);
void
create_context
(
void
);
pa_stream
*
playback
;
//
pa_stream* playback;
pa_stream
*
record
;
//
pa_stream* record;
};
};
...
...
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