Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
f99d9f30
Commit
f99d9f30
authored
Jun 16, 2010
by
Alexandre Savard
Browse files
[#3544] Update pulseaudio stream parameters
parent
d548c620
Changes
1
Show whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/pulseaudio/audiostream.cpp
View file @
f99d9f30
...
...
@@ -213,9 +213,10 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
if
(
_streamType
==
PLAYBACK_STREAM
)
{
attributes
->
maxlength
=
(
uint32_t
)
-
1
;
attributes
->
tlength
=
pa_usec_to_bytes
(
5
0
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
maxlength
=
pa_usec_to_bytes
(
80
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
//
-1;
attributes
->
tlength
=
pa_usec_to_bytes
(
4
0
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
prebuf
=
0
;
attributes
->
fragsize
=
pa_usec_to_bytes
(
20
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
minreq
=
(
uint32_t
)
-
1
;
pa_threaded_mainloop_lock
(
_mainloop
);
...
...
@@ -230,10 +231,11 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
}
else
if
(
_streamType
==
CAPTURE_STREAM
)
{
attributes
->
maxlength
=
(
uint32_t
)
-
1
;
attributes
->
tlength
=
pa_usec_to_bytes
(
5
0
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
maxlength
=
pa_usec_to_bytes
(
80
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
//
(uint32_t) -1;
attributes
->
tlength
=
pa_usec_to_bytes
(
40
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
// pa_usec_to_bytes (2
0 * PA_USEC_PER_MSEC, &_sample_spec);
attributes
->
prebuf
=
0
;
attributes
->
fragsize
=
pa_usec_to_bytes
(
50
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
fragsize
=
pa_usec_to_bytes
(
20
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
// pa_usec_to_bytes (20 * PA_USEC_PER_MSEC, &_sample_spec);
attributes
->
minreq
=
(
uint32_t
)
-
1
;
pa_threaded_mainloop_lock
(
_mainloop
);
...
...
@@ -247,16 +249,17 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
}
else
if
(
_streamType
==
RINGTONE_STREAM
)
{
attributes
->
maxlength
=
(
uint32_t
)
-
1
;
attributes
->
tlength
=
pa_usec_to_bytes
(
5
0
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
maxlength
=
pa_usec_to_bytes
(
80
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
;
attributes
->
tlength
=
pa_usec_to_bytes
(
4
0
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
prebuf
=
0
;
attributes
->
fragsize
=
pa_usec_to_bytes
(
20
*
PA_USEC_PER_MSEC
,
&
_sample_spec
);
attributes
->
minreq
=
(
uint32_t
)
-
1
;
pa_threaded_mainloop_lock
(
_mainloop
);
if
(
deviceName
)
pa_stream_connect_playback
(
s
,
deviceName
->
c_str
(),
attributes
,
(
pa_stream_flags_t
)
(
PA_STREAM_ADJUST_LATENCY
|
PA_STREAM_AUTO_TIMING_UPDATE
),
NULL
,
NULL
);
else
pa_stream_connect_playback
(
s
,
NULL
,
attributes
,
(
pa_stream_flags_t
)
(
PA_STREAM_ADJUST_LATENCY
|
PA_STREAM_AUTO_TIMING_UPDATE
),
NULL
,
NULL
);
pa_stream_connect_playback
(
s
,
NULL
,
attributes
,
(
pa_stream_flags_t
)
(
PA_STREAM_ADJUST_LATENCY
),
NULL
,
NULL
);
pa_threaded_mainloop_unlock
(
_mainloop
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment