Skip to content

Commit 5b4013a

Browse files
committed
Release 1.0.26
* Added support of audio send and audio return by the engine. * Implemented AudioNavigator controller. * Implemented AuidoFolder controller. * Fixed port group value synchronization for JACK wrapper. * Added documentation_path parameter in user configuration file which allows to configure the path to the offline documentation installation. * Updated module versions in dependencies.
2 parents 447b8e1 + c4853c9 commit 5b4013a

File tree

124 files changed

+8374
-1568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+8374
-1568
lines changed

CHANGELOG

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.26 ===
6+
* Added support of audio send and audio return by the engine.
7+
* Implemented AudioNavigator controller.
8+
* Implemented AuidoFolder controller.
9+
* Fixed port group value synchronization for JACK wrapper.
10+
* Added documentation_path parameter in user configuration file which allows to
11+
configure the path to the offline documentation installation.
12+
* Updated module versions in dependencies.
13+
514
=== 1.0.25 ===
615
* Better work with plugin window size.
716
* Plugins now can be built without the ui if we omit the 'ui' feature in

include/lsp-plug.in/plug-fw/const.h

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#define TEMP_ABS_ZERO LSP_DSP_UNITS_TEMP_ABS_ZERO
3434
#define SPEC_FREQ_MIN LSP_DSP_UNITS_SPEC_FREQ_MIN
3535
#define SPEC_FREQ_MAX LSP_DSP_UNITS_SPEC_FREQ_MAX
36+
#define MAX_SHM_SEGMENT_NAME_BYTES 0x40
37+
#define MAX_SHM_SEGMENT_NAME_CHARS 0x20
3638

3739
// Other constants
3840
#define MAX_SAMPLE_RATE 384000 /* Maximum supported sample rate [samples / s] */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/*
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
4+
*
5+
* This file is part of lsp-plugin-fw
6+
* Created on: 26 авг. 2024 г.
7+
*
8+
* lsp-plugin-fw is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-plugin-fw is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-plugin-fw. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_PLUG_FW_CORE_AUDIOBUFFER_H_
23+
#define LSP_PLUG_IN_PLUG_FW_CORE_AUDIOBUFFER_H_
24+
25+
#include <lsp-plug.in/plug-fw/version.h>
26+
27+
#include <lsp-plug.in/common/alloc.h>
28+
#include <lsp-plug.in/common/types.h>
29+
#include <lsp-plug.in/dsp/dsp.h>
30+
31+
namespace lsp
32+
{
33+
namespace core
34+
{
35+
/**
36+
* Audio buffer, simple data structure that contains some audio data.
37+
*/
38+
class AudioBuffer
39+
{
40+
private:
41+
uint32_t nBufSize; // Size of sanitized buffer in samples
42+
uint32_t nOffset; // Offset from the beginning of the buffer
43+
bool bActive; // Activity flag
44+
bool bClean; // Port is clean
45+
float *pBuffer; // Buffer data
46+
47+
private:
48+
void set_clean_state(bool clean);
49+
50+
public:
51+
explicit AudioBuffer()
52+
{
53+
nBufSize = 0;
54+
nOffset = 0;
55+
bActive = false;
56+
bClean = false;
57+
pBuffer = NULL;
58+
}
59+
60+
AudioBuffer(const AudioBuffer &) = delete;
61+
AudioBuffer(AudioBuffer &&) = delete;
62+
63+
~AudioBuffer()
64+
{
65+
if (pBuffer != NULL)
66+
{
67+
nBufSize = 0;
68+
free(pBuffer);
69+
}
70+
bActive = false;
71+
};
72+
73+
AudioBuffer & operator = (const AudioBuffer &) = delete;
74+
AudioBuffer & operator = (AudioBuffer &&) = delete;
75+
76+
public:
77+
/**
78+
* Get pointer to the beginning of the buffer
79+
* @return pointer to the beginning of the buffer
80+
*/
81+
inline float *data()
82+
{
83+
return pBuffer;
84+
}
85+
86+
/**
87+
* Get pointer to the buffer data respective to the offset
88+
* @return pointer to the buffer data
89+
*/
90+
inline float *buffer()
91+
{
92+
return (pBuffer != NULL) ? &pBuffer[nOffset] : NULL;
93+
}
94+
95+
/**
96+
* Check that buffer is marked as clean and contains zeros
97+
* @return true if buffer is marked as clean and contains zeros
98+
*/
99+
inline bool is_clean() const
100+
{
101+
return bClean;
102+
}
103+
104+
/**
105+
* Mark buffer as being clean
106+
*/
107+
inline void set_clean()
108+
{
109+
set_clean_state(true);
110+
}
111+
112+
/**
113+
* Mark buffer as being not clean
114+
*/
115+
inline void set_dirty()
116+
{
117+
set_clean_state(false);
118+
}
119+
120+
/**
121+
* Check if buffer is active
122+
* @return true if buffer is active
123+
*/
124+
inline bool active() const
125+
{
126+
return bActive;
127+
}
128+
129+
/**
130+
* Set activity of the buffer
131+
* @param active activity of the buffer
132+
*/
133+
inline void set_active(bool active)
134+
{
135+
bActive = active;
136+
}
137+
138+
/**
139+
* Get actual buffer size
140+
* @return actual buffer size
141+
*/
142+
inline size_t size() const
143+
{
144+
return nBufSize;
145+
}
146+
147+
/**
148+
* Set buffer size
149+
* @param size buffer size
150+
*/
151+
void set_size(size_t size);
152+
153+
/**
154+
* Get current offset
155+
* @return current offset
156+
*/
157+
inline size_t offset() const
158+
{
159+
return nOffset;
160+
}
161+
162+
/**
163+
* Set current offset
164+
* @param offset current offset
165+
*/
166+
inline void set_offset(size_t offset)
167+
{
168+
nOffset = offset;
169+
}
170+
};
171+
} /* namespace core */
172+
} /* namespace lsp */
173+
174+
#endif /* LSP_PLUG_IN_PLUG_FW_CORE_AUDIOBUFFER_H_ */

include/lsp-plug.in/plug-fw/core/AudioReturn.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ namespace lsp
6969
AudioReturn *pReturn;
7070

7171
public:
72-
Client(AudioReturn *rtrn);
72+
explicit Client(AudioReturn *rtrn);
7373
virtual ~Client() override;
7474

7575
public:
@@ -78,6 +78,7 @@ namespace lsp
7878
public: // core::ICatalogClient
7979
virtual bool update(dspu::Catalog * catalog) override;
8080
virtual bool apply(dspu::Catalog * catalog) override;
81+
virtual void keep_alive(dspu::Catalog *catalog) override;
8182
};
8283

8384

@@ -101,6 +102,7 @@ namespace lsp
101102
private:
102103
bool update(dspu::Catalog *catalog);
103104
bool apply(dspu::Catalog *catalog);
105+
void keep_alive(dspu::Catalog *catalog);
104106

105107
public:
106108
AudioReturn();

include/lsp-plug.in/plug-fw/core/AudioSend.h

+16-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ namespace lsp
4343
ST_INACTIVE, // Inactive, no I/O is performing
4444
ST_UPDATING, // The update is in progress
4545
ST_ACTIVE, // The send is active and available for transferring data
46+
ST_OVERRIDDEN, // The send has been overridden by another one
4647
};
4748

4849
typedef dspu::Catalog::Record Record;
@@ -68,7 +69,7 @@ namespace lsp
6869
AudioSend *pSend;
6970

7071
public:
71-
Client(AudioSend *send);
72+
explicit Client(AudioSend *send);
7273
virtual ~Client() override;
7374

7475
public:
@@ -77,6 +78,7 @@ namespace lsp
7778
public: // core::ICatalogClient
7879
virtual bool update(dspu::Catalog * catalog) override;
7980
virtual bool apply(dspu::Catalog * catalog) override;
81+
virtual void keep_alive(dspu::Catalog *catalog) override;
8082
};
8183

8284

@@ -99,6 +101,7 @@ namespace lsp
99101
private:
100102
bool update(dspu::Catalog *catalog);
101103
bool apply(dspu::Catalog *catalog);
104+
void keep_alive(dspu::Catalog *catalog);
102105

103106
public:
104107
AudioSend();
@@ -151,6 +154,18 @@ namespace lsp
151154
*/
152155
bool active() const;
153156

157+
/**
158+
* Check that send has been overridden, RT safe
159+
* @return true if send has been overridden by another send
160+
*/
161+
bool overridden() const;
162+
163+
/**
164+
* Transfers the send from overridden state to inactive state
165+
* @return true if state has been changed successfully
166+
*/
167+
bool deactivate();
168+
154169
/**
155170
* Get name of the stream, RT safe
156171
* @return name of the stream or NULL if send is inactive

include/lsp-plug.in/plug-fw/core/Catalog.h

+2
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ namespace lsp
5353
lltl::parray<ICatalogClient> vClients;
5454

5555
protected:
56+
bool open_catalog();
5657
status_t attach_client(ICatalogClient *client);
5758
status_t detach_client(ICatalogClient *client);
5859
bool process_events();
5960
void sync_catalog();
6061
size_t process_apply();
6162
size_t process_update();
63+
void process_keep_alive();
6264

6365
public:
6466
explicit Catalog();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
4+
*
5+
* This file is part of lsp-plugin-fw
6+
* Created on: 7 авг. 2024 г.
7+
*
8+
* lsp-plugin-fw is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-plugin-fw is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-plugin-fw. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_PLUG_FW_CORE_CATALOGMANAGER_H_
23+
#define LSP_PLUG_IN_PLUG_FW_CORE_CATALOGMANAGER_H_
24+
25+
#include <lsp-plug.in/plug-fw/version.h>
26+
27+
#include <lsp-plug.in/ipc/Mutex.h>
28+
#include <lsp-plug.in/ipc/Thread.h>
29+
#include <lsp-plug.in/plug-fw/core/Catalog.h>
30+
31+
namespace lsp
32+
{
33+
namespace core
34+
{
35+
36+
class CatalogManager
37+
{
38+
private:
39+
core::Catalog *pCatalog; // Catalog
40+
size_t nCatalogRefs; // Number of catalog references
41+
ipc::Mutex sCatalogMutex; // Catalog mutex
42+
43+
protected:
44+
void destroy_catalog();
45+
46+
public:
47+
CatalogManager();
48+
CatalogManager(const CatalogManager &) = delete;
49+
CatalogManager(CatalogManager &&) = delete;
50+
~CatalogManager();
51+
52+
CatalogManager & operator = (const CatalogManager &) = delete;
53+
CatalogManager & operator = (CatalogManager &&) = delete;
54+
55+
public:
56+
core::Catalog *acquire();
57+
void release(core::Catalog *catalog);
58+
};
59+
60+
} /* namespace core */
61+
} /* namespace lsp */
62+
63+
#endif /* LSP_PLUG_IN_PLUG_FW_CORE_CATALOGMANAGER_H_ */

include/lsp-plug.in/plug-fw/core/ICatalogClient.h

+6
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ namespace lsp
115115
* @return true if apply has successfully passed, false if apply call should be retried after a while
116116
*/
117117
virtual bool apply(dspu::Catalog * catalog);
118+
119+
/**
120+
* Make possible to client to mark some records still being used in catalog
121+
* @param catalog the catalog that can be modified
122+
*/
123+
virtual void keep_alive(dspu::Catalog *catalog);
118124
};
119125

120126
} /* namespace core */

0 commit comments

Comments
 (0)