This website works better with JavaScript.
Home
Help
Sign In
jackaudio
/
jack2
mirror of
https://github.com/jackaudio/jack2
Watch
1
Star
0
Fork
0
Code
Releases
45
Activity
Browse Source
wait for zalsa thread to finish
Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.9.19
falkTX
4 years ago
parent
852ba2b8eb
commit
1b3594e70f
Signed by:
falkTX
<falktx@falktx.com>
GPG Key ID:
CDBAA37ABC74FBA0
3 changed files
with
19 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-1
tools/zalsa/alsathread.cc
+9
-0
tools/zalsa/pxthread.cc
+1
-0
tools/zalsa/pxthread.h
+ 9
- 1
tools/zalsa/alsathread.cc
View File
@@ -45,7 +45,15 @@ Alsathread::Alsathread (Alsa_pcmi *alsadev, int mode) :
Alsathread::~Alsathread (void)
{
_alsadev->pcm_stop ();
if (_state != INIT)
{
_state = TERM;
thr_wait ();
}
else
{
_alsadev->pcm_stop ();
}
}
+ 9
- 0
tools/zalsa/pxthread.cc
View File
@@ -76,3 +76,12 @@ void Pxthread::thr_main (void)
{
}
void Pxthread::thr_wait (void)
{
if (_thrid == 0)
return;
pthread_join (_thrid, NULL);
_thrid = 0;
}
+ 1
- 0
tools/zalsa/pxthread.h
View File
@@ -42,6 +42,7 @@ public:
virtual void thr_main (void) = 0;
virtual int thr_start (int policy, int priority, size_t stacksize = 0);
virtual void thr_wait (void);
private:
Write
Preview
Loading…
Cancel
Save