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
15950eb1
Commit
15950eb1
authored
Jan 27, 2013
by
Stephane Letz
Browse files
Rework XRun handling.
parent
ddb61e60
Changes
7
Hide whitespace changes
Inline
Side-by-side
common/JackDriver.cpp
View file @
15950eb1
...
...
@@ -265,7 +265,8 @@ JackClientControl* JackDriver::GetClientControl() const
void
JackDriver
::
NotifyXRun
(
jack_time_t
cur_cycle_begin
,
float
delayed_usecs
)
{
fEngine
->
NotifyXRun
(
cur_cycle_begin
,
delayed_usecs
);
fEngineControl
->
NotifyXRun
(
cur_cycle_begin
,
delayed_usecs
);
fEngine
->
NotifyDriverXRun
();
}
void
JackDriver
::
NotifyBufferSize
(
jack_nframes_t
buffer_size
)
...
...
common/JackEngine.cpp
View file @
15950eb1
...
...
@@ -334,14 +334,13 @@ void JackEngine::NotifyRemoveClient(const char* name, int refnum)
}
// Coming from the driver
void
JackEngine
::
Notify
XRun
(
jack_time_t
callback_usecs
,
float
delayed_usecs
)
void
JackEngine
::
Notify
DriverXRun
(
)
{
// Use the audio thread => request thread communication channel
fEngineControl
->
NotifyXRun
(
callback_usecs
,
delayed_usecs
);
fChannel
.
Notify
(
ALL_CLIENTS
,
kXRunCallback
,
0
);
}
void
JackEngine
::
NotifyXRun
(
int
refnum
)
void
JackEngine
::
Notify
Client
XRun
(
int
refnum
)
{
if
(
refnum
==
ALL_CLIENTS
)
{
NotifyClients
(
kXRunCallback
,
false
,
""
,
0
,
0
);
...
...
common/JackEngine.h
View file @
15950eb1
...
...
@@ -142,9 +142,9 @@ class SERVER_EXPORT JackEngine : public JackLockAble
bool
Process
(
jack_time_t
cur_cycle_begin
,
jack_time_t
prev_cycle_end
);
// Notifications
void
NotifyXRun
(
jack_time_t
callback_usecs
,
float
delayed_usecs
);
void
NotifyDriverXRun
();
void
NotifyClientXRun
(
int
refnum
);
void
NotifyFailure
(
int
code
,
const
char
*
reason
);
void
NotifyXRun
(
int
refnum
);
void
NotifyGraphReorder
();
void
NotifyBufferSize
(
jack_nframes_t
buffer_size
);
void
NotifySampleRate
(
jack_nframes_t
sample_rate
);
...
...
common/JackError.cpp
View file @
15950eb1
...
...
@@ -59,12 +59,13 @@ void jack_log_function(int level, const char *message)
static
void
jack_format_and_log
(
int
level
,
const
char
*
prefix
,
const
char
*
fmt
,
va_list
ap
)
{
char
buffer
[
300
];
char
buffer
[
256
];
size_t
len
;
jack_log_function_t
log_function
;
if
(
prefix
!=
NULL
)
{
len
=
strlen
(
prefix
);
assert
(
len
<
256
);
memcpy
(
buffer
,
prefix
,
len
);
}
else
{
len
=
0
;
...
...
common/JackLockedEngine.h
View file @
15950eb1
...
...
@@ -258,16 +258,18 @@ class SERVER_EXPORT JackLockedEngine
}
// Notifications
void
Notify
XRun
(
jack_time_t
cur_cycle_begin
,
float
delayed_usecs
)
void
Notify
DriverXRun
(
)
{
// RT : no lock
fEngine
.
Notify
XRun
(
cur_cycle_begin
,
delayed_usecs
);
//
Coming from the driver in
RT : no lock
fEngine
.
Notify
DriverXRun
(
);
}
void
NotifyXRun
(
int
refnum
)
void
Notify
Client
XRun
(
int
refnum
)
{
// RT : no lock
fEngine
.
NotifyXRun
(
refnum
);
TRY_CALL
JackLock
lock
(
&
fEngine
);
fEngine
.
NotifyClientXRun
(
refnum
);
CATCH_EXCEPTION
}
void
NotifyGraphReorder
()
...
...
common/JackNetManager.cpp
View file @
15950eb1
...
...
@@ -513,7 +513,7 @@ namespace Jack
return
res
;
}
else
if
(
res
==
NET_PACKET_ERROR
)
{
// Well not a real XRun...
JackServerGlobals
::
fInstance
->
GetEngine
()
->
Notify
XRun
(
GetMicroSeconds
(),
0
);
JackServerGlobals
::
fInstance
->
GetEngine
()
->
Notify
ClientXRun
(
ALL_CLIENTS
);
}
#ifdef JACK_MONITOR
...
...
common/JackServer.cpp
View file @
15950eb1
...
...
@@ -305,7 +305,7 @@ void JackServer::Notify(int refnum, int notify, int value)
break
;
case
kXRunCallback
:
fEngine
->
NotifyXRun
(
refnum
);
fEngine
->
Notify
Client
XRun
(
refnum
);
break
;
}
}
...
...
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