Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TPF
jack2
Commits
2ea3a56d
Commit
2ea3a56d
authored
Jun 22, 2016
by
Xavier Mendez
Browse files
Convert between sample rates when necessary
parent
ff1ed2c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
example-clients/alsa_in.c
View file @
2ea3a56d
...
...
@@ -353,7 +353,7 @@ int process (jack_nframes_t nframes, void *arg) {
delay
=
snd_pcm_avail
(
alsa_handle
);
delay
-=
jack_frames_since_cycle_start
(
client
);
delay
-=
round
(
jack_frames_since_cycle_start
(
client
)
/
static_resample_factor
);
// Do it the hard way.
// this is for compensating xruns etc...
...
...
@@ -510,7 +510,7 @@ latency_cb (jack_latency_callback_mode_t mode, void *arg)
jack_latency_range_t
range
;
JSList
*
node
;
range
.
min
=
range
.
max
=
target_delay
;
range
.
min
=
range
.
max
=
round
(
target_delay
*
static_resample_factor
)
;
if
(
mode
==
JackCaptureLatency
)
{
for
(
node
=
capture_ports
;
node
;
node
=
jack_slist_next
(
node
))
{
...
...
example-clients/alsa_out.c
View file @
2ea3a56d
...
...
@@ -357,7 +357,7 @@ int process (jack_nframes_t nframes, void *arg) {
delay
=
(
num_periods
*
period_size
)
-
snd_pcm_avail
(
alsa_handle
)
;
delay
-=
jack_frames_since_cycle_start
(
client
);
delay
-=
round
(
jack_frames_since_cycle_start
(
client
)
*
static_resample_factor
);
// Do it the hard way.
// this is for compensating xruns etc...
...
...
@@ -513,7 +513,7 @@ latency_cb (jack_latency_callback_mode_t mode, void *arg)
jack_latency_range_t
range
;
JSList
*
node
;
range
.
min
=
range
.
max
=
target_delay
;
range
.
min
=
range
.
max
=
round
(
target_delay
/
static_resample_factor
)
;
if
(
mode
==
JackCaptureLatency
)
{
for
(
node
=
capture_ports
;
node
;
node
=
jack_slist_next
(
node
))
{
...
...
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