arduino-audio-tools
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
f
g
i
m
p
r
s
t
u
v
w
Functions
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
i
l
m
n
p
r
s
t
u
v
w
x
y
Enumerations
Related Symbols
Files
File List
File Members
All
Functions
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Friends
Modules
Pages
Loading...
Searching...
No Matches
src
AudioTools
Concurrency
LockGuard.h
1
#pragma once
2
#include "AudioToolsConfig.h"
3
#include "Mutex.h"
4
5
namespace
audio_tools
{
6
17
class
LockGuard
{
18
public
:
19
LockGuard
(
MutexBase
&mutex) {
20
p_mutex = &mutex;
21
p_mutex->lock();
22
}
23
24
LockGuard
(
MutexBase
*mutex) {
25
p_mutex = mutex;
26
if
(p_mutex !=
nullptr
) p_mutex->lock();
27
}
28
29
~LockGuard
() {
30
if
(p_mutex !=
nullptr
) p_mutex->unlock();
31
}
32
33
protected
:
34
MutexBase
*p_mutex =
nullptr
;
35
};
17
class
LockGuard
{
…
};
36
37
}
// namespace audio_tools
audio_tools::LockGuard
RAII implementaion using a Mutex: Only a few microcontrollers provide lock guards,...
Definition
LockGuard.h:17
audio_tools::MutexBase
Empty Mutex implementation which does nothing.
Definition
Mutex.h:18
audio_tools
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition
AudioCodecsBase.h:10
Generated by
1.9.8