├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── LAUT_Logo.png
├── LICENSE
├── NOTICE
├── README.md
├── build-scripts
└── AppImageBuilder.yml
├── laut_events.py
├── laut_files_handling.py
├── laut_functions.py
├── laut_gui_templates.py
├── laut_main.py
├── laut_text.py
├── redme_images
├── LAUT devices.png
└── LAUT pipewire config.png
├── requirements.txt
├── run_laut.sh
└── styles.css
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Build AppImage
2 |
3 | run-name: Building Appimage
4 | on:
5 | push:
6 | tags:
7 | - '*'
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-22.04
12 |
13 | steps:
14 | - uses: actions/checkout@v2
15 |
16 | - name: list
17 | working-directory: ${{github.workspace}}
18 | run : ls
19 |
20 | - name: install python dependencies to project folder
21 | working-directory: ${{github.workspace}}
22 | run : python3 -m pip install --ignore-installed --prefix=/usr --root=AppDir -r ./requirements.txt
23 |
24 | - name: Build AppImage
25 | uses: AppImageCrafters/build-appimage-action@master
26 | env:
27 | UPDATE_INFO: gh-releases-zsync|cgspeck|brewtarget|latest|*x86_64.AppImage.zsync
28 | with:
29 | recipe: build-scripts/AppImageBuilder.yml
30 |
31 | - uses: actions/upload-artifact@v4
32 | with:
33 | name: LAUT
34 | path: './*.AppImage*'
35 |
36 | - uses: xresloader/upload-to-github-release@v1
37 | env:
38 | GITHUB_TOKEN: ${{ secrets.LAUT_UPLOAD_TOKEN }}
39 | with:
40 | file: './*.AppImage*'
41 | tags: true
42 | draft: false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Python Programs.code-workspace
2 | *.pyc
--------------------------------------------------------------------------------
/LAUT_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrAdrianPl/Linux_Audio_Utility_Tool/e806f0c7393bd076e07a03d6588054d1b514c812/LAUT_Logo.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Uses:
2 | Requests
3 | Copyright 2019 Kenneth Reitz
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Linux Audio Utility Tool(LAUT)
2 |
3 | ## About LAUT
4 | LAUT is a gui set of tools that will allow easy configuration of Pipewire and in future most likely also wireplumber.
5 |
6 | current version alows cofniguration of pipewire and all subservers that are avivable under it
7 |
8 | this program is in its early stages of development so please understand it may be buggy
9 |
10 | ## Instalation
11 | For standard user it will be easiest to download Appimage that is privded in the releases(https://github.com/MrAdrianPl/Linux_Audio_Utility_Tool/releases/latest)
12 |
13 | ## dependencies for development
14 | LAUT uses those 3 packages bellow and few other that are builtin python libraries
15 |
16 | ``pip install pipewire_python``
17 |
18 | ``pip install PyQt6``
19 |
20 | ``pip install requests``
21 |
22 | ## Run from source
23 | if you installed above dependency then you can simply start program using run_laut.sh.
24 |
25 | note that this program waits for few responses from pw-top so it may take few seconds to start it up.
26 |
27 | ## Visuals
28 | and here's how program looks right now
29 |
30 | configuration tab:
31 | 
32 |
33 | devices tab:
34 | 
35 |
36 | I'm trying to provide as much information in simple manner as possible so if anyone have a idea where i can improve on design to make it more user friendly then let me know
37 |
38 | ## Current version of the program allows:
39 | - Checking current devices properties
40 | - Configuration of all pipewire settings
41 |
42 | ## Roadmap of planed features
43 |
44 | ### Implemented
45 |
46 | - v0.7 Implementation of basic configurations for pipewire-pulse
47 | - v0.6 Implementation of basic configurations for pipewire-jack
48 | - v0.8 Implementation of basic configurations for clients
49 | - v0.9 Various ui/ux improvements
50 | - v0.10 Appimage version
51 |
52 | ### Main features
53 |
54 | - v0.11 Implementation of application overrides for pipewire
55 | - v0.12 Implementation of application overrides for pipewire-pulse
56 | - v0.13 Implementation of overrides for clients
57 |
58 | ### later development
59 |
60 | - v0.14 Implementation of basic wireplumber settings
61 | - v0.15 Implementation of pw-top wraper
62 | - v0.16 General setings
63 | - v0.17 Implementation of configuration presets
64 | - v0.18 Configuration for app
65 | - v0.19 rework of Devices tab
66 | - v0.20 Further beautification of app GUI, addition of themes
67 |
68 |
--------------------------------------------------------------------------------
/build-scripts/AppImageBuilder.yml:
--------------------------------------------------------------------------------
1 | version: 1
2 |
3 |
4 | script:
5 | # Make usr and icons dirs
6 | - mkdir -p AppDir/usr/src
7 | - mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
8 | # Copy the python application code into the AppDir
9 | - cp laut_main.py AppDir/usr/src -r
10 | - cp laut_events.py AppDir/usr/src -r
11 | - cp laut_gui_templates.py AppDir/usr/src -r
12 | - cp laut_files_handling.py AppDir/usr/src -r
13 | - cp laut_functions.py AppDir/usr/src -r
14 | - cp laut_text.py AppDir/usr/src -r
15 | - cp styles.css AppDir/usr/src -r
16 | - cp LAUT_Logo.png AppDir/usr/share/icons/hicolor/256x256/apps -r
17 | - apt-get update && apt-get install -y --no-install-recommends squashfs-tools
18 |
19 | AppDir:
20 | path: AppDir
21 | app_info:
22 | id: LAUT
23 | name: LAUT
24 | icon: LAUT_Logo
25 | version: V10
26 | # Set the python executable as entry point
27 | exec: usr/bin/python3
28 | # Set the application main script path as argument. Use '$@' to forward CLI parameters
29 | exec_args: "$APPDIR/usr/src/laut_main.py $@"
30 |
31 | apt:
32 | arch: amd64
33 | sources:
34 | allow_unauthenticated: true
35 | sources:
36 | - sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
37 | - sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
38 | - sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
39 | - sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
40 |
41 | include:
42 | - python3
43 | - python3-pkg-resources
44 | - python3-idna
45 | - python3-requests
46 | - python3-urllib3
47 | - libfreetype6
48 | - libfontconfig1
49 | exclude:
50 | - usr/share/man
51 | - usr/share/doc/*/README.*
52 | - usr/share/doc/*/changelog.*
53 | - usr/share/doc/*/NEWS.*
54 | - usr/share/doc/*/TODO.*
55 |
56 | runtime:
57 | version: "continuous"
58 | env:
59 | PATH: '${APPDIR}/usr/bin:${PATH}'
60 | # Set python home
61 | # See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
62 | PYTHONHOME: '${APPDIR}/usr'
63 | # Path to the site-packages dir or other modules dirs
64 | # See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
65 | PYTHONPATH: '${APPDIR}/usr/lib/python3.10/site-packages'
66 |
67 | AppImage:
68 | arch: x86_64
69 | sign-key: None
70 | file_name: 'LinuxAudioUtilityTool.AppImage'
71 |
72 |
--------------------------------------------------------------------------------
/laut_events.py:
--------------------------------------------------------------------------------
1 | ### Eevents ###
2 | def SetSampleRateValue(ratevalue) -> int:
3 | global SampleRate
4 | SampleRate = ratevalue
5 | print('SampleRate set to: ' + ratevalue)
6 | def SetSampleAllowedRatesValue(ratevalue):
7 | global SampleAllowedRates
8 | SampleAllowedRates = ratevalue
9 | print('Sample Allowed Rates set to: ' + str(ratevalue))
10 | def SetQuantumDefValue(value) -> int:
11 | global QuantumRate
12 | QuantumRate = value
13 | print('Quantum Def to: ' + value)
14 | def SetQuantumMinValue(value) -> int:
15 | global QuantumRate_min
16 | QuantumRate_min = value
17 | print('Quantum Min to: ' + value)
18 | def SetQuantumMaxValue(value) -> int:
19 | global QuantumRate_max
20 | QuantumRate_max = value
21 | print('Quantum Max to: ' + value)
22 | def SetQuantumLimitValue(value) -> int:
23 | global QuantumRate_limit
24 | QuantumRate_limit = value
25 | print('Quantum Limit to: ' + value)
26 | def SetBuffersMaxLinkBuffers(value) -> int:
27 | global LinkBuffers_Max
28 | LinkBuffers_Max = value
29 | print('Link Buffers Max to: ' + value)
30 |
31 | def SetVoidPlaceholder(value) -> int:
32 |
33 | print('Placeholder: ' + value)
34 |
35 | def SetPulseSample(value) -> int:
36 | global PulseSample
37 | PulseSample = value
38 | print('Pulse Sample: ' + value)
39 | def SetPulseFragMin(value) -> int:
40 | global PulseFragMin
41 | PulseFragMin = value
42 | print('Pulse FragMin: ' + value)
43 | def SetPulseFragDef(value) -> int:
44 | global PulseFragDef
45 | PulseFragDef = value
46 | print('Pulse FragDef: ' + value)
47 | def SetPulseReqMin(value) -> int:
48 | global PulseReqMin
49 | PulseReqMin = value
50 | print('Pulse ReqMin: ' + value)
51 | def SetPulseReqDef(value) -> int:
52 | global PulseReqDef
53 | PulseReqDef = value
54 | print('Pulse ReqDef: ' + value)
55 | def SetPulseQuantMin(value) -> int:
56 | global PulseQuantMin
57 | PulseQuantMin = value
58 | print('Pulse QuantMin: ' + value)
59 | def SetPulseTLen(value) -> int:
60 | global PulseTLen
61 | PulseTLen = value
62 | print('Pulse TLen:' + value)
63 | def SetPulseNodesLatency(value) -> int:
64 | global PulseNodesLatency
65 | PulseNodesLatency = value
66 | print('Pulse TLen:' + value)
67 | def SetPulseResamplingQuality(value) -> int:
68 | global PulseResamplingQuality
69 | PulseResamplingQuality = value
70 | print('Pulse TLen:' + value)
71 | def SetPulseDefaultFormat(value) -> int:
72 | global PulseDefaultFormat
73 | PulseDefaultFormat = value
74 | print('Pulse TLen:' + value)
75 | def SetPulseDefaultPositon(value) -> int:
76 | global PulseDefaultPositon
77 | PulseDefaultPositon = value
78 | print('Pulse TLen:' + value)
79 | def SetPulseIdleTimeout(value) -> int:
80 | global PulseIdleTimeout
81 | PulseIdleTimeout = value
82 | print('Pulse TLen:' + value)
83 |
84 | def SetJackSample(value) -> int:
85 | global JackSample
86 | JackSample = value
87 | print('JackSample:' + str(value))
88 |
89 | def SetJackNodeLatency(value) -> int:
90 | global JackNodeLatency
91 | JackNodeLatency = value
92 | print('JackNodeLatency:' + str(value))
93 |
94 | def SetJackNodeRate(value) -> int:
95 | global JackNodeRate
96 | JackNodeRate = value
97 | print('JackNodeRate:' + str(value))
98 |
99 | def SetJackNodeQuantum(value) -> int:
100 | global JackNodeQuantum
101 | JackNodeQuantum = value
102 | print('JackNodeQuantum:' + str(value))
103 |
104 | def SetJackNodeLockQuantum(value) -> int:
105 | global JackNodeLockQuantum
106 | if str(value) == 'CheckState.Checked':
107 | JackNodeLockQuantum = "true"
108 | else:
109 | JackNodeLockQuantum = "false"
110 | print('JackNodeLockQuantum:' + JackNodeLockQuantum)
111 |
112 | def SetJackNodeForceQuantum(value) -> int:
113 | global JackNodeForceQuantum
114 | if str(value) == 'CheckState.Checked':
115 | JackNodeForceQuantum = "true"
116 | else:
117 | JackNodeForceQuantum = "false"
118 | print('JackNodeForceQuantum:' + JackNodeForceQuantum)
119 |
120 | def SetJackshowMonitor(value) -> int:
121 | global JackshowMonitor
122 | if str(value) == 'CheckState.Checked':
123 | JackshowMonitor = "true"
124 | else:
125 | JackshowMonitor = "false"
126 | print('JackshowMonitor:' + JackshowMonitor)
127 |
128 | def SetJackmergeMonitor(value) -> int:
129 | global JackmergeMonitor
130 | if str(value) == 'CheckState.Checked':
131 | JackmergeMonitor = "true"
132 | else:
133 | JackmergeMonitor = "false"
134 | print('JackmergeMonitor:' + JackmergeMonitor)
135 |
136 | def SetJackshowMidi(value) -> int:
137 | global JackshowMidi
138 | if str(value) == 'CheckState.Checked':
139 | JackshowMidi = "true"
140 | else:
141 | JackshowMidi = "false"
142 | print('JackshowMidi:' + JackshowMidi)
143 |
144 | def SetJackshortName(value) -> int:
145 | global JackshortName
146 | if str(value) == 'CheckState.Checked':
147 | JackshortName = "true"
148 | else:
149 | JackshortName = "false"
150 | print('JackshortName:' + JackshortName)
151 |
152 | def SetJackfilterName(value) -> int:
153 | global JackfilterName
154 | if str(value) == 'CheckState.Checked':
155 | JackfilterName = "true"
156 | else:
157 | JackfilterName = "false"
158 | print('JackfilterName:' + JackfilterName)
159 |
160 | def SetJackfilterChar(value) -> int:
161 | global JackfilterChar
162 | JackfilterChar = value
163 | print('JackfilterChar:' + str(value))
164 |
165 | def SetJackselfConnect(value) -> int:
166 | global JackselfConnect
167 | JackselfConnect = value
168 | print('JackselfConnect:' + str(value))
169 |
170 | def SetJacklockedProcess(value) -> int:
171 | global JacklockedProcess
172 | if str(value) == 'CheckState.Checked':
173 | JacklockedProcess = "true"
174 | else:
175 | JacklockedProcess = "false"
176 | print('JacklockedProcess:' + JacklockedProcess)
177 |
178 | def SetJackdefaultAs(value) -> int:
179 | global JackdefaultAs
180 | if str(value) == 'CheckState.Checked':
181 | JackdefaultAs = "true"
182 | else:
183 | JackdefaultAs = "false"
184 | print('JackdefaultAs:' + JackdefaultAs)
185 |
186 | def SetJackfixMidiEvents(value) -> int:
187 | global JackfixMidiEvents
188 | if str(value) == 'CheckState.Checked':
189 | JackfixMidiEvents = "true"
190 | else:
191 | JackfixMidiEvents = "false"
192 | print('JackfixMidiEvents:' + JackfixMidiEvents)
193 |
194 | def SetJackglobalBufferSize(value) -> int:
195 | global JackglobalBufferSize
196 | if str(value) == 'CheckState.Checked':
197 | JackglobalBufferSize = "true"
198 | else:
199 | JackglobalBufferSize = "false"
200 | print('JackglobalBufferSize:' + JackglobalBufferSize)
201 |
202 | def SetJackmaxClientPorts(value) -> int:
203 | global JackmaxClientPorts
204 | JackmaxClientPorts = value
205 | print('JackmaxClientPorts:' + str(value))
206 |
207 | def SetJackfillAliases(value) -> int:
208 | global JackfillAliases
209 | if str(value) == 'CheckState.Checked':
210 | JackfillAliases = "true"
211 | else:
212 | JackfillAliases = "false"
213 | print('JackfillAliases:' + JackfillAliases)
214 |
215 | def SetJackwritableInput(value) -> int:
216 | global JackwritableInput
217 | if str(value) == 'CheckState.Checked':
218 | JackwritableInput = "true"
219 | else:
220 | JackwritableInput = "false"
221 | print('JackwritableInput:' + JackwritableInput)
222 |
223 | def SetSampleRateLoadedClients(value) -> int:
224 | global SampleRateLoadedClients
225 | SampleRateLoadedClients = value
226 | print('SetSampleRateLoadedClients:' + str(value))
227 | def SetClientsNodeLatency(value) -> int:
228 | global ClientsNodeLatency
229 | ClientsNodeLatency = value
230 | print('SetClientsNodeLatency:' + str(value))
231 | def SetClientsResampleQuality(value) -> int:
232 | global ClientsResampleQuality
233 | ClientsResampleQuality = value
234 | print('SetClientsResampleQuality:' + str(value))
235 | def SetClientsChannelmixUpmixMethod(value) -> int:
236 | global ClientsChannelmixUpmixMethod
237 | ClientsChannelmixUpmixMethod = value
238 | print('SetClientsChannelmixUpmixMethod:' + str(value))
239 | def SetClientsChannelmixLfecutoff(value) -> int:
240 | global ClientsChannelmixLfecutoff
241 | ClientsChannelmixLfecutoff = value
242 | print('SetClientsChannelmixLfecutoff:' + str(value))
243 | def SetClientsChannelmixFccutoff(value) -> int:
244 | global ClientsChannelmixFccutoff
245 | ClientsChannelmixFccutoff = value
246 | print('SetClientsChannelmixFccutoff:' + str(value))
247 | def SetClientsChannelmixReardelay(value) -> int:
248 | global ClientsChannelmixReardelay
249 | ClientsChannelmixReardelay = value
250 | print('SetClientsChannelmixReardelay:' + str(value))
251 | def SetClientsChannelmixStereowiden(value) -> int:
252 | global ClientsChannelmixStereowiden
253 | ClientsChannelmixStereowiden = value
254 | print('SetClientsChannelmixStereowiden:' + str(value))
255 | def SetClientsChannelmixHilberttaps(value) -> int:
256 | global ClientsChannelmixHilberttaps
257 | ClientsChannelmixHilberttaps = value
258 | print('SetClientsChannelmixHilberttaps:' + str(value))
259 | def SetClientsDitherNoise(value) -> int:
260 | global ClientsDitherNoise
261 | ClientsDitherNoise = value
262 | print('SetClientsDitherNoise:' + str(value))
263 |
264 | def SetClientsNodeAutoconnect(value) -> int:
265 | global ClientsNodeAutoconnect
266 | if str(value) == 'CheckState.Checked':
267 | ClientsNodeAutoconnect = "true"
268 | else:
269 | ClientsNodeAutoconnect = "false"
270 | print('ClientsNodeAutoconnect:' + ClientsNodeAutoconnect)
271 | def SetClientsChannelmixNormalize(value) -> int:
272 | global ClientsChannelmixNormalize
273 | if str(value) == 'CheckState.Checked':
274 | ClientsChannelmixNormalize = "true"
275 | else:
276 | ClientsChannelmixNormalize = "false"
277 | print('ClientsChannelmixNormalize:' + ClientsChannelmixNormalize)
278 | def SetClientsChannelmixMixlfe(value) -> int:
279 | global ClientsChannelmixMixlfe
280 | if str(value) == 'CheckState.Checked':
281 | ClientsChannelmixMixlfe = "true"
282 | else:
283 | ClientsChannelmixMixlfe = "false"
284 | print('ClientsChannelmixMixlfe:' + ClientsChannelmixMixlfe)
285 | def SetClientsChannelmixUpmix(value) -> int:
286 | global ClientsChannelmixUpmix
287 | if str(value) == 'CheckState.Checked':
288 | ClientsChannelmixUpmix = "true"
289 | else:
290 | ClientsChannelmixUpmix = "false"
291 | print('ClientsChannelmixUpmix:' + ClientsChannelmixUpmix)
292 |
293 | def SetClientsAlsaDeny(value) -> int:
294 | global ClientsAlsaDeny
295 | if str(value) == 'CheckState.Checked':
296 | ClientsAlsaDeny = "true"
297 | else:
298 | ClientsAlsaDeny = "false"
299 | print('ClientsChannelmixUpmix:' + ClientsAlsaDeny)
300 |
301 | def SetClientsAlsaAccess(value) -> int:
302 | global ClientsAlsaAccess
303 | ClientsAlsaAccess = value
304 | print('ClientsAlsaAccess:' + value)
305 | def SetClientsAlsaFormat(value) -> int:
306 | global ClientsAlsaFormat
307 | ClientsAlsaFormat = value
308 | print('ClientsAlsaFormat:' + value)
309 | def SetClientsAlsaRate(value) -> int:
310 | global ClientsAlsaRate
311 | ClientsAlsaRate = value
312 | print('ClientsAlsaRate:' + value)
313 | def SetClientsAlsaChannels(value) -> int:
314 | global ClientsAlsaChannels
315 | ClientsAlsaChannels = value
316 | print('ClientsAlsaChannels:' + value)
317 | def SetClientsAlsaPeriodbytes(value) -> int:
318 | global ClientsAlsaPeriodbytes
319 | ClientsAlsaPeriodbytes = value
320 | print('ClientsAlsaPeriodbytes:' + value)
321 | def SetClientsAlsaBufferbytes(value) -> int:
322 | global ClientsAlsaBufferbytes
323 | ClientsAlsaBufferbytes = value
324 | print('ClientsAlsaBufferbytes:' + value)
325 | def SetClientsAlsaVolumeMethod(value) -> int:
326 | global ClientsAlsaVolumeMethod
327 | ClientsAlsaVolumeMethod = value
328 | print('ClientsAlsaVolumeMethod:' + value)
--------------------------------------------------------------------------------
/laut_files_handling.py:
--------------------------------------------------------------------------------
1 |
2 | def LoadPwJson(prefix,configuration):
3 |
4 | file_data_str = ""
5 | with open(prefix + configuration, 'r') as file:
6 | stripped_lines = (line.rstrip() for line in file)
7 | for lines in stripped_lines:
8 | if not lines.lstrip().startswith('#') and lines:
9 | file_data_str +=(lines.split('#')[0] + '\n')
10 |
11 | main = []
12 | ins = []
13 |
14 | sqr_indx = 0
15 | brack_index = 0
16 | for line in file_data_str.split('\n'):
17 | if '{' in line:
18 | brack_index += 1
19 | if brack_index == 1:
20 | if line.strip().startswith('{'):
21 | main.append(line.split('=')[0].strip()[2:])
22 | else:
23 | main.append(line.split('=')[0].strip())
24 |
25 | if brack_index > 1:
26 | ins.append(line.strip())
27 | if '{' not in line and '}' not in line:
28 | ins.append(line.strip())
29 | if '{' in line and '}' in line:
30 | ins.append(line.split('=')[-1].strip()[:-3])
31 | if '}' in line:
32 | brack_index += -1
33 | if brack_index > 0:
34 | ins.append(line.split('=')[-1].strip())
35 | if brack_index == 0:
36 | main.append(ins)
37 | ins = []
38 | if brack_index == 0 and '[' in line:
39 | sqr_indx += 1
40 | brack_index += 1
41 | main.append(line.split('=')[0].strip())
42 | ins = []
43 | if sqr_indx > 0 and brack_index == 1 and ']' in line and '[' not in line:
44 | sqr_indx += -1
45 | brack_index += -1
46 | if brack_index == 0:
47 | main.append(ins)
48 | ins = []
49 | return main
50 |
51 | def CreateConfigFilePipeWire(params_list:dict):
52 | template = f"""
53 | context.properties = {{
54 | link.max-buffers = { params_list["max-buffers"] or 16 }
55 | default.clock.rate = { params_list["clock-rate"] }
56 | default.clock.allowed-rates = { params_list["allowed-rates"] }
57 | default.clock.quantum = { params_list["quantum-def"] }
58 | default.clock.min-quantum = { params_list["quantum-min"] }
59 | default.clock.max-quantum = { params_list["quantum-max"] }
60 | default.clock.quantum-limit = { params_list["quantum-limit"] }
61 | }}
62 | """
63 | return template
64 |
65 | def findMatchingSettings(input_list):
66 | occ_index = [ index for index,content in enumerate(input_list) if content.startswith('matches = [') ]
67 | start_index = [ index - 1 for index in occ_index ]
68 | end_index = [index for index,content in enumerate(input_list) if content == '}' and index in occ_index ]
69 |
70 | return
71 |
72 | def CreateConfigFilePipeWirePulse(params_list:dict):
73 | template = f"""
74 | stream.properties = {{
75 |
76 | node.latency = { params_list["node-latency-param"] }
77 | resample.quality = { params_list["resample-quality-param"] }
78 |
79 | }}
80 | pulse.properties = {{
81 | pulse.min.req = { params_list["pulse-min-req"] }/{ params_list["arbitrary-sampling-param"] }
82 | pulse.default.req = { params_list["pulse-default-req"] }/{ params_list["arbitrary-sampling-param"] }
83 | pulse.min.frag = { params_list["pulse-min-frag"] }/{ params_list["arbitrary-sampling-param"] }
84 | pulse.default.frag = { params_list["pulse-default-frag"] }/{ params_list["arbitrary-sampling-param"] }
85 | pulse.default.tlength = { params_list["pulse-default-tlength"] }/{ params_list["arbitrary-sampling-param"] }
86 | pulse.min.quantum = { params_list["pulse-min-quantum"] }/{ params_list["arbitrary-sampling-param"] }
87 | pulse.idle.timeout = { params_list["pulse-idle-timeout"] }
88 | pulse.default.format = { params_list["pulse-default-format"] }
89 | pulse.default.position = { params_list["pulse-default-position"] }
90 | }}
91 | """
92 | return template
93 |
94 |
95 | def CreateConfigFilePipeWireJack(params_list:dict):
96 | template = f"""
97 | jack.properties = {{
98 | node.latency = { params_list["node.latency"] }/{ params_list["arbitrary-sampling-param"] }
99 | node.rate = { params_list["node.rate"] }/{ params_list["arbitrary-sampling-param"] }
100 | node.lock-quantum = { params_list["node.lock-quantum"] }
101 | node.force-quantum = { params_list["node.force-quantum"] }
102 | jack.show-monitor = { params_list["jack.show-monitor"] }
103 | jack.merge-monitor = { params_list["jack.merge-monitor"] }
104 | jack.show-midi = { params_list["jack.show-midi"] }
105 | jack.short-name = { params_list["jack.short-name"] }
106 | jack.filter-name = { params_list["jack.filter-name"] }
107 | jack.filter-char = { params_list["jack.filter-char"] }
108 | jack.self-connect-mode = { params_list["jack.self-connect-mode"] }
109 | jack.locked-process = { params_list["jack.locked-process"] }
110 | jack.default-as-system = { params_list["jack.default-as-system"] }
111 | jack.fix-midi-events = { params_list["jack.fix-midi-events"] }
112 | jack.global-buffer-size = { params_list["jack.global-buffer-size"] }
113 | jack.max-client-ports = { params_list["jack.max-client-ports"] }
114 | jack.fill-aliases = { params_list["jack.fill-aliases"] }
115 | jack.writable-input = { params_list["jack.writable-input"] }
116 | }}
117 | """
118 | return template
119 |
120 | def CreateConfigFilePipeWireClients(params_list:dict):
121 | template = f"""
122 | stream.properties = {{
123 | node.latency = { params_list['node.latency']}
124 | node.autoconnect = { params_list['node.autoconnect']}
125 | resample.quality = { params_list['resample.quality']}
126 | channelmix.normalize = { params_list['channelmix.normalize']}
127 | channelmix.mix-lfe = { params_list['channelmix.mix-lfe']}
128 | channelmix.upmix = { params_list['channelmix.upmix']}
129 | channelmix.upmix-method = { params_list['channelmix.upmix-method']}
130 | channelmix.lfe-cutoff = { params_list['channelmix.lfe-cutoff']}
131 | channelmix.fc-cutoff = { params_list['channelmix.fc-cutoff']}
132 | channelmix.rear-delay = { params_list['channelmix.rear-delay']}
133 | channelmix.stereo-widen = { params_list['channelmix.stereo-widen']}
134 | channelmix.hilbert-taps = { params_list['channelmix.hilbert-taps']}
135 | dither.noise = { params_list['dither.noise']}
136 | }}
137 |
138 |
139 | alsa.properties = {{
140 | alsa.deny = {params_list['alsa.deny']}
141 | alsa.format = [ {params_list['alsa.format']} ]
142 | alsa.rate = {{ {params_list['alsa.rate']} }}
143 | alsa.channels = {{ {params_list['alsa.channels']} }}
144 | alsa.period-bytes = {{ {params_list['alsa.period-bytes']} }}
145 | alsa.buffer-bytes = {{ {params_list['alsa.buffer-bytes']} }}
146 | alsa.volume-method = {params_list['alsa.volume-method']}
147 | }}
148 |
149 | """
150 | return template
151 |
152 |
153 |
154 |
155 | #os.path.isfile( home_path + '/.config/pipewire/pipewire-pulse.conf')
156 | #os.path.isfile( home_path + '/.config/pipewire/pipewire-avb.conf')
157 | #os.path.isfile( home_path + '/.config/pipewire/jack.conf')
158 | #os.path.isfile( home_path + '/.config/pipewire/filter-chain.conf')
159 | #os.path.isfile( home_path + '/.config/pipewire/client.conf')
160 | #os.path.isfile( home_path + '/.config/pipewire/client-rt.conf')
161 | #wireplumber configs
162 | #self.ConfigurationFileExits( home_path + '/.config/wireplumber/main.lua.d/50-alsa-config.lua')
163 | #self.ConfigurationFileExits( home_path + '/.config/wireplumber/main.lua.d/99-stop-microphone-auto-adjust.lua')
164 | #self.ConfigurationFileExits( home_path + '/.config/wireplumber/main.lua.d/100-custom-overwrites.lua')
--------------------------------------------------------------------------------
/laut_functions.py:
--------------------------------------------------------------------------------
1 | from pipewire_python.controller import Controller
2 | import os
3 | import requests
4 |
5 | def GetDevicesBasicInfo():
6 | BasicDevicesInfo = []
7 | output = Controller().get_list_interfaces(type_interfaces = "Device")
8 | for dev in output:
9 | output.get(dev).get("properties")
10 | CurrentDeviceInfo = { key: data for key,data in output.get(dev).get("properties").items() if key in ('device.name','device.description','object.serial') }
11 | CurrentDeviceInfo.update({'device.id':dev})
12 | BasicDevicesInfo.append(CurrentDeviceInfo)
13 | return BasicDevicesInfo
14 |
15 | def GetPWVersion():
16 | pipewire_version = os.popen('pipewire --version').readlines()
17 | x = pipewire_version[1].find("libpipewire")
18 | c_s = x+len("libpipewire")
19 | return pipewire_version[1][c_s:].strip()
20 |
21 | def GetMostUpToDateVersion():
22 | response = requests.get("https://api.github.com/repos/PipeWire/pipewire/tags")
23 | return response.json()[0].get("name")
24 |
25 | def GetDeviceCurrentProperties(DevName):
26 | PWTopOutput = os.popen(f'pw-top -b -n 3 | grep {DevName["device.description"].replace(" ","_")}|awk \'{{print $1,sep,$2,sep,$3,sep,$4,sep,$5,sep,$6,sep,$7,sep,$8,sep,$9,sep,$10,sep,$11,sep,$12,sep,$13; sep=";"}}\' ').read()
27 | #3 itterations are nessecary to retrive acctuall data from pw-top
28 |
29 | RemovableItters = PWTopOutput.splitlines()
30 | del RemovableItters[0:2]
31 | #remove garbage itters
32 |
33 | DevicesList = []
34 |
35 | OutputHeaders = ["S","ID","Quant","Rate","Wait","Busy","W/Q","B/Q","Error","Bit Format","Channels","Device Rate","Name"]
36 | #added custom headers
37 |
38 | if not PWTopOutput:
39 | OutputData = [["NaN","NaN","NaN","NaN","NaN","NaN","NaN","NaN","NaN","NaN","NaN","NaN","NaN"]]
40 | else:
41 | OutputData = [list(map(str.strip,x.split(";"))) for x in RemovableItters]
42 | #splits and removes extra spaces
43 | for device in OutputData:
44 | DevicesList.append({ key:value for (key,value) in zip(OutputHeaders,device) })
45 | return DevicesList
46 |
47 | def GetConfigurationPath():
48 | home_path = os.path.expanduser('~')
49 | configurations_path = '/.config/pipewire/'
50 | return home_path + configurations_path
51 |
52 | def ConfigExitsCheck(config_name:str):
53 | prefix = GetConfigurationPath()
54 | return os.path.isfile( prefix + config_name )
55 |
56 | def subConfigExitsCheck(sub_config_name:str,config_extra):
57 | prefix = GetConfigurationPath()
58 |
59 | return os.path.isfile( prefix + config_extra + sub_config_name )
60 |
61 | def my_coalesce(*arg):
62 | for el in arg:
63 | if el is not None:
64 | return el
65 | return None
66 |
67 | def RestartPWServices():
68 | active_wireplumber = os.popen('systemctl --user status wireplumber').read()
69 | active_pipewire = os.popen('systemctl --user status pipewire').read()
70 | active_pipewire_pulse = os.popen('systemctl --user status pipewire-pulse').read()
71 | active_pipewire_jack = os.popen('systemctl --user status pipewire-jack').read()
72 |
73 | if active_wireplumber.startswith('● wireplumber.service'):
74 | print("Active Wireplumber")
75 | os.popen('systemctl --user restart wireplumber')
76 | if active_pipewire.startswith('● pipewire.service'):
77 | print("Active PW")
78 | os.popen('systemctl --user restart pipewire')
79 | if active_pipewire_pulse.startswith('● pipewire-pulse.service'):
80 | print("Active PW-Pulse")
81 | os.popen('systemctl --user restart pipewire-pulse')
82 | if active_pipewire_jack.startswith('● pipewire-jack.service'):
83 | print("Active PW-Jack")
84 | os.popen('systemctl --user restart pipewire-jack')
85 |
86 |
87 | def RemoveOverrideProperties(proprties_list):
88 | """
89 | Removes VM properties so those not overwrite standard ones
90 | """
91 | if proprties_list.count('vm.overrides = {')>0 :
92 | rsi_s = proprties_list.index('vm.overrides = {')
93 | rsi_e = proprties_list.index('}')
94 |
95 | del proprties_list[rsi_s:rsi_e+1]
96 |
97 | def ParsePropertiesIntoDict(properites_list):
98 | return dict( list(map(str.strip,propert.split('='))) for propert in properites_list if len(propert.split('=')) > 1 )
99 |
100 | def strtobool(val):
101 | """Convert a string representation of truth to true (1) or false (0).
102 | True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
103 | are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if
104 | 'val' is anything else.
105 | """
106 | val = val.lower()
107 | if val in ('y', 'yes', 't', 'true', 'on', '1'):
108 | return 1
109 | elif val in ('n', 'no', 'f', 'false', 'off', '0'):
110 | return 0
111 | else:
112 | raise ValueError("invalid truth value %r" % (val,))
--------------------------------------------------------------------------------
/laut_gui_templates.py:
--------------------------------------------------------------------------------
1 | from PyQt6.QtGui import QPolygon,QRegion
2 | from PyQt6.QtCore import QPoint,QSize,Qt,QMargins,QRect
3 | from PyQt6.QtWidgets import (QPushButton
4 | ,QSizePolicy
5 | ,QComboBox
6 | ,QLabel
7 | ,QHBoxLayout
8 | ,QCheckBox
9 | ,QLineEdit
10 | ,QVBoxLayout
11 | ,QLayout
12 | ,QBoxLayout
13 | ,QFrame)
14 |
15 | def sign_mask(x,y):
16 | points = [QPoint(0, 0), QPoint(int(x/2), 0), QPoint(x, int(y/2)), QPoint(int(x/2), y), QPoint(0, y)]
17 | return QRegion(QPolygon(points))
18 |
19 | def rhombus_mask(x,y):
20 | points = [QPoint(int(x/2), 0), QPoint(x, int(y/2)), QPoint(int(x/2),y), QPoint(0, int(y/2))]
21 | return QRegion(QPolygon(points))
22 |
23 | def circle_mask(x,y):
24 | return QRegion(0,0,x,y,QRegion.RegionType.Ellipse)
25 |
26 | def SeparatorVertical():
27 | Separator = QFrame()
28 | Separator.setFrameShape(QFrame.Shape.HLine)
29 | #Separator.setSizePolicy(QSizePolicy.Policy.Minimum,QSizePolicy.Policy.Expanding)
30 | Separator.setLineWidth(3)
31 | Separator.setProperty("class","Layout_Style")
32 | return Separator
33 |
34 | def warning_icon(icon_h: int ,icon_w: int,tooltip_text:str):
35 | button = QPushButton()
36 | button.setFixedSize(QSize(icon_h, icon_w))
37 | button.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed))
38 | button.setMask(rhombus_mask(icon_h,icon_w))
39 | button.setText('!')
40 | button.setToolTip(tooltip_text)
41 | button.setProperty("class","Warning_Icon")
42 |
43 | return button
44 |
45 | def info_icon(icon_h: int ,icon_w: int,tooltip_text:str):
46 | button = QPushButton()
47 | button.setFixedSize(QSize(icon_h, icon_w))
48 | button.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed))
49 | #button.setMask(circle_mask(icon_h,icon_w))
50 | button.setText('?')
51 | button.setToolTip(tooltip_text)
52 | button.setProperty("class","Info_Icon")
53 |
54 | return button
55 |
56 | def StandardDropdownTemplate(LableName: str,ValuesList:list,CatchFunc,DefaultValues,Tooltipstr=None):
57 | #Add Sample rates dropdown
58 | def_lable = QLabel(LableName)
59 |
60 | dropdown = QComboBox()
61 | dropdown.addItems(ValuesList)
62 | dropdown.currentTextChanged.connect(CatchFunc)
63 | dropdown.setCurrentText(DefaultValues)
64 |
65 | whole = QVBoxLayout()
66 | inside = QHBoxLayout()
67 | inside.addWidget(def_lable)
68 | inside.addWidget(dropdown)
69 |
70 | if Tooltipstr is not None:
71 | info = info_icon(24,24,Tooltipstr)
72 | info.setProperty("class","Info_Icon_Small")
73 | inside.addWidget(info)
74 |
75 | whole.addLayout(inside)
76 | whole.addWidget(SeparatorVertical())
77 |
78 | return whole
79 |
80 | def StandardCheckboxTemplate(LableName: str,CatchFunc,DefValue,Tooltipstr=None):
81 | #Add Sample rates dropdown
82 | def_lable = QLabel(LableName)
83 |
84 | checkbox = QCheckBox()
85 | checkbox.setChecked(DefValue)
86 | checkbox.checkStateChanged.connect(CatchFunc)
87 |
88 | whole = QVBoxLayout()
89 | inside = QHBoxLayout()
90 | inside.addWidget(def_lable)
91 | inside.addWidget(checkbox)
92 |
93 | if Tooltipstr is not None:
94 | info = info_icon(24,24,Tooltipstr)
95 | info.setProperty("class","Info_Icon_Small")
96 | inside.addWidget(info)
97 |
98 | whole.addLayout(inside)
99 | whole.addWidget(SeparatorVertical())
100 |
101 | return whole
102 |
103 | def StandardInputTemplate(LableName: str,size:QSize,CatchFunc,DefaultValues,Tooltipstr=None):
104 | #Add Sample rates dropdown
105 | def_lable = QLabel(LableName)
106 |
107 | Input_Temp = QLineEdit()
108 |
109 | Input_Temp.setSizePolicy(QSizePolicy(QSizePolicy.Policy.MinimumExpanding, QSizePolicy.Policy.Preferred))
110 | Input_Temp.setMinimumSize(size)
111 | Input_Temp.textChanged.connect(CatchFunc)
112 |
113 | Input_Temp.setProperty("class","Standard_Input")
114 | Input_Temp.setText(DefaultValues)
115 |
116 | whole = QVBoxLayout()
117 | inside = QHBoxLayout()
118 | inside.addWidget(def_lable)
119 | inside.addWidget(Input_Temp)
120 |
121 | if Tooltipstr is not None:
122 | info = info_icon(24,24,Tooltipstr)
123 | info.setProperty("class","Info_Icon_Small")
124 | inside.addWidget(info)
125 |
126 | whole.addLayout(inside)
127 | whole.addWidget(SeparatorVertical())
128 |
129 | return whole
130 |
131 | def StandardLableTemplate(LableName: str,size:QSize):
132 | #Add Sample rates dropdown
133 | def_lable = QLabel(LableName)
134 | def_lable.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum))
135 | def_lable.setMinimumSize(size)
136 |
137 | return def_lable
138 |
139 | def StandardButtonTemplate(ButtonText:str,ButtonSize:QSize,ButtonFucntion,Tooltipstr=None) -> QPushButton:
140 | standard_button = QPushButton(ButtonText)
141 | standard_button.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed))
142 | standard_button.setFixedSize(ButtonSize)
143 | standard_button.clicked.connect(ButtonFucntion)
144 |
145 | if Tooltipstr is not None:
146 | standard_button.setToolTip(Tooltipstr)
147 |
148 | return standard_button
149 |
150 |
151 | def AbsLableTemplate(LableName: str,size:QSize):
152 | #Add Sample rates dropdown
153 | def_lable = QLabel(LableName)
154 | def_lable.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed))
155 | def_lable.setMinimumSize(size)
156 |
157 | return def_lable
158 |
159 |
160 |
161 |
162 | class FlowLayout(QBoxLayout):
163 | def __init__(self, parent=None):
164 | super().__init__(parent)
165 |
166 | if parent is not None:
167 | self.setContentsMargins(QMargins(0, 0, 0, 0))
168 |
169 | self._item_list = []
170 |
171 | def __del__(self):
172 | item = self.takeAt(0)
173 | while item:
174 | item = self.takeAt(0)
175 |
176 | def addItem(self, item):
177 | self._item_list.append(item)
178 |
179 | def count(self):
180 | return len(self._item_list)
181 |
182 | def itemAt(self, index):
183 | if 0 <= index < len(self._item_list):
184 | return self._item_list[index]
185 |
186 | return None
187 |
188 | def takeAt(self, index):
189 | if 0 <= index < len(self._item_list):
190 | return self._item_list.pop(index)
191 |
192 | return None
193 |
194 | def expandingDirections(self):
195 | return Qt.Orientation(0)
196 |
197 | def hasHeightForWidth(self):
198 | return True
199 |
200 | def heightForWidth(self, width):
201 | height = self._do_layout(QRect(0, 0, width, 0), True)
202 | return height
203 |
204 | def setGeometry(self, rect):
205 | super(FlowLayout, self).setGeometry(rect)
206 | self._do_layout(rect, False)
207 |
208 | def sizeHint(self):
209 | return self.minimumSize()
210 |
211 | def minimumSize(self):
212 | size = QSize()
213 |
214 | for item in self._item_list:
215 | size = size.expandedTo(item.minimumSize())
216 |
217 | size += QSize(2 * self.contentsMargins().top(), 2 * self.contentsMargins().top())
218 | return size
219 |
220 | def _do_layout(self, rect, test_only):
221 | x = rect.x()
222 | y = rect.y()
223 | line_height = 0
224 | spacing = self.spacing()
225 |
226 | for item in self._item_list:
227 | style = item.widget().style()
228 | layout_spacing_x = style.layoutSpacing(
229 | QSizePolicy.ControlType.PushButton, QSizePolicy.ControlType.PushButton,
230 | Qt.Orientation.Horizontal
231 | )
232 | layout_spacing_y = style.layoutSpacing(
233 | QSizePolicy.ControlType.PushButton, QSizePolicy.ControlType.PushButton,
234 | Qt.Orientation.Vertical
235 | )
236 | space_x = spacing + layout_spacing_x
237 | space_y = spacing + layout_spacing_y
238 | next_x = x + item.sizeHint().width() + space_x
239 | if next_x - space_x > rect.right() and line_height > 0:
240 | x = rect.x()
241 | y = y + line_height + space_y
242 | next_x = x + item.sizeHint().width() + space_x
243 | line_height = 0
244 |
245 | if not test_only:
246 | item.setGeometry(QRect(QPoint(x, y), item.sizeHint()))
247 |
248 | x = next_x
249 | line_height = max(line_height, item.sizeHint().height())
250 |
251 | return y + line_height - rect.y()
--------------------------------------------------------------------------------
/laut_main.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | from PyQt6.QtCore import QSize,Qt
4 | from PyQt6.QtWidgets import (QApplication
5 | ,QMainWindow
6 | ,QPlainTextEdit
7 | ,QVBoxLayout
8 | ,QHBoxLayout
9 | ,QWidget
10 | ,QLabel
11 | ,QTabWidget
12 | ,QGridLayout
13 | ,QSizePolicy
14 | ,QScrollArea
15 | )
16 | from laut_gui_templates import (warning_icon
17 | ,StandardDropdownTemplate
18 | ,StandardCheckboxTemplate
19 | ,StandardInputTemplate
20 | ,StandardLableTemplate
21 | ,StandardButtonTemplate
22 | ,info_icon
23 | ,AbsLableTemplate)
24 | from laut_functions import (GetPWVersion
25 | ,GetDevicesBasicInfo
26 | ,GetDeviceCurrentProperties
27 | ,GetConfigurationPath
28 | ,ConfigExitsCheck
29 | ,RestartPWServices
30 | ,subConfigExitsCheck
31 | ,GetMostUpToDateVersion
32 | ,my_coalesce
33 | ,RemoveOverrideProperties
34 | ,ParsePropertiesIntoDict
35 | ,strtobool)
36 | from laut_files_handling import LoadPwJson,CreateConfigFilePipeWire,CreateConfigFilePipeWirePulse,CreateConfigFilePipeWireJack,CreateConfigFilePipeWireClients
37 | import laut_text
38 | import laut_events
39 |
40 | class MainWindow(QMainWindow):
41 |
42 | ### Build Itself ###
43 | def __init__(self):
44 | super().__init__()
45 |
46 | self.setWindowTitle("Linux Audio Utility Tools")
47 |
48 | self.resize(1920, 1080)
49 |
50 | tabs = self.Tab_Headers()
51 |
52 | mainl = QVBoxLayout()
53 | w = QWidget()
54 | mainl.addWidget(tabs)
55 | w.setLayout(mainl)
56 |
57 | self.setCentralWidget(w)
58 |
59 | ### Tabs ###
60 |
61 | def Tab_Headers(self):
62 | tabs = QTabWidget()
63 | tabs.setTabPosition(QTabWidget.TabPosition.North)
64 | #tabs.addTab(self.All_Outputs_Tab(),"Outputs Info")
65 | tabs.addTab(self.Pipewire_Configuration_Tab(),"Pipewire Configuration")
66 | #Devices info
67 | tabs.addTab(self.All_Devices_Tab(),"Devices Info")
68 | #Advanced
69 | #tabs.addTab(self.All_Outputs_Tab(),"Application Overrides")
70 | #tabs.addTab(self.All_Outputs_Tab(),"Virtual Ouptu/Input Devices")
71 | #tabs.addTab(self.Alsa_Configuration_Tab(),"Alsa Device Settings")
72 | tabs.setProperty("class","tabs_class")
73 |
74 | return tabs
75 |
76 |
77 | def All_Devices_Tab(self):
78 |
79 |
80 | minl = self.devices_panel()
81 |
82 | All_Devices_Tab_window = QWidget()
83 | All_Devices_Tab_window.setLayout(minl)
84 | return All_Devices_Tab_window
85 |
86 | def Pipewire_Configuration_Tab(self):
87 | laut_text.init_localization()
88 |
89 | tabsl = QTabWidget()
90 | tabsl.setTabPosition(QTabWidget.TabPosition.West)
91 | tabsl.addTab(self.pipewire_pulse_panel(),"Pipewire Pulse Settings")
92 | tabsl.addTab(self.pipewire_settings_panel_pw(),"Pipewire Settings")
93 | tabsl.addTab(self.pipewire_jack_panel(),"Pipewire Jack Settings")
94 | tabsl.addTab(self.pipewire_alsa_panel(),"Pipewire Clients Settings")
95 |
96 | minl = QGridLayout()
97 | topl = QHBoxLayout()
98 | midl = QHBoxLayout()
99 | # midls = self.pipewire_settings_panel_pw()
100 | # midld = self.pipewire_jack_panel()
101 | # midlt = self.pipewire_alsa_panel()
102 | bottml = QHBoxLayout()
103 |
104 | topl.addLayout(self.menu_buttons())
105 | bottml.addLayout(self.submenu_version_display())
106 | #verticalSpacer = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) grid.addItem(verticalSpacer, 6, 0, QtCore.Qt.AlignTop)
107 |
108 | tabsl.setMaximumSize(1200,800)
109 | tabsl.setSizePolicy(QSizePolicy.Policy.Expanding,QSizePolicy.Policy.Expanding)
110 | midl.addWidget(tabsl)
111 |
112 |
113 |
114 | minl.addLayout(topl,0,0,Qt.AlignmentFlag.AlignLeft)
115 | minl.addLayout(midl,1,0,Qt.AlignmentFlag.AlignTop)
116 | # minl.addLayout(midl,1,1,Qt.AlignmentFlag.AlignTop)
117 | # minl.addLayout(midld,1,2,Qt.AlignmentFlag.AlignTop)
118 | # minl.addLayout(midlt,1,3,Qt.AlignmentFlag.AlignTop)
119 | minl.addLayout(bottml,2,0,Qt.AlignmentFlag.AlignLeft)
120 |
121 | Pipewire_Configuration_Tab_win = QWidget()
122 |
123 | Pipewire_Configuration_Tab_win.setLayout(minl)
124 | #Pipewire_Configuration_Tab_win.setSizePolicy(QSizePolicy.Policy.Expanding,QSizePolicy.Policy.Expanding)
125 |
126 |
127 |
128 | return Pipewire_Configuration_Tab_win
129 |
130 | def Alsa_Configuration_Tab(self):
131 |
132 | minl = QHBoxLayout()
133 |
134 | Alsa_Configuration_Tab_win = QWidget()
135 | Alsa_Configuration_Tab_win.setLayout(minl)
136 | return Alsa_Configuration_Tab_win
137 |
138 | ### panels
139 |
140 | def pipewire_settings_panel_pw(self):
141 |
142 | pipewire_data = self.LoadConfigurationFromFile('pipewire.conf')
143 | if pipewire_data is None:
144 | pipewire_data = {}
145 |
146 | ###get Config Values###
147 | SampleRateLoaded = pipewire_data['default.clock.rate'] if pipewire_data.get('default.clock.rate') is not None else "48000"
148 | AllowedRatesLoaded = pipewire_data['default.clock.allowed-rates'] if pipewire_data.get('default.clock.allowed-rates') is not None else "[ 44100 48000 88200 96000 176400 192000 352800 384000 ]"
149 | QuantumDefLoaded = pipewire_data['default.clock.quantum'] if pipewire_data.get('default.clock.quantum') is not None else "1024"
150 | QuantumMinLoaded = pipewire_data['default.clock.min-quantum'] if pipewire_data.get('default.clock.min-quantum') is not None else "512"
151 | QuandumMaxLoaded = pipewire_data['default.clock.max-quantum'] if pipewire_data.get('default.clock.max-quantum') is not None else "2048"
152 | QuantumLimitLoaded = pipewire_data['default.clock.quantum-limit'] if pipewire_data.get('default.clock.quantum-limit') is not None else "8192"
153 | LinkBuffersLoaded = pipewire_data['link.max-buffers'] if pipewire_data.get('link.max-buffers') is not None else "16"
154 |
155 |
156 |
157 |
158 | main_header_pw = StandardLableTemplate(laut_text.main_header_pipewire_txt,QSize(200, 40))
159 | main_header_pw.setProperty("class","Settings_Header")
160 |
161 | Main_Layout = QVBoxLayout()
162 | main_header_pw.setToolTip(laut_text.pwmain_tooltip_text)
163 | Main_Layout.addWidget(main_header_pw,alignment=Qt.AlignmentFlag.AlignTop)
164 |
165 | Button_space = QHBoxLayout()
166 |
167 | save_button = StandardButtonTemplate("Save Pipewire\nConfiguration",QSize(200, 40),self.SaveConfigurationForPipewire,laut_text.save_button_tooltip)
168 | Button_space.addWidget(save_button)
169 |
170 | Main_Layout.addLayout(Button_space)
171 |
172 |
173 | Lable_space = QHBoxLayout()
174 |
175 |
176 |
177 | Lable_space.addWidget(StandardLableTemplate("Sampling Settings:",QSize(120, 50)))
178 | Lable_space.addWidget(info_icon(36,36,laut_text.sample_tooltip_text),alignment=Qt.AlignmentFlag.AlignAbsolute)
179 |
180 | Main_Layout.addLayout(Lable_space)
181 |
182 | Main_Layout.addLayout(StandardDropdownTemplate('Sample Rate:',['16000','32000','44100','48000','88200','96000','176400','192000','352800','384000'],laut_events.SetSampleRateValue,str(SampleRateLoaded),laut_text.sample_rate_tooltip_text))
183 | Main_Layout.addLayout(StandardInputTemplate('Allowed Sampling Rates:',QSize(200, 28),laut_events.SetSampleAllowedRatesValue,str(AllowedRatesLoaded),laut_text.allowed_sample_tooltip_text))
184 |
185 | Lable_space_2 = QHBoxLayout()
186 |
187 |
188 | Lable_space_2.addWidget(StandardLableTemplate("Quantum Settings:",QSize(120, 50)))
189 | Lable_space_2.addWidget(info_icon(36,36,laut_text.quantum_tooltip_text),alignment=Qt.AlignmentFlag.AlignAbsolute)
190 | Main_Layout.addLayout(Lable_space_2)
191 |
192 | Main_Layout.addLayout(StandardDropdownTemplate('Quantum Def Rate:',['32','64','128','256','512','1024','2048','3072','4096','8192'],laut_events.SetQuantumDefValue,QuantumDefLoaded,laut_text.quantum_def_text))
193 | Main_Layout.addLayout(StandardDropdownTemplate('Quantum Min Rate:',['16','32','64','128','256','512','1024','2048','3072','4096'],laut_events.SetQuantumMinValue,QuantumMinLoaded,laut_text.quantum_min_text))
194 | Main_Layout.addLayout(StandardDropdownTemplate('Quantum Max Rate:',['256','512','1024','2048','3072','4096','8192','16384','32768'],laut_events.SetQuantumMaxValue,QuandumMaxLoaded,laut_text.quantum_max_text))
195 | Main_Layout.addLayout(StandardDropdownTemplate('Quantum Limit Rate:',['256','512','1024','2048','3072','4096','8192','16384','32768'],laut_events.SetQuantumLimitValue,QuantumLimitLoaded,laut_text.quantum_limit_text))
196 | #add warning icon with tooltip about quantums
197 | Main_Layout.addWidget(StandardLableTemplate("Other Settings:",QSize(120, 50)))
198 | Main_Layout.addLayout(StandardDropdownTemplate('Max Link Buffers:',['16','32','48','64'],laut_events.SetBuffersMaxLinkBuffers,LinkBuffersLoaded,laut_text.link_buffers_max_tooltip))
199 | main_header_pw.setAlignment(Qt.AlignmentFlag.AlignCenter)
200 | #link.max-buffers
201 | CurrentTab = QWidget()
202 | Main_Layout.setAlignment(Qt.AlignmentFlag.AlignTop)
203 |
204 | CurrentTab.setLayout(Main_Layout)
205 | ScrollArea = QScrollArea()
206 | ScrollArea.setWidget(CurrentTab)
207 | ScrollArea.setSizePolicy(QSizePolicy.Policy.Maximum,QSizePolicy.Policy.Expanding)
208 | ScrollArea.setWidgetResizable(True)
209 |
210 | return ScrollArea
211 |
212 | def pipewire_pulse_panel(self):
213 | #add warning icon with tooltip about above settings\
214 |
215 | pipewire_pulse_data = self.LoadConfigurationFromFile('pipewire-pulse.conf')
216 | if pipewire_pulse_data is None:
217 | pipewire_pulse_data = {}
218 | ###get Config Values###
219 |
220 | try:
221 | SampleRateLoadedPulse = (
222 | my_coalesce(
223 | pipewire_pulse_data.get('pulse.min.req')
224 | ,pipewire_pulse_data.get('pulse.default.req')
225 | ,pipewire_pulse_data.get('pulse.min.frag')
226 | ,pipewire_pulse_data.get('pulse.default.frag')
227 | ,pipewire_pulse_data.get('pulse.default.tlength')
228 | ,pipewire_pulse_data.get('pulse.min.quantum')
229 | )
230 | )
231 |
232 | if SampleRateLoadedPulse is None:
233 | SampleRateLoadedPulse = "48000"
234 | else:
235 | SampleRateLoadedPulse = SampleRateLoadedPulse.split('/')[1]
236 | except IndexError:
237 | SampleRateLoadedPulse = "48000"
238 | print('Malformed Pipewire-Pulse Configuration')
239 |
240 | PulseRequestMin = pipewire_pulse_data.get('pulse.min.req').split('/')[0] if pipewire_pulse_data.get('pulse.min.req') is not None else "128"
241 | PulseRequestDef = pipewire_pulse_data.get('pulse.default.req').split('/')[0] if pipewire_pulse_data.get('pulse.default.req') is not None else "960"
242 | PulseFragMin = pipewire_pulse_data.get('pulse.min.frag').split('/')[0] if pipewire_pulse_data.get('pulse.min.frag') is not None else "128"
243 | PulseFragDef = pipewire_pulse_data.get('pulse.default.frag').split('/')[0] if pipewire_pulse_data.get('pulse.default.frag') is not None else "96000"
244 | PulseTLenDef = pipewire_pulse_data.get('pulse.default.tlength').split('/')[0] if pipewire_pulse_data.get('pulse.default.tlength') is not None else "96000"
245 | PulseQuantumMin = pipewire_pulse_data.get('pulse.min.quantum').split('/')[0] if pipewire_pulse_data.get('pulse.min.quantum') is not None else "128"
246 | PulseNodesLatency = pipewire_pulse_data.get('node.latency').split('/')[0] if pipewire_pulse_data.get('node.latency') is not None else "1024"
247 | PulseResamplingQuality = pipewire_pulse_data.get('resample.quality') if pipewire_pulse_data.get('resample.quality') is not None else "6"
248 | PulseIdleTimeout = pipewire_pulse_data.get('pulse.idle.timeout') if pipewire_pulse_data.get('pulse.idle.timeout') is not None else "0"
249 | PulseDefFormat = pipewire_pulse_data.get('pulse.default.format') if pipewire_pulse_data.get('pulse.default.format') is not None else "F32"
250 | PulseDefPosition = pipewire_pulse_data.get('pulse.default.position') if pipewire_pulse_data.get('pulse.default.position') is not None else "[FL FR]"
251 |
252 | ###GUI###
253 |
254 | main_header_pulse = StandardLableTemplate(laut_text.main_header_pulse_txt,QSize(200, 40))
255 | main_header_pulse.setProperty("class","Settings_Header")
256 | Main_Layout = QVBoxLayout()
257 | Main_Layout.addWidget(main_header_pulse,alignment=Qt.AlignmentFlag.AlignTop)
258 |
259 | Button_space = QHBoxLayout()
260 |
261 | save_button = StandardButtonTemplate("Save Pipewire-Pulse\nConfiguration",QSize(200, 40),self.SaveConfigurationForPipewirePulse,laut_text.save_button_tooltip)
262 | Button_space.addWidget(save_button)
263 |
264 | Main_Layout.addLayout(Button_space)
265 |
266 |
267 | Lable_space = QHBoxLayout()
268 |
269 | Lable_space = QHBoxLayout()
270 |
271 | Lable_space.addWidget(StandardLableTemplate(laut_text.label_pulse_samples_header,QSize(120, 50)))
272 | Lable_space.addWidget(info_icon(36,36,laut_text.pulse_samples_header_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
273 | Main_Layout.addLayout(Lable_space)
274 |
275 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_sample_rate,['16000','32000','44100','48000','88200','96000','176400','192000','352800','384000'],laut_events.SetPulseSample,SampleRateLoadedPulse,laut_text.pulse_sample_rate_tooltip_text))
276 |
277 | Lable_space2 = QHBoxLayout()
278 |
279 | Lable_space2.addWidget(StandardLableTemplate(laut_text.label_stream_props,QSize(120, 50)))
280 | Lable_space2.addWidget(info_icon(36,36,laut_text.stream_props_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
281 | Main_Layout.addLayout(Lable_space2)
282 |
283 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_nodes_latency_tooltip_text,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetPulseNodesLatency,PulseNodesLatency,laut_text.pulse_nodes_latency_tooltip_text))
284 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_resampling_quality_tooltip_text,['1','2','3','4','5','6','7','8','9','10'],laut_events.SetPulseResamplingQuality,PulseResamplingQuality,laut_text.pulse_resampling_quality_tooltip_text))
285 | Lable_space3 = QHBoxLayout()
286 |
287 | Lable_space3.addWidget(StandardLableTemplate(laut_text.label_buffer_settings,QSize(120, 50)))
288 | Lable_space3.addWidget(info_icon(36,36,laut_text.buffer_settings_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
289 | Main_Layout.addLayout(Lable_space3)
290 |
291 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_req_min_tooltip_text,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetPulseFragMin,PulseRequestMin,laut_text.pulse_req_min_tooltip_text))
292 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_req_def_tooltip_text,['360','480','960','1440','1920','2520','7680','15360'],laut_events.SetPulseFragDef,PulseRequestDef,laut_text.pulse_req_def_tooltip_text))
293 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_frag_min_tooltip_text,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetPulseReqMin,PulseFragMin,laut_text.pulse_frag_min_tooltip_text))
294 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_frag_def_tooltip_text,['16000','32000','44100','48000','88200','96000','176400','192000','352800','384000'],laut_events.SetPulseReqDef,PulseFragDef,laut_text.pulse_frag_def_tooltip_text))
295 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_tlen_tooltip_text,['16000','32000','44100','48000','88200','96000','176400','192000','352800','384000'],laut_events.SetPulseQuantMin,PulseTLenDef,laut_text.pulse_tlen_tooltip_text))
296 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_pulsequantummin_tooltip_text,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetPulseTLen,PulseQuantumMin,laut_text.pulse_pulsequantummin_tooltip_text))
297 | Lable_space4 = QHBoxLayout()
298 |
299 | Lable_space4.addWidget(StandardLableTemplate(laut_text.label_pulse_other_settings,QSize(120, 50)))
300 | Lable_space4.addWidget(info_icon(36,36,laut_text.pulse_other_settings_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
301 | Main_Layout.addLayout(Lable_space4)
302 |
303 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_def_format_tooltip_text,['U8','S16','S16LE','S24','S24LE','F32','F32LE'],laut_events.SetPulseDefaultFormat,PulseDefFormat,laut_text.pulse_def_format_tooltip_text))
304 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_def_position_tooltip_text,QSize(84, 28),laut_events.SetPulseDefaultPositon,PulseDefPosition,laut_text.pulse_def_position_tooltip_text))
305 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_idle_timeout_tooltip_text,QSize(42, 28),laut_events.SetPulseIdleTimeout,PulseIdleTimeout,laut_text.pulse_idle_timeout_tooltip_text))
306 |
307 | Main_Layout.setAlignment(Qt.AlignmentFlag.AlignTop)
308 | main_header_pulse.setAlignment(Qt.AlignmentFlag.AlignCenter)
309 |
310 | CurrentTab = QWidget()
311 | CurrentTab.setLayout(Main_Layout)
312 | ScrollArea = QScrollArea()
313 | ScrollArea.setWidget(CurrentTab)
314 | ScrollArea.setSizePolicy(QSizePolicy.Policy.Maximum,QSizePolicy.Policy.Expanding)
315 | ScrollArea.setWidgetResizable(True)
316 |
317 | return ScrollArea
318 |
319 | def pipewire_jack_panel(self):
320 | pipewire_jack_data = self.LoadConfigurationFromFile('jack.conf')
321 | if pipewire_jack_data is None:
322 | pipewire_jack_data = {}
323 | SampleRateLoadedJack = (
324 | my_coalesce(
325 | pipewire_jack_data.get('node.latency')
326 | ,pipewire_jack_data.get('node.rate')
327 | ,pipewire_jack_data.get('node.quantum')
328 | )
329 | )
330 |
331 | try:
332 | if SampleRateLoadedJack is None:
333 | SampleRateLoadedJack = "48000"
334 | else:
335 | SampleRateLoadedJack = SampleRateLoadedJack.split('/')[1]
336 | except IndexError:
337 | SampleRateLoadedJack = "48000"
338 | print('Malformed Pipewire-Jack Configuration')
339 |
340 | JackNodeLatency = pipewire_jack_data.get('node.latency').split('/')[0] if pipewire_jack_data.get('node.latency') is not None else "1024"
341 |
342 | JackNodeLockQuantum = pipewire_jack_data.get('node.lock-quantum') if pipewire_jack_data.get('node.lock-quantum') is not None else "True"
343 | JackNodeForceQuantum = pipewire_jack_data.get('node.force-quantum') if pipewire_jack_data.get('node.force-quantum') is not None else "0"
344 | JackshowMonitor = pipewire_jack_data.get('jack.show-monitor') if pipewire_jack_data.get('jack.show-monitor') is not None else "True"
345 | JackmergeMonitor = pipewire_jack_data.get('jack.merge-monitor') if pipewire_jack_data.get('jack.merge-monitor') is not None else "True"
346 | JackshowMidi = pipewire_jack_data.get('jack.show-midi') if pipewire_jack_data.get('jack.show-midi') is not None else "True"
347 | JackshortName = pipewire_jack_data.get('jack.short-name') if pipewire_jack_data.get('jack.short-name') is not None else "False"
348 | JackfilterName = pipewire_jack_data.get('jack.filter-name') if pipewire_jack_data.get('jack.filter-name') is not None else "False"
349 | JackfilterChar = pipewire_jack_data.get('jack.filter-char') if pipewire_jack_data.get('jack.filter-char') is not None else "\" \""
350 | JackselfConnect = pipewire_jack_data.get('jack.self-connect-mode') if pipewire_jack_data.get('jack.self-connect-mode') is not None else "allow"
351 | JacklockedProcess = pipewire_jack_data.get('jack.locked-process') if pipewire_jack_data.get('jack.locked-process') is not None else "True"
352 | JackdefaultAs = pipewire_jack_data.get('jack.default-as-system') if pipewire_jack_data.get('jack.default-as-system') is not None else "False"
353 | JackfixMidiEvents = pipewire_jack_data.get('jack.fix-midi-events') if pipewire_jack_data.get('jack.fix-midi-events') is not None else "True"
354 | JackglobalBufferSize = pipewire_jack_data.get('jack.global-buffer-size') if pipewire_jack_data.get('jack.global-buffer-size') is not None else "False"
355 | JackmaxClientPorts = pipewire_jack_data.get('jack.max-client-ports') if pipewire_jack_data.get('jack.max-client-ports') is not None else "768"
356 | JackfillAliases = pipewire_jack_data.get('jack.fill-aliases') if pipewire_jack_data.get('jack.fill-aliases') is not None else "False"
357 | JackwritableInput = pipewire_jack_data.get('jack.writable-input') if pipewire_jack_data.get('jack.writable-input') is not None else "True"
358 |
359 | main_header_jack = StandardLableTemplate(laut_text.main_header_jack_txt,QSize(200, 40))
360 | main_header_jack.setProperty("class","Settings_Header")
361 |
362 |
363 |
364 |
365 | Main_Layout = QVBoxLayout()
366 |
367 |
368 | Main_Layout.addWidget(main_header_jack,alignment=Qt.AlignmentFlag.AlignTop)
369 | main_header_jack.setAlignment(Qt.AlignmentFlag.AlignCenter)
370 |
371 |
372 |
373 | Button_space = QHBoxLayout()
374 |
375 | save_button = StandardButtonTemplate("Save Pipewire-Jack\nConfiguration",QSize(200, 40),self.SaveConfigurationForPipewireJack,laut_text.save_button_tooltip)
376 | Button_space.addWidget(save_button)
377 |
378 | Main_Layout.addLayout(Button_space)
379 |
380 | Lable_space = QHBoxLayout()
381 |
382 | Lable_space.addWidget(StandardLableTemplate(laut_text.label_Jack_samples_header,QSize(120, 50)))
383 | Lable_space.addWidget(info_icon(36,36,laut_text.Jack_samples_header_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
384 | Main_Layout.addLayout(Lable_space)
385 |
386 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_sample_rate,['16000','32000','44100','48000','88200','96000','176400','192000','352800','384000'],laut_events.SetJackSample,SampleRateLoadedJack,laut_text.Jack_sample_rate_tooltip_text))
387 |
388 | Lable_space2 = QHBoxLayout()
389 |
390 | Lable_space2.addWidget(StandardLableTemplate(laut_text.label_Jack_Settings_header,QSize(120, 50)))
391 | Lable_space2.addWidget(info_icon(36,36,laut_text.Jack_Settings_header_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
392 | Main_Layout.addLayout(Lable_space2)
393 |
394 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_jack_JackNodeLatency,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetJackNodeLatency,JackNodeLatency,laut_text.jack_tooltip_text_JackNodeLatency))
395 |
396 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackNodeLockQuantum,laut_events.SetJackNodeLockQuantum,strtobool(JackNodeLockQuantum),laut_text.jack_tooltip_text_JackNodeLockQuantum))
397 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_jack_JackNodeForceQuantum,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetJackNodeQuantum,JackNodeForceQuantum,laut_text.jack_tooltip_text_JackNodeQuantum))
398 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackshowMonitor,laut_events.SetJackshowMonitor,strtobool(JackshowMonitor),laut_text.jack_tooltip_text_JackshowMonitor))
399 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackmergeMonitor,laut_events.SetJackmergeMonitor,strtobool(JackmergeMonitor),laut_text.jack_tooltip_text_JackmergeMonitor))
400 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackshowMidi,laut_events.SetJackshowMidi,strtobool(JackshowMidi),laut_text.jack_tooltip_text_JackshowMidi))
401 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackshortName,laut_events.SetJackshortName,strtobool(JackshortName),laut_text.jack_tooltip_text_JackshortName))
402 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackfilterName,laut_events.SetJackfilterName,strtobool(JackfilterName),laut_text.jack_tooltip_text_JackfilterName))
403 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_jack_JackmaxClientPorts,QSize(84, 28),laut_events.SetJackfilterChar,JackfilterChar,laut_text.jack_tooltip_text_JackfilterChar))
404 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_jack_JackselfConnect,['allow','fail-external','ignore-external','fail-all','ignore-all'],laut_events.SetJackselfConnect,JackselfConnect,laut_text.jack_tooltip_text_JackselfConnect))
405 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JacklockedProcess,laut_events.SetJacklockedProcess,strtobool(JacklockedProcess),laut_text.jack_tooltip_text_JacklockedProcess))
406 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackdefaultAs,laut_events.SetJackdefaultAs,strtobool(JackdefaultAs),laut_text.jack_tooltip_text_JackdefaultAs))
407 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackfixMidiEvents,laut_events.SetJackfixMidiEvents,strtobool(JackfixMidiEvents),laut_text.jack_tooltip_text_JackfixMidiEvents))
408 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackglobalBufferSize,laut_events.SetJackglobalBufferSize,strtobool(JackglobalBufferSize),laut_text.jack_tooltip_text_JackglobalBufferSize))
409 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_jack_JackmaxClientPorts,QSize(84, 28),laut_events.SetJackmaxClientPorts,JackmaxClientPorts,laut_text.jack_tooltip_text_JackmaxClientPorts))
410 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackfillAliases,laut_events.SetJackfillAliases,strtobool(JackfillAliases),laut_text.jack_tooltip_text_JackfillAliases))
411 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_jack_JackwritableInput,laut_events.SetJackwritableInput,strtobool(JackwritableInput),laut_text.jack_tooltip_text_JackwritableInput))
412 |
413 | Main_Layout.setAlignment(Qt.AlignmentFlag.AlignTop)
414 | CurrentTab = QWidget()
415 | CurrentTab.setLayout(Main_Layout)
416 | ScrollArea = QScrollArea()
417 | ScrollArea.setWidget(CurrentTab)
418 | ScrollArea.setSizePolicy(QSizePolicy.Policy.Maximum,QSizePolicy.Policy.Expanding)
419 | ScrollArea.setWidgetResizable(True)
420 |
421 | return ScrollArea
422 |
423 | def pipewire_alsa_panel(self):
424 |
425 | pipewire_clients_data = self.LoadConfigurationFromFile('client-rt.conf')
426 | if pipewire_clients_data is None:
427 | pipewire_clients_data = {}
428 |
429 | defSampleRateLoadedClients = pipewire_clients_data.get('node.latency')
430 |
431 | try:
432 | if defSampleRateLoadedClients is None:
433 | defSampleRateLoadedClients = "48000"
434 | else:
435 | defSampleRateLoadedClients = defSampleRateLoadedClients.split('/')[1]
436 | except IndexError:
437 | defSampleRateLoadedClients = "48000"
438 | print('Malformed Pipewire-clients-rt Configuration')
439 |
440 | main_header_alsa = StandardLableTemplate(laut_text.main_header_clients_txt,QSize(200, 40))
441 | main_header_alsa.setProperty("class","Settings_Header")
442 | Main_Layout = QVBoxLayout()
443 | Main_Layout.addWidget(main_header_alsa,alignment=Qt.AlignmentFlag.AlignTop)
444 |
445 | Button_space = QHBoxLayout()
446 |
447 | save_button = StandardButtonTemplate("Save Pipewire-Clients\nConfiguration",QSize(200, 40),self.SaveConfigurationForPipewireClients,laut_text.save_button_tooltip)
448 | Button_space.addWidget(save_button)
449 |
450 | Main_Layout.addLayout(Button_space)
451 |
452 |
453 | defClientsNodeLatency = pipewire_clients_data.get('node.latency').split('/')[0] if pipewire_clients_data.get('node.latency') is not None else "1024"
454 | defClientsNodeAutoconnect = pipewire_clients_data.get('node.autoconnect') if pipewire_clients_data.get('node.autoconnect') is not None else "true"
455 | defClientsResampleQuality = pipewire_clients_data.get('resample.quality') if pipewire_clients_data.get('resample.quality') is not None else "6"
456 | defClientsChannelmixNormalize = pipewire_clients_data.get('channelmix.normalize') if pipewire_clients_data.get('channelmix.normalize') is not None else "false"
457 | defClientsChannelmixMixlfe = pipewire_clients_data.get('channelmix.mix-lfe') if pipewire_clients_data.get('channelmix.mix-lfe') is not None else "true"
458 | defClientsChannelmixUpmix = pipewire_clients_data.get('channelmix.upmix') if pipewire_clients_data.get('channelmix.upmix') is not None else "true"
459 | defClientsChannelmixUpmixMethod = pipewire_clients_data.get('channelmix.upmix-method') if pipewire_clients_data.get('channelmix.upmix-method') is not None else "psd"
460 | defClientsChannelmixLfecutoff = pipewire_clients_data.get('channelmix.lfe-cutoff') if pipewire_clients_data.get('channelmix.lfe-cutoff') is not None else "150"
461 | defClientsChannelmixFccutoff = pipewire_clients_data.get('channelmix.fc-cutoff') if pipewire_clients_data.get('channelmix.fc-cutoff') is not None else "12000"
462 | defClientsChannelmixReardelay = pipewire_clients_data.get('channelmix.rear-delay') if pipewire_clients_data.get('channelmix.rear-delay') is not None else "12.0"
463 | defClientsChannelmixStereowiden = pipewire_clients_data.get('channelmix.stereo-widen') if pipewire_clients_data.get('channelmix.stereo-widen') is not None else "0.0"
464 | defClientsChannelmixHilberttaps = pipewire_clients_data.get('channelmix.hilbert-taps') if pipewire_clients_data.get('channelmix.hilbert-taps') is not None else "0"
465 | defClientsDitherNoise = pipewire_clients_data.get('dither.noise') if pipewire_clients_data.get('dither.noise') is not None else "0"
466 |
467 |
468 | Lable_space = QHBoxLayout()
469 |
470 | Lable_space.addWidget(StandardLableTemplate(laut_text.label_Clients_samples_header,QSize(120, 50)))
471 | Lable_space.addWidget(info_icon(36,36,laut_text.label_Clients_samples_header_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
472 | Main_Layout.addLayout(Lable_space)
473 |
474 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_SampleRateLoadedClients,['16000','32000','44100','48000','88200','96000','176400','192000','352800','384000'],laut_events.SetSampleRateLoadedClients,defSampleRateLoadedClients,laut_text.clients_tooltip_text_SampleRateLoadedClients))
475 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_ClientsNodeLatency,['64','128','256','512','1024','2048','4096','8192','16384'],laut_events.SetClientsNodeLatency,defClientsNodeLatency,laut_text.clients_tooltip_text_ClientsNodeLatency))
476 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_ClientsResampleQuality,['1','2','3','4','5','6','7','8','9','10'],laut_events.SetClientsResampleQuality,defClientsResampleQuality,laut_text.clients_tooltip_text_ClientsResampleQuality))
477 |
478 | Lable_space = QHBoxLayout()
479 |
480 | Lable_space.addWidget(StandardLableTemplate(laut_text.label_Clients_various_header,QSize(120, 50)))
481 | Lable_space.addWidget(info_icon(36,36,laut_text.label_Clients_various_header_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
482 | Main_Layout.addLayout(Lable_space)
483 |
484 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_ClientsNodeAutoconnect,laut_events.SetClientsNodeAutoconnect,strtobool(defClientsNodeAutoconnect),laut_text.clients_tooltip_text_ClientsNodeAutoconnect))
485 | #mu
486 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_ClientsChannelmixNormalize,laut_events.SetClientsChannelmixNormalize,strtobool(defClientsChannelmixNormalize),laut_text.clients_tooltip_text_ClientsChannelmixNormalize))
487 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_ClientsChannelmixMixlfe,laut_events.SetClientsChannelmixMixlfe,strtobool(defClientsChannelmixMixlfe),laut_text.clients_tooltip_text_ClientsChannelmixMixlfe))
488 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_ClientsChannelmixUpmix,laut_events.SetClientsChannelmixUpmix,strtobool(defClientsChannelmixUpmix),laut_text.clients_tooltip_text_ClientsChannelmixUpmix))
489 |
490 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_ClientsChannelmixUpmixMethod,['psd','none','simple'],laut_events.SetClientsChannelmixUpmixMethod,defClientsChannelmixUpmixMethod,laut_text.clients_tooltip_text_ClientsChannelmixUpmixMethod))
491 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsChannelmixLfecutoff,QSize(84, 28),laut_events.SetClientsChannelmixLfecutoff,defClientsChannelmixLfecutoff,laut_text.clients_tooltip_text_ClientsChannelmixLfecutoff))
492 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsChannelmixFccutoff,QSize(84, 28),laut_events.SetClientsChannelmixFccutoff,defClientsChannelmixFccutoff,laut_text.clients_tooltip_text_ClientsChannelmixFccutoff))
493 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsChannelmixReardelay,QSize(84, 28),laut_events.SetClientsChannelmixReardelay,defClientsChannelmixReardelay,laut_text.clients_tooltip_text_ClientsChannelmixReardelay))
494 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsChannelmixStereowiden,QSize(84, 28),laut_events.SetClientsChannelmixStereowiden,defClientsChannelmixStereowiden,laut_text.clients_tooltip_text_ClientsChannelmixStereowiden))
495 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsChannelmixHilberttaps,QSize(84, 28),laut_events.SetClientsChannelmixHilberttaps,defClientsChannelmixHilberttaps,laut_text.clients_tooltip_text_ClientsChannelmixHilberttaps))
496 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsDitherNoise,QSize(84, 28),laut_events.SetClientsDitherNoise,defClientsDitherNoise,laut_text.clients_tooltip_text_ClientsDitherNoise))
497 |
498 | Lable_space = QHBoxLayout()
499 |
500 | Lable_space.addWidget(StandardLableTemplate(laut_text.label_Alsa_various_header,QSize(120, 50)))
501 | Lable_space.addWidget(info_icon(36,36,laut_text.label_Alsa_various_header_tooltip),alignment=Qt.AlignmentFlag.AlignAbsolute)
502 | Main_Layout.addLayout(Lable_space)
503 |
504 | main_header_alsa.setAlignment(Qt.AlignmentFlag.AlignCenter)
505 |
506 | defClientsAlsaDeny = pipewire_clients_data.get('alsa.deny') if pipewire_clients_data.get('alsa.deny') is not None else "false"
507 | #defClientsAlsaAccess = pipewire_clients_data.get('alsa.access') if pipewire_clients_data.get('alsa.access') is not None else "[ MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED ]"
508 | defClientsAlsaFormat = pipewire_clients_data.get('alsa.format') if pipewire_clients_data.get('alsa.format') is not None else "[ FLOAT S32 S24 S24_3 S16 U8 ]"
509 | defClientsAlsaRate = pipewire_clients_data.get('alsa.rate') if pipewire_clients_data.get('alsa.rate') is not None else "{ min=1 max=384000 }"
510 | defClientsAlsaChannels = pipewire_clients_data.get('alsa.channels') if pipewire_clients_data.get('alsa.channels') is not None else "{ min=1 max=64 }"
511 | defClientsAlsaPeriodbytes = pipewire_clients_data.get('alsa.period-bytes') if pipewire_clients_data.get('alsa.period-bytes') is not None else "{ min=128 max=2097152 }"
512 | defClientsAlsaBufferbytes = pipewire_clients_data.get('alsa.buffer-bytes') if pipewire_clients_data.get('alsa.buffer-bytes') is not None else "{ min=256 max=4194304 }"
513 | defClientsAlsaVolumeMethod = pipewire_clients_data.get('alsa.volume-method') if pipewire_clients_data.get('alsa.volume-method') is not None else "cubic"
514 |
515 | Main_Layout.addLayout(StandardCheckboxTemplate(laut_text.label_ClientsAlsaDeny,laut_events.SetClientsAlsaDeny,strtobool(defClientsAlsaDeny),laut_text.clients_tooltip_text_ClientsAlsaDeny))
516 | #Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsAlsaAccess,QSize(200, 28),laut_events.SetClientsAlsaAccess,defClientsAlsaAccess,laut_text.clients_tooltip_text_ClientsAlsaAccess))
517 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsAlsaFormat,QSize(200, 28),laut_events.SetClientsAlsaFormat,defClientsAlsaFormat,laut_text.clients_tooltip_text_ClientsAlsaFormat))
518 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsAlsaRate,QSize(128, 28),laut_events.SetClientsAlsaRate,defClientsAlsaRate,laut_text.clients_tooltip_text_ClientsAlsaRate))
519 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsAlsaChannels,QSize(128, 28),laut_events.SetClientsAlsaChannels,defClientsAlsaChannels,laut_text.clients_tooltip_text_ClientsAlsaChannels))
520 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsAlsaPeriodbytes,QSize(128, 28),laut_events.SetClientsAlsaPeriodbytes,defClientsAlsaPeriodbytes,laut_text.clients_tooltip_text_ClientsAlsaPeriodbytes))
521 | Main_Layout.addLayout(StandardInputTemplate(laut_text.label_ClientsAlsaBufferbytes,QSize(128, 28),laut_events.SetClientsAlsaBufferbytes,defClientsAlsaBufferbytes,laut_text.clients_tooltip_text_ClientsAlsaBufferbytes))
522 | Main_Layout.addLayout(StandardDropdownTemplate(laut_text.label_ClientsAlsaVolumeMethod,['cubic','linear'],laut_events.SetClientsAlsaVolumeMethod,defClientsAlsaVolumeMethod,laut_text.clients_tooltip_text_ClientsAlsaVolumeMethod))
523 | Main_Layout.setAlignment(Qt.AlignmentFlag.AlignTop)
524 |
525 | CurrentTab = QWidget()
526 | CurrentTab.setLayout(Main_Layout)
527 | ScrollArea = QScrollArea()
528 | ScrollArea.setWidget(CurrentTab)
529 | ScrollArea.setSizePolicy(QSizePolicy.Policy.Maximum,QSizePolicy.Policy.Expanding)
530 | ScrollArea.setWidgetResizable(True)
531 |
532 | return ScrollArea
533 |
534 |
535 |
536 |
537 | #alsa.deny = false
538 | #alsa.access = [ MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED ]
539 | #alsa.format = [ FLOAT S32 S24 S24_3 S16 U8 ]
540 | #alsa.rate = { min=1 max=384000 } # or [ 44100 48000 .. ]
541 | #alsa.channels = { min=1 max=64 } # or [ 2 4 6 .. ]
542 | #alsa.period-bytes = { min=128 max=2097152 } # or [ 128 256 1024 .. ]
543 | #alsa.buffer-bytes = { min=256 max=4194304 } # or [ 256 512 4096 .. ]
544 |
545 | #alsa.volume-method = cubic # linear, cubic
546 |
547 |
548 | def devices_panel(self):
549 | main_layout = QHBoxLayout()
550 | AllDevices = GetDevicesBasicInfo()
551 | for Device in AllDevices:
552 | device_sub_layout = QVBoxLayout()
553 |
554 | device_text = QPlainTextEdit()
555 | device_text.setReadOnly(True)
556 | device_text.setProperty("class","device_text")
557 | device_sub_text = QPlainTextEdit()
558 | device_sub_text.setReadOnly(True)
559 | device_sub_text.setProperty("class","device_sub_text")
560 |
561 | device_name_label = QLabel()
562 | main_label = QLabel()
563 | properties_label = QLabel()
564 | main_label.setText("Device:")
565 | properties_label.setText("Properties:")
566 | device_name_label.setText(Device["device.description"].replace("\"",""))
567 |
568 | device_sub_layout.addWidget(main_label)
569 | device_sub_layout.addWidget(device_name_label)
570 |
571 | for key,DeviceParam in Device.items():
572 | device_text.appendPlainText(key + ": " + DeviceParam)
573 |
574 | Properties = GetDeviceCurrentProperties(Device)
575 | for Desc in Properties:
576 | for PropertyName,PropertyValue in Desc.items():
577 | device_sub_text.appendPlainText(PropertyName + ": " + PropertyValue)
578 |
579 | device_sub_layout.addWidget(device_text)
580 | device_sub_layout.addWidget(properties_label)
581 | device_sub_layout.addWidget(device_sub_text)
582 | main_layout.addLayout(device_sub_layout)
583 | return main_layout
584 |
585 | ### subpanels
586 | def menu_buttons(self):
587 | save_button = StandardButtonTemplate("Save All\nConfiguration",QSize(100, 50),self.SaveConfiguration,laut_text.save_button_tooltip)
588 | reload_button = StandardButtonTemplate("Reload\nConfiguration",QSize(100, 50),self.ReloadConfiguration,laut_text.reload_button_tooltip)
589 | apply_button = StandardButtonTemplate("Apply\nConfiguration",QSize(100, 50),self.ApplyConfiguration,laut_text.apply_button_tooltip)
590 |
591 | whole = QHBoxLayout()
592 | whole.addWidget(save_button,alignment=Qt.AlignmentFlag.AlignLeft)
593 | whole.addWidget(reload_button,alignment=Qt.AlignmentFlag.AlignLeft)
594 | whole.addWidget(apply_button,alignment=Qt.AlignmentFlag.AlignLeft)
595 |
596 | return whole
597 |
598 | def submenu_version_display(self):
599 |
600 | main_layout = QVBoxLayout()
601 | versions_layout = QHBoxLayout()
602 |
603 | versions_layout.addWidget(AbsLableTemplate((laut_text.version_current + " " + str(GetPWVersion())),QSize(100, 24)))
604 | versions_layout.addWidget(AbsLableTemplate((laut_text.version_newest + " " + str(GetMostUpToDateVersion())),QSize(100, 24)))
605 | main_layout.addLayout(versions_layout)
606 | main_layout.addWidget(AbsLableTemplate((laut_text.version_disclamer),QSize(100, 24)))
607 |
608 | return main_layout
609 |
610 | ### Method & Functions ##
611 | #Cross File Methods
612 |
613 | def LoadConfigurationFromFile(self,configuration):
614 | if configuration == 'pipewire.conf':
615 | sub_configuration = 'pipewire_basic_properties.conf'
616 | if subConfigExitsCheck(sub_configuration,'pipewire.conf.d/'):
617 | prefix = GetConfigurationPath()
618 | prefix = prefix + 'pipewire.conf.d/'
619 | data = LoadPwJson(prefix,sub_configuration)
620 | if configuration == 'pipewire.conf':
621 | properites_list = data[data.index('context.properties')+1]
622 |
623 | RemoveOverrideProperties(properites_list)
624 |
625 | return ParsePropertiesIntoDict(properites_list)
626 |
627 | elif ConfigExitsCheck(configuration) is True:
628 | prefix = GetConfigurationPath()
629 | data = LoadPwJson(prefix,configuration)
630 | if configuration == 'pipewire.conf':
631 | properites_list = data[data.index('context.properties')+1]
632 |
633 | RemoveOverrideProperties(properites_list)
634 |
635 | return ParsePropertiesIntoDict(properites_list)
636 |
637 | if configuration == 'pipewire-pulse.conf':
638 | sub_configuration = 'pipewire-pulse_basic_properties.conf'
639 | if subConfigExitsCheck(sub_configuration,'pipewire-pulse.conf.d/'):
640 | prefix = GetConfigurationPath()
641 | prefix = prefix + 'pipewire-pulse.conf.d/'
642 | data = LoadPwJson(prefix,sub_configuration)
643 | stream_properties = data[data.index('stream.properties')+1]
644 | pulse_properties = data[data.index('pulse.properties')+1]
645 |
646 | RemoveOverrideProperties(pulse_properties)
647 |
648 | properites_list = pulse_properties + stream_properties
649 |
650 | return ParsePropertiesIntoDict(properites_list)
651 | elif ConfigExitsCheck(configuration) is True:
652 | prefix = GetConfigurationPath()
653 | data = LoadPwJson(prefix,configuration)
654 | stream_properties = data[data.index('stream.properties')+1]
655 | pulse_properties = data[data.index('pulse.properties')+1]
656 |
657 | RemoveOverrideProperties(pulse_properties)
658 |
659 | properites_list = pulse_properties + stream_properties
660 |
661 | return ParsePropertiesIntoDict(properites_list)
662 |
663 | if configuration == 'jack.conf':
664 | sub_configuration = 'jack_basic_properties.conf'
665 | if subConfigExitsCheck(sub_configuration,'pipewire-jack.conf.d/'):
666 | prefix = GetConfigurationPath()
667 | prefix = prefix + 'pipewire-jack.conf.d/'
668 | data = LoadPwJson(prefix,sub_configuration)
669 | jack_properties = data[data.index('jack.properties')+1]
670 |
671 | RemoveOverrideProperties(jack_properties)
672 |
673 | return ParsePropertiesIntoDict(jack_properties)
674 |
675 | elif ConfigExitsCheck(configuration) is True:
676 | prefix = GetConfigurationPath()
677 | data = LoadPwJson(prefix,configuration)
678 | jack_properties = data[data.index('jack.properties')+1]
679 |
680 | RemoveOverrideProperties(jack_properties)
681 |
682 | return ParsePropertiesIntoDict(jack_properties)
683 |
684 | if configuration == 'client-rt.conf':
685 | sub_configuration = 'client_basic_properties.conf'
686 | if subConfigExitsCheck(sub_configuration,'pipewire-client.conf.d/'):
687 | prefix = GetConfigurationPath()
688 | prefix = prefix + 'pipewire-client.conf.d/'
689 | data = LoadPwJson(prefix,sub_configuration)
690 | client_properties = data[data.index('stream.properties')+1]
691 | alsa_properties = data[data.index('alsa.properties')+1]
692 |
693 | alsa_rate_dict = { "alsa.rate": data[data.index('alsa.rate')+1]}
694 | alsa_channels_dict = { "alsa.channels": data[data.index('alsa.channels')+1]}
695 | alsa_period_dict = { "alsa.period-bytes": data[data.index('alsa.period-bytes')+1]}
696 | alsa_buffer_dict = { "alsa.buffer-bytes": data[data.index('alsa.buffer-bytes')+1]}
697 | #alsa.rate =
698 | #alsa.channels =
699 | #alsa.period-bytes
700 | #alsa.buffer-bytes
701 | combined_alsa_specific_props = alsa_rate_dict+alsa_channels_dict+alsa_period_dict+alsa_buffer_dict
702 |
703 |
704 | RemoveOverrideProperties(client_properties)
705 |
706 | properites_list = client_properties + alsa_properties + combined_alsa_specific_props
707 |
708 | return ParsePropertiesIntoDict(properites_list)
709 |
710 | elif ConfigExitsCheck(configuration) is True:
711 | prefix = GetConfigurationPath()
712 | data = LoadPwJson(prefix,configuration)
713 | client_properties = data[data.index('stream.properties')+1]
714 | alsa_properties = data[data.index('alsa.properties')+1]
715 |
716 | RemoveOverrideProperties(client_properties)
717 | properites_list = client_properties + alsa_properties
718 |
719 | return ParsePropertiesIntoDict(properites_list)
720 |
721 |
722 | def SaveConfigurationForPipewire(self):
723 | working_prefix = GetConfigurationPath() + 'pipewire.conf.d'
724 | SampleRate = laut_events.SampleRate if hasattr(laut_events,"SampleRate") else "48000"
725 | SampleAllowedRates = laut_events.SampleAllowedRates if hasattr(laut_events,"SampleAllowedRates") else "[ 44100 48000 88200 96000 176400 192000 352800 384000 ]"
726 | QuantumRate = laut_events.QuantumRate if hasattr(laut_events,"QuantumRate") else "2048"
727 | QuantumRate_min = laut_events.QuantumRate_min if hasattr(laut_events,"QuantumRate_min") else "512"
728 | QuantumRate_max = laut_events.QuantumRate_max if hasattr(laut_events,"QuantumRate_max") else "4096"
729 | QuantumRate_limit = laut_events.QuantumRate_limit if hasattr(laut_events,"QuantumRate_limit") else "8192"
730 | LinkBuffers_Max = laut_events.LinkBuffers_Max if hasattr(laut_events,"LinkBuffers_Max") else "16"
731 |
732 | parameters_list = {
733 | 'clock-rate': SampleRate
734 | ,'allowed-rates': SampleAllowedRates
735 | ,'quantum-def': QuantumRate
736 | ,'quantum-min': QuantumRate_min
737 | ,'quantum-max': QuantumRate_max
738 | ,'quantum-limit': QuantumRate_limit
739 | ,'max-buffers': LinkBuffers_Max
740 | }
741 |
742 |
743 | to_be_saved = CreateConfigFilePipeWire(parameters_list)
744 |
745 | if not os.path.exists(working_prefix):
746 | os.makedirs(working_prefix)
747 |
748 | with open(working_prefix + '/pipewire_basic_properties.conf', 'w') as file:
749 | file.write(to_be_saved)
750 |
751 | def SaveConfigurationForPipewirePulse(self):
752 | working_prefix = GetConfigurationPath() + 'pipewire-pulse.conf.d/'
753 | PulseSample = laut_events.PulseSample if hasattr(laut_events,"PulseSample") else "48000"
754 | PulseFragMin = laut_events.PulseFragMin if hasattr(laut_events,"PulseFragMin") else "128"
755 | PulseFragDef = laut_events.PulseFragDef if hasattr(laut_events,"PulseFragDef") else "960"
756 | PulseReqMin = laut_events.PulseReqMin if hasattr(laut_events,"PulseReqMin") else "128"
757 | PulseReqDef = laut_events.PulseReqDef if hasattr(laut_events,"PulseReqDef") else "96000"
758 | PulseQuantMin = laut_events.PulseQuantMin if hasattr(laut_events,"PulseQuantMin") else "96000"
759 | PulseTLen = laut_events.PulseTLen if hasattr(laut_events,"PulseTLen") else "128"
760 | PulseNodesLatency = laut_events.PulseNodesLatency if hasattr(laut_events,"PulseNodesLatency") else "1024"
761 | PulseResamplingQuality = laut_events.PulseResamplingQuality if hasattr(laut_events,"PulseResamplingQuality") else "6"
762 | PulseDefaultFormat = laut_events.PulseDefaultFormat if hasattr(laut_events,"PulseDefaultFormat") else "F32"
763 | PulseDefaultPositon = laut_events.PulseDefaultPositon if hasattr(laut_events,"PulseDefaultPositon") else "[FR FL]"
764 | PulseIdleTimeout = laut_events.PulseIdleTimeout if hasattr(laut_events,"PulseIdleTimeout") else "0"
765 |
766 |
767 | parameters_list = {
768 | 'arbitrary-sampling-param': PulseSample
769 | ,'pulse-min-req': PulseFragMin
770 | ,'pulse-default-req': PulseFragDef
771 | ,'pulse-min-frag': PulseReqMin
772 | ,'pulse-default-frag': PulseReqDef
773 | ,'pulse-default-tlength': PulseQuantMin
774 | ,'pulse-min-quantum': PulseTLen
775 | ,'node-latency-param': PulseNodesLatency
776 | ,'resample-quality-param': PulseResamplingQuality
777 | ,'pulse-idle-timeout': PulseDefaultFormat
778 | ,'pulse-default-format': PulseDefaultPositon
779 | ,'pulse-default-position': PulseIdleTimeout
780 | }
781 |
782 | to_be_saved = CreateConfigFilePipeWirePulse(parameters_list)
783 |
784 | if not os.path.exists(working_prefix):
785 | os.makedirs(working_prefix)
786 |
787 | with open(working_prefix + '/pulse_basic_properties.conf', 'w') as file:
788 | file.write(to_be_saved)
789 |
790 | def SaveConfigurationForPipewireJack(self):
791 | working_prefix = GetConfigurationPath() + 'pipewire-jack.conf.d/'
792 | JackSample = laut_events.JackSample if hasattr(laut_events,"JackSample") else "48000"
793 | JackNodeLatency = laut_events.JackNodeLatency if hasattr(laut_events,"JackNodeLatency") else "1024"
794 | JackNodeRate = laut_events.JackNodeRate if hasattr(laut_events,"JackNodeRate") else "1"
795 |
796 | JackNodeLockQuantum = laut_events.JackNodeLockQuantum if hasattr(laut_events,"JackNodeLockQuantum") else "True"
797 | JackNodeForceQuantum = laut_events.JackNodeForceQuantum if hasattr(laut_events,"JackNodeForceQuantum") else "0"
798 | JackshowMonitor = laut_events.JackshowMonitor if hasattr(laut_events,"JackshowMonitor") else "True"
799 | JackmergeMonitor = laut_events.JackmergeMonitor if hasattr(laut_events,"JackmergeMonitor") else "True"
800 | JackshowMidi = laut_events.JackshowMidi if hasattr(laut_events,"JackshowMidi") else "True"
801 | JackshortName = laut_events.JackshortName if hasattr(laut_events,"JackshortName") else "False"
802 | JackfilterName = laut_events.JackfilterName if hasattr(laut_events,"JackfilterName") else "False"
803 | JackfilterChar = laut_events.JackfilterChar if hasattr(laut_events,"JackfilterChar") else "\" \""
804 | JackselfConnect = laut_events.JackselfConnect if hasattr(laut_events,"JackselfConnect") else "allow"
805 | JacklockedProcess = laut_events.JacklockedProcess if hasattr(laut_events,"JacklockedProcess") else "True"
806 | JackdefaultAs = laut_events.JackdefaultAs if hasattr(laut_events,"JackdefaultAs") else "False"
807 | JackfixMidiEvents = laut_events.JackfixMidiEvents if hasattr(laut_events,"JackfixMidiEvents") else "True"
808 | JackglobalBufferSize = laut_events.JackglobalBufferSize if hasattr(laut_events,"JackglobalBufferSize") else "False"
809 | JackmaxClientPorts = laut_events.JackmaxClientPorts if hasattr(laut_events,"JackmaxClientPorts") else "768"
810 | JackfillAliases = laut_events.JackfillAliases if hasattr(laut_events,"JackfillAliases") else "False"
811 | JackwritableInput = laut_events.JackwritableInput if hasattr(laut_events,"JackwritableInput") else "True"
812 |
813 | parameters_list = {
814 | "arbitrary-sampling-param": JackSample
815 | ,"node.latency": JackNodeLatency
816 | ,"node.rate": JackNodeRate
817 | ,"node.lock-quantum": JackNodeLockQuantum
818 | ,"node.force-quantum": JackNodeForceQuantum
819 | ,"jack.show-monitor": JackshowMonitor
820 | ,"jack.merge-monitor": JackmergeMonitor
821 | ,"jack.show-midi": JackshowMidi
822 | ,"jack.short-name": JackshortName
823 | ,"jack.filter-name": JackfilterName
824 | ,"jack.filter-char": JackfilterChar
825 | ,"jack.self-connect-mode": JackselfConnect
826 | ,"jack.locked-process": JacklockedProcess
827 | ,"jack.default-as-system": JackdefaultAs
828 | ,"jack.fix-midi-events": JackfixMidiEvents
829 | ,"jack.global-buffer-size": JackglobalBufferSize
830 | ,"jack.max-client-ports": JackmaxClientPorts
831 | ,"jack.fill-aliases": JackfillAliases
832 | ,"jack.writable-input": JackwritableInput
833 | }
834 |
835 | to_be_saved = CreateConfigFilePipeWireJack(parameters_list)
836 |
837 | if not os.path.exists(working_prefix):
838 | os.makedirs(working_prefix)
839 |
840 | with open(working_prefix + '/jack_basic_properties.conf', 'w') as file:
841 | file.write(to_be_saved)
842 |
843 | def SaveConfigurationForPipewireClients(self):
844 | working_prefix = GetConfigurationPath() + 'pipewire-clients.conf.d/'
845 |
846 | SampleRateLoadedClients = laut_events.SampleRateLoadedClients if hasattr(laut_events,"SampleRateLoadedClients") else "48000"
847 | ClientsNodeLatency = laut_events.ClientsNodeLatency if hasattr(laut_events,"ClientsNodeLatency") else "1024"
848 | ClientsResampleQuality = laut_events.ClientsResampleQuality if hasattr(laut_events,"ClientsResampleQuality") else "6"
849 | ClientsChannelmixUpmixMethod = laut_events.ClientsChannelmixUpmixMethod if hasattr(laut_events,"ClientsChannelmixUpmixMethod") else "psd"
850 | ClientsChannelmixLfecutoff = laut_events.ClientsChannelmixLfecutoff if hasattr(laut_events,"ClientsChannelmixLfecutoff") else "150"
851 | ClientsChannelmixFccutoff = laut_events.ClientsChannelmixFccutoff if hasattr(laut_events,"ClientsChannelmixFccutoff") else "12000"
852 | ClientsChannelmixReardelay = laut_events.ClientsChannelmixReardelay if hasattr(laut_events,"ClientsChannelmixReardelay") else "12.0"
853 | ClientsChannelmixStereowiden = laut_events.ClientsChannelmixStereowiden if hasattr(laut_events,"ClientsChannelmixStereowiden") else "0.0"
854 | ClientsChannelmixHilberttaps = laut_events.ClientsChannelmixHilberttaps if hasattr(laut_events,"ClientsChannelmixHilberttaps") else "0"
855 | ClientsDitherNoise = laut_events.ClientsDitherNoise if hasattr(laut_events,"ClientsDitherNoise") else "0"
856 | ClientsNodeAutoconnect = laut_events.ClientsNodeAutoconnect if hasattr(laut_events,"ClientsNodeAutoconnect") else "true"
857 | ClientsChannelmixNormalize = laut_events.ClientsChannelmixNormalize if hasattr(laut_events,"ClientsChannelmixNormalize") else "false"
858 | ClientsChannelmixMixlfe = laut_events.ClientsChannelmixMixlfe if hasattr(laut_events,"ClientsChannelmixMixlfe") else "true"
859 | ClientsChannelmixUpmix = laut_events.ClientsChannelmixUpmix if hasattr(laut_events,"ClientsChannelmixUpmix") else "true"
860 | ClientsAlsaDeny = laut_events.ClientsAlsaDeny if hasattr(laut_events,"ClientsAlsaDeny") else "false"
861 | #ClientsAlsaAccess = laut_events.ClientsAlsaAccess if hasattr(laut_events,"ClientsAlsaAccess") else ""
862 | ClientsAlsaFormat = laut_events.ClientsAlsaFormat if hasattr(laut_events,"ClientsAlsaFormat") else "[ FLOAT S32 S24 S24_3 S16 U8 ]"
863 | ClientsAlsaRate = laut_events.ClientsAlsaRate if hasattr(laut_events,"ClientsAlsaRate") else "{ min=1 max=384000 }"
864 | ClientsAlsaChannels = laut_events.ClientsAlsaChannels if hasattr(laut_events,"ClientsAlsaChannels") else "{ min=1 max=64 }"
865 | ClientsAlsaPeriodbytes = laut_events.ClientsAlsaPeriodbytes if hasattr(laut_events,"ClientsAlsaPeriodbytes") else "{ min=128 max=2097152 }"
866 | ClientsAlsaBufferbytes = laut_events.ClientsAlsaBufferbytes if hasattr(laut_events,"ClientsAlsaBufferbytes") else "{ min=256 max=4194304 }"
867 | ClientsAlsaVolumeMethod = laut_events.ClientsAlsaVolumeMethod if hasattr(laut_events,"ClientsAlsaVolumeMethod") else "cubic"
868 |
869 | parameters_list = {
870 | "arbitrary-sampling-param": SampleRateLoadedClients
871 | ,"node.latency": ClientsNodeLatency
872 | ,"node.autoconnect": ClientsResampleQuality
873 | ,"resample.quality": ClientsChannelmixUpmixMethod
874 | ,"channelmix.normalize": ClientsChannelmixLfecutoff
875 | ,"channelmix.mix-lfe": ClientsChannelmixFccutoff
876 | ,"channelmix.upmix": ClientsChannelmixReardelay
877 | ,"channelmix.upmix-method": ClientsChannelmixStereowiden
878 | ,"channelmix.lfe-cutoff": ClientsChannelmixHilberttaps
879 | ,"channelmix.fc-cutoff": ClientsDitherNoise
880 | ,"channelmix.rear-delay": ClientsNodeAutoconnect
881 | ,"channelmix.stereo-widen": ClientsChannelmixNormalize
882 | ,"channelmix.hilbert-taps": ClientsChannelmixMixlfe
883 | ,"dither.noise": ClientsChannelmixUpmix
884 | ,"alsa.deny": ClientsAlsaDeny
885 | #,"alsa.access": ClientsAlsaAccess
886 | ,"alsa.format": ClientsAlsaFormat
887 | ,"alsa.rate": ClientsAlsaRate
888 | ,"alsa.channels": ClientsAlsaChannels
889 | ,"alsa.period-bytes": ClientsAlsaPeriodbytes
890 | ,"alsa.buffer-bytes": ClientsAlsaBufferbytes
891 | ,"alsa.volume-method": ClientsAlsaVolumeMethod
892 | }
893 |
894 | to_be_saved = CreateConfigFilePipeWireClients(parameters_list)
895 |
896 | if not os.path.exists(working_prefix):
897 | os.makedirs(working_prefix)
898 |
899 | with open(working_prefix + '/clients_basic_properties.conf', 'w') as file:
900 | file.write(to_be_saved)
901 |
902 | ### Actions
903 | def SaveCurrentConfig(self):
904 | self.SaveConfigurationForPipewire()
905 | self.SaveConfigurationForPipewirePulse()
906 | self.SaveConfigurationForPipewireJack()
907 | self.SaveConfigurationForPipewireClients()
908 |
909 | def RefreshCurrentDevices():
910 | pass
911 | def ApplyConfiguration(self):
912 | RestartPWServices()
913 | self.SaveCurrentConfig()
914 | def ReloadConfiguration(self):
915 | self.Pipewire_Configuration_Tab().update()
916 | def SaveConfiguration(self):
917 | self.SaveCurrentConfig()
918 |
919 |
920 |
921 | ### Initialize ###
922 |
923 | path_to_stylesheet = os.path.dirname(os.path.realpath(__file__))
924 |
925 | app = QApplication(sys.argv)
926 |
927 | with open(path_to_stylesheet+"/styles.css","r") as file:
928 | app.setStyleSheet(file.read())
929 |
930 | w = MainWindow()
931 | w.show()
932 |
933 | app.exec()
934 |
935 |
--------------------------------------------------------------------------------
/laut_text.py:
--------------------------------------------------------------------------------
1 | def init_localization():
2 | global pwmain_tooltip_text
3 | pwmain_tooltip_text = """Main Pipewire settings most applications should use this settings by default, but some specific may use other audio subserver"""
4 | global sample_rate_tooltip_text
5 | sample_rate_tooltip_text = "Default Sample Rate to which all audio streams will try to conform"
6 | global sample_tooltip_text
7 | sample_tooltip_text = """Sample Rate is equivalent of a resolution for audio."""
8 | global allowed_sample_tooltip_text
9 | allowed_sample_tooltip_text = "Allowed Sample Rates, defines which sample rates can be requested by a programs that run natively on a different rate"
10 | global quantum_tooltip_text
11 | quantum_tooltip_text = """Quantum is a period for which audio is going to be buffered.
12 | In case of any crackling or stuttering of audio quantum minium value should be increased."""
13 | global quantum_def_text
14 | quantum_def_text = """Quantum will be set to this value at the start,it will adjust afterwards, in most cases going down to the minimum value set"""
15 | global quantum_min_text
16 | quantum_min_text = """This is soft limit, bellow which quantum wont be decreased"""
17 | global quantum_max_text
18 | quantum_max_text = """This is soft limit, above which quantum wont be increased"""
19 | global quantum_flor_text
20 | quantum_flor_text = """This is hard limit, above which quantum wont be decreased"""
21 | global quantum_limit_text
22 | quantum_limit_text = """This is hard limit, above which quantum wont be increased"""
23 |
24 | global resampling_quality
25 | resampling_quality = """If audio stream is
26 | both up-sampling and down-sampling will affect quality of audio played """
27 |
28 | global save_button_tooltip
29 | save_button_tooltip = "Current configuration will be saved to your home folder .config folder"
30 | global reload_button_tooltip
31 | reload_button_tooltip = "This will reload last saved version of configuration"
32 | global apply_button_tooltip
33 | apply_button_tooltip = "This will reset wireplumber, pipewire and pipewire-pulse"
34 | global main_header_pulse_txt
35 | main_header_pulse_txt = "Pipewire-Pulse Settings:"
36 | global main_header_pipewire_txt
37 | main_header_pipewire_txt = "Pipewire Settings:"
38 | global main_header_jack_txt
39 | main_header_jack_txt = "Pipewire-Jack Settings:"
40 | global main_header_clients_txt
41 | main_header_clients_txt = "Alsa Clients Settings:"
42 | global link_buffers_max_tooltip
43 | link_buffers_max_tooltip = """The maximum number of buffers to negotiate between nodes.
44 | More buffers is almost always worse, increasing latency and memory usage. So increase it only if you have to"""
45 | global pipewire_version_panel_header
46 | pipewire_version_panel_header = "Information about Pipewire Version"
47 | global version_disclamer
48 | version_disclamer = "Note: most up to date version might not be included within your system distribution"
49 | global version_current
50 | version_current = "Current Version:"
51 | global version_newest
52 | version_newest = "Newest Version"
53 | global pulse_sample_rate_tooltip_text
54 | pulse_sample_rate_tooltip_text = "Default Sample Rate to which all pulseaudio streams will try to conform"
55 | global pulse_nodes_latency_tooltip_text
56 | pulse_nodes_latency_tooltip_text = "Suggested latency for nodes"
57 | global pulse_resampling_quality_tooltip_text
58 | pulse_resampling_quality_tooltip_text = """Quality of resampling, higher values are better quality but will increase cpu usage
59 | Middle values 4 to 6 are suggested:
60 | -4 gives best performance without any audio artifacts
61 | -6 is best quality with not that much performance impact"""
62 | global pulse_req_min_tooltip_text
63 | pulse_req_min_tooltip_text = """Minimum data requested for client,
64 | lowering this value and total length will decrease latency, but will increase CPU overhead"""
65 | global pulse_req_def_tooltip_text
66 | pulse_req_def_tooltip_text = """Default data requested for client,
67 | if theres no specified value by client then this one will be used."""
68 | global pulse_frag_min_tooltip_text
69 | pulse_frag_min_tooltip_text = "Minimum size of capture buffer before it's send to a client"
70 | global pulse_frag_def_tooltip_text
71 | pulse_frag_def_tooltip_text = "Default size of capture buffer before it's send to a client"
72 | global pulse_tlen_tooltip_text
73 | pulse_tlen_tooltip_text = """Total data length which will be buffered on server side,
74 | Lower values will decrease latency"""
75 | global pulse_pulsequantummin_tooltip_text
76 | pulse_pulsequantummin_tooltip_text = "Minimum quantum value, quantum value is based on ratio of requested data to total length of data"
77 | global pulse_def_format_tooltip_text
78 | pulse_def_format_tooltip_text = "Audio will default to this format if there's no specific one requested"
79 | global pulse_def_position_tooltip_text
80 | pulse_def_position_tooltip_text = "Default audio channels position"
81 | global pulse_idle_timeout_tooltip_text
82 | pulse_idle_timeout_tooltip_text = "Disables clients that are idling for given amount of seconds, if set to 0 then its disabled"
83 |
84 |
85 | global label_sample_rate
86 | label_sample_rate = "Sample Rate:"
87 | global label_nodes_latency_tooltip_text
88 | label_nodes_latency_tooltip_text = "Nodes Latency:"
89 | global label_resampling_quality_tooltip_text
90 | label_resampling_quality_tooltip_text = "Resampling Quality:"
91 | global label_req_min_tooltip_text
92 | label_req_min_tooltip_text = "Request Min:"
93 | global label_req_def_tooltip_text
94 | label_req_def_tooltip_text = "Request Default:"
95 | global label_frag_min_tooltip_text
96 | label_frag_min_tooltip_text = "Fragmentation Min:"
97 | global label_frag_def_tooltip_text
98 | label_frag_def_tooltip_text = "Fragmentation Default:"
99 | global label_tlen_tooltip_text
100 | label_tlen_tooltip_text = "Total Length:"
101 | global label_pulsequantummin_tooltip_text
102 | label_pulsequantummin_tooltip_text = "Quantum Minimum:"
103 | global label_def_format_tooltip_text
104 | label_def_format_tooltip_text = "Default Format:"
105 | global label_def_position_tooltip_text
106 | label_def_position_tooltip_text = "Default Position:"
107 | global label_idle_timeout_tooltip_text
108 | label_idle_timeout_tooltip_text = "Idle Timeout:"
109 | global label_pulse_samples_header
110 | label_pulse_samples_header = "Pulse Sampling:"
111 | global label_stream_props
112 | label_stream_props = "Stream Properties:"
113 | global label_buffer_settings
114 | label_buffer_settings = "Buffer Settings:"
115 | global label_pulse_other_settings
116 | label_pulse_other_settings = "Other Settings:"
117 |
118 | global pulse_samples_header_tooltip
119 | pulse_samples_header_tooltip = "Sample Rate is equivalent of a resolution for audio."
120 | global stream_props_tooltip
121 | stream_props_tooltip = "Those properties apply to client streams for pulseaudio"
122 | global buffer_settings_tooltip
123 | buffer_settings_tooltip = "Various buffering settings"
124 | global pulse_other_settings_tooltip
125 | pulse_other_settings_tooltip = "More specific settings"
126 |
127 | # Jack
128 | global label_Jack_samples_header
129 | label_Jack_samples_header = "Jack Sampling:"
130 | global Jack_samples_header_tooltip
131 | Jack_samples_header_tooltip = "Samples can be treated as an euqivalent to resolution"
132 | global Jack_sample_rate_tooltip_text
133 | Jack_sample_rate_tooltip_text = ""
134 | global label_jack_placeholder
135 | label_jack_placeholder = "placeholder"
136 | global jack_placeholder_tooltip_text
137 | jack_placeholder_tooltip_text = ""
138 |
139 | global jack_tooltip_text_JackNodeLockQuantum
140 | jack_tooltip_text_JackNodeLockQuantum ="Enforces default quantum on all Jack applications"
141 | global jack_tooltip_text_JackNodeForceQuantum
142 | jack_tooltip_text_JackNodeForceQuantum ="Will force specific value of quantum on all applications overrides lock quantum setting"
143 | global jack_tooltip_text_JackshowMonitor
144 | jack_tooltip_text_JackshowMonitor ="Shows monitor client and its ports"
145 | global jack_tooltip_text_JackmergeMonitor
146 | jack_tooltip_text_JackmergeMonitor ="Exposes capture and monitor ports on the same Jack device client"
147 | global jack_tooltip_text_JackshowMidi
148 | jack_tooltip_text_JackshowMidi ="Shows MIDI client and its ports"
149 | global jack_tooltip_text_JackshortName
150 | jack_tooltip_text_JackshortName ="Will use shorter names for ports and clients"
151 | global jack_tooltip_text_JackfilterName
152 | jack_tooltip_text_JackfilterName ="Enables char filter"
153 | global jack_tooltip_text_JackfilterChar
154 | jack_tooltip_text_JackfilterChar ="Replaces special characters for clients with specifed characters"
155 | global jack_tooltip_text_JackselfConnect
156 | jack_tooltip_text_JackselfConnect ="Specifies whether and what types of self connection are allowed"
157 | global jack_tooltip_text_JacklockedProcess
158 | jack_tooltip_text_JacklockedProcess ="Makes sure the process and callbacks can not be called at the same time"
159 | global jack_tooltip_text_JackdefaultAs
160 | jack_tooltip_text_JackdefaultAs ="Defaults name of outputs and inputs to \"System:\""
161 | global jack_tooltip_text_JackfixMidiEvents
162 | jack_tooltip_text_JackfixMidiEvents ="Mutes Midi Notes that are bellow or equal to 0 treshold"
163 | global jack_tooltip_text_JackglobalBufferSize
164 | jack_tooltip_text_JackglobalBufferSize ="Applies buffer size to all pipewire JACK clients"
165 | global jack_tooltip_text_JackmaxClientPorts
166 | jack_tooltip_text_JackmaxClientPorts ="Makes JACK clients make passive links." \
167 | "This option only works when the server link-factory was configured with the allow.link.passive option."
168 | global jack_tooltip_text_JackfillAliases
169 | jack_tooltip_text_JackfillAliases ="Automatically set the port alias1 and alias2 on the ports."
170 | global jack_tooltip_text_JackwritableInput
171 | jack_tooltip_text_JackwritableInput ="Makes the input buffers writable."
172 | global jack_tooltip_text_JackNodeLatency
173 | jack_tooltip_text_JackNodeLatency ="Allows setting a specific lattency for JACK clients"
174 | global label_Jack_Settings_header
175 | label_Jack_Settings_header ="Jack Settings"
176 | global Jack_Settings_header_tooltip
177 | Jack_Settings_header_tooltip ="Various JACK specific properties"
178 | global jack_tooltip_text_JackNodeQuantum
179 | jack_tooltip_text_JackNodeQuantum =" "
180 | global label_jack_JackNodeLockQuantum
181 | label_jack_JackNodeLockQuantum ="Lock Quantum"
182 | global label_jack_JackNodeForceQuantum
183 | label_jack_JackNodeForceQuantum ="Force Quantum"
184 | global label_jack_JackshowMonitor
185 | label_jack_JackshowMonitor ="Show Monitor"
186 | global label_jack_JackmergeMonitor
187 | label_jack_JackmergeMonitor ="Merge Monitor"
188 | global label_jack_JackshowMidi
189 | label_jack_JackshowMidi ="Show MIDI"
190 | global label_jack_JackshortName
191 | label_jack_JackshortName ="Shorten Names"
192 | global label_jack_JackfilterName
193 | label_jack_JackfilterName ="Enable Filtering"
194 | global label_jack_JackfilterChar
195 | label_jack_JackfilterChar ="Filter Special Chars With"
196 | global label_jack_JackselfConnect
197 | label_jack_JackselfConnect ="Self Connection Options"
198 | global label_jack_JacklockedProcess
199 | label_jack_JacklockedProcess ="Lock Process"
200 | global label_jack_JackdefaultAs
201 | label_jack_JackdefaultAs ="System As Default"
202 | global label_jack_JackfixMidiEvents
203 | label_jack_JackfixMidiEvents ="Fix MIDI Events"
204 | global label_jack_JackglobalBufferSize
205 | label_jack_JackglobalBufferSize ="Set Global Buffer Size"
206 | global label_jack_JackmaxClientPorts
207 | label_jack_JackmaxClientPorts ="Max Clients Limit"
208 | global label_jack_JackfillAliases
209 | label_jack_JackfillAliases ="Fill Aliases"
210 | global label_jack_JackwritableInput
211 | label_jack_JackwritableInput ="Writable Input"
212 | global label_jack_JackNodeLatency
213 | label_jack_JackNodeLatency ="Nodes Latency"
214 | global label_jack_JackNodeRate
215 | label_jack_JackNodeRate ="Nodes Rate"
216 | global label_jack_JackNodeQuantum
217 | label_jack_JackNodeQuantum ="Node Quantum"
218 | #clients
219 | global label_SampleRateLoadedClients
220 | label_SampleRateLoadedClients = "Samples"
221 | global label_ClientsNodeLatency
222 | label_ClientsNodeLatency = "Nodes Latency"
223 | global label_ClientsResampleQuality
224 | label_ClientsResampleQuality = "Resampling Quality"
225 | global label_ClientsNodeAutoconnect
226 | label_ClientsNodeAutoconnect = "Node Autoconnect"
227 | global label_ClientsChannelmixNormalize
228 | label_ClientsChannelmixNormalize = "Normalize Channels"
229 | global label_ClientsChannelmixMixlfe
230 | label_ClientsChannelmixMixlfe = "Channel Mix LFE"
231 | global label_ClientsChannelmixUpmix
232 | label_ClientsChannelmixUpmix = "Channel Upmix"
233 | global label_ClientsChannelmixUpmixMethod
234 | label_ClientsChannelmixUpmixMethod = "Channels Upmix Method"
235 | global label_ClientsChannelmixLfecutoff
236 | label_ClientsChannelmixLfecutoff = "Channels LFE Cutoff"
237 | global label_ClientsChannelmixFccutoff
238 | label_ClientsChannelmixFccutoff = "Channels FC Cuftoff"
239 | global label_ClientsChannelmixReardelay
240 | label_ClientsChannelmixReardelay = "Channel Mix Rear Dealay"
241 | global label_ClientsChannelmixStereowiden
242 | label_ClientsChannelmixStereowiden = "Channel Widen Stereo"
243 | global label_ClientsChannelmixHilberttaps
244 | label_ClientsChannelmixHilberttaps = "Channel Mix Hiblert taps"
245 | global label_ClientsDitherNoise
246 | label_ClientsDitherNoise = "Dither Noise"
247 | global clients_tooltip_text_SampleRateLoadedClients
248 | clients_tooltip_text_SampleRateLoadedClients = "Sample Rate is equivalent of a resolution for audio."
249 | global clients_tooltip_text_ClientsNodeLatency
250 | clients_tooltip_text_ClientsNodeLatency = """Sets a suggested latency this value works sames as Quantum
251 | (technically latency is quantum value/sample rate)"""
252 | global clients_tooltip_text_ClientsResampleQuality
253 | clients_tooltip_text_ClientsResampleQuality = """Quality of resampling, higher values are better quality but will increase cpu usage
254 | Middle values 4 to 6 are suggested:
255 | -4 gives best performance without any audio artifacts
256 | -6 is best quality with not that much performance impact"""
257 | global clients_tooltip_text_ClientsNodeAutoconnect
258 | clients_tooltip_text_ClientsNodeAutoconnect = "Should nodes be automatically connected to a sink or source"
259 | global clients_tooltip_text_ClientsChannelmixNormalize
260 | clients_tooltip_text_ClientsChannelmixNormalize = "Makes sure that during such mixing & resampling original 0 dB level is preserved, so nothing sounds wildly quieter/louder."
261 | global clients_tooltip_text_ClientsChannelmixMixlfe
262 | clients_tooltip_text_ClientsChannelmixMixlfe = """Mixes the low frequency effect channel into the front center or stereo pair.
263 | This might enhance the dynamic range of the signal if there is no subwoofer and the speakers can reproduce the low frequency signal."""
264 | global clients_tooltip_text_ClientsChannelmixUpmix
265 | clients_tooltip_text_ClientsChannelmixUpmix = """Enables up-mixing of the front center (FC) when the target has a FC channel. " \
266 | The sum of the stereo channels is used and an optional lowpass filter can be used (see channelmix.fc-cutoff)."""
267 | global clients_tooltip_text_ClientsChannelmixUpmixMethod
268 | clients_tooltip_text_ClientsChannelmixUpmixMethod = """
269 | none. No rear channels are produced.
270 | simple. Front channels are copied to the rear. This is fast but can produce phasing effects.
271 | psd. The rear channels as produced from the front left and right ambient sound (the difference between the channels). A delay and optional phase shift are added to the rear signal to make the sound bigger.
272 | """
273 | global clients_tooltip_text_ClientsChannelmixLfecutoff
274 | clients_tooltip_text_ClientsChannelmixLfecutoff = "Apply a lowpass filter to the low frequency effects. The value is expressed in Hz. Typical subwoofers have a cutoff at around 150 and 200. Value of 0 disables the feature."
275 | global clients_tooltip_text_ClientsChannelmixFccutoff
276 | clients_tooltip_text_ClientsChannelmixFccutoff = "Apply a lowpass filter to the front center frequency. The value is expressed in Hz. This option is only active when the up-mix is enabled. "
277 | global clients_tooltip_text_ClientsChannelmixReardelay
278 | clients_tooltip_text_ClientsChannelmixReardelay = "Apply a delay in milliseconds when up-mixing the rear channels. This is only active when the psd up-mix method is used."
279 | global clients_tooltip_text_ClientsChannelmixStereowiden
280 | clients_tooltip_text_ClientsChannelmixStereowiden = "Subtracts some of the front center signal from the stereo channels. This moves the dialogs more to the center speaker and leaves the ambient sound in the stereo channels."
281 | global clients_tooltip_text_ClientsChannelmixHilberttaps
282 | clients_tooltip_text_ClientsChannelmixHilberttaps = "This option will apply a 90 degree phase shift to the rear channels to improve specialization. Taps needs to be between 15 and 255 with more accurate results. This is only active when the psd up-mix method is used."
283 | global clients_tooltip_text_ClientsDitherNoise
284 | clients_tooltip_text_ClientsDitherNoise = "Applies random noise over audio ranges from 0 to 1024 samples"
285 |
286 | global clients_tooltip_text_ClientsAlsaDeny
287 | clients_tooltip_text_ClientsAlsaDeny = "Denies ALSA access for the client"
288 | global clients_tooltip_text_ClientsAlsaAccess
289 | clients_tooltip_text_ClientsAlsaAccess = ""
290 | global clients_tooltip_text_ClientsAlsaFormat
291 | clients_tooltip_text_ClientsAlsaFormat = "The ALSA format to use for the client. 0 allows all formats"
292 | global clients_tooltip_text_ClientsAlsaRate
293 | clients_tooltip_text_ClientsAlsaRate = "The samplerate to use for the client. The default is 0, which is to allow all rates."
294 | global clients_tooltip_text_ClientsAlsaChannels
295 | clients_tooltip_text_ClientsAlsaChannels = "The number of channels for the client. The default is 0, which is to allow any number of channels."
296 | global clients_tooltip_text_ClientsAlsaPeriodbytes
297 | clients_tooltip_text_ClientsAlsaPeriodbytes = "The number of bytes per period. The default is 0 which is to allow any number of period bytes."
298 | global clients_tooltip_text_ClientsAlsaBufferbytes
299 | clients_tooltip_text_ClientsAlsaBufferbytes = "The number of bytes in the alsa buffer. The default is 0, which is to allow any number of bytes."
300 | global clients_tooltip_text_ClientsAlsaVolumeMethod
301 | clients_tooltip_text_ClientsAlsaVolumeMethod = "This controls the volume curve used on the ALSA mixer. Possible values are cubic and linear. The default is to use cubic."
302 | global label_ClientsAlsaDeny
303 | label_ClientsAlsaDeny = "Deny Access"
304 | global label_ClientsAlsaAccess
305 | label_ClientsAlsaAccess = "ALSA Access"
306 | global label_ClientsAlsaFormat
307 | label_ClientsAlsaFormat = "ALSA Format"
308 | global label_ClientsAlsaRate
309 | label_ClientsAlsaRate = "ALSA Rate"
310 | global label_ClientsAlsaChannels
311 | label_ClientsAlsaChannels = "ALSA Channels"
312 | global label_ClientsAlsaPeriodbytes
313 | label_ClientsAlsaPeriodbytes = "ALSA Period Bytes"
314 | global label_ClientsAlsaBufferbytes
315 | label_ClientsAlsaBufferbytes = "ALSA Buffer Bytes"
316 | global label_ClientsAlsaVolumeMethod
317 | label_ClientsAlsaVolumeMethod = "ALSA Volume Method"
318 | #headers
319 | global label_Clients_samples_header
320 | label_Clients_samples_header = "Clients Samples:"
321 | global label_Clients_samples_header_tooltip
322 | label_Clients_samples_header_tooltip = ""
323 | global label_Clients_various_header
324 | label_Clients_various_header = "Clients Other:"
325 | global label_Clients_various_header_tooltip
326 | label_Clients_various_header_tooltip = ""
327 | global label_Alsa_various_header
328 | label_Alsa_various_header = "ALSA Settings"
329 | global label_Alsa_various_header_tooltip
330 | label_Alsa_various_header_tooltip = ""
--------------------------------------------------------------------------------
/redme_images/LAUT devices.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrAdrianPl/Linux_Audio_Utility_Tool/e806f0c7393bd076e07a03d6588054d1b514c812/redme_images/LAUT devices.png
--------------------------------------------------------------------------------
/redme_images/LAUT pipewire config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrAdrianPl/Linux_Audio_Utility_Tool/e806f0c7393bd076e07a03d6588054d1b514c812/redme_images/LAUT pipewire config.png
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | pipewire_python
2 | requests
3 | pyqt6
4 |
--------------------------------------------------------------------------------
/run_laut.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | python3 ./laut_main.py
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | /* Qwidget {
2 |
3 | background-color: beige;
4 |
5 | }
6 |
7 | AlternateBase {
8 |
9 | background-color: rgb(163, 163, 29);
10 |
11 | }
12 | Base {
13 |
14 | background-color: rgb(156, 156, 76);
15 | }
16 | Window {
17 |
18 | background-color: rgb(161, 161, 144);
19 | } */
20 | QWidget {
21 | background-color: rgb(209, 191, 151);
22 | color: "black";
23 | }
24 | QPushButton {
25 | font-size: 12px;
26 | background-color: rgb(180, 172, 158);
27 | border-radius: 5%;
28 | height: 100px;
29 | }
30 |
31 | QPushButton:hover {
32 | background-color: rgb(226, 163, 15);
33 | padding-top: 2px;
34 | }
35 |
36 | QPushButton::menu-indicator {
37 | subcontrol-origin: padding;
38 | subcontrol-position: bottom right;
39 |
40 | }
41 |
42 | .tabs_class {
43 |
44 | background-color: rgb(180, 172, 158);
45 |
46 | }
47 |
48 | QPlainTextEdit {
49 | background-color: rgb(216, 216, 191);
50 | color: "black";
51 | font-size: 16px;
52 | border-radius: 5%;
53 | height: 30%;
54 | }
55 | .device_text {
56 | font-size: 16px;
57 | color: rgb(24, 18, 13);
58 | }
59 | .device_sub_text {
60 | font-size: 16px;
61 | color: rgb(24, 18, 13);
62 | }
63 | .Settings_Header {
64 |
65 | font-size: 20px;
66 | color: rgb(0, 0, 0);
67 | background-color: rgb(143, 134, 116);
68 | border-radius: 5%;
69 | padding: 2.5%;
70 |
71 | }
72 | .Standard_Input {
73 | font-size: 12px;
74 | }
75 |
76 | .Warning_Icon {
77 |
78 | background-color: rgb(235, 202, 19);
79 | font-size: 18px;
80 | }
81 | .Warning_Icon:hover {
82 | background-color: rgb(248, 224, 87);
83 | padding-top: -3px;
84 | }
85 |
86 | .Info_Icon {
87 | border-radius: 18px;
88 | border: 3px solid rgb(126, 124, 116);
89 | background-color: rgb(126, 124, 116);
90 | font-size: 18px;
91 | }
92 | .Info_Icon_Small {
93 | border-radius: 12px;
94 | border: 3px solid rgb(126, 124, 116);
95 | background-color: rgb(126, 124, 116);
96 | font-size: 14px;
97 | }
98 | .Info_Icon:hover .Info_Icon_Small:hover {
99 | padding-top: -3px;
100 | }
101 |
102 |
103 | QTabBar::tab {
104 | color: #b1b1b1;
105 | border: 1px solid #868686;
106 | border-bottom-style: none;
107 | background-color: #969696;
108 | padding-left: 10px;
109 | padding-right: 10px;
110 | padding-top: 3px;
111 | padding-bottom: 2px;
112 | margin-right: -1px;
113 | }
114 | QTabBar::tab:last
115 | {
116 | margin-right: 0; /* the last selected tab has nothing to overlap with on the right */
117 | border-top-right-radius: 3px;
118 | }
119 |
120 | QTabBar::tab:first:!selected
121 | {
122 | margin-left: 0px; /* the last selected tab has nothing to overlap with on the right */
123 |
124 |
125 | border-top-left-radius: 3px;
126 | }
127 |
128 | QTabBar::tab:!selected
129 | {
130 | color: #b1b1b1;
131 | border-bottom-style: solid;
132 | margin-top: 3px;
133 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #969696, stop:.4 #343434);
134 | }
135 |
136 | QTabBar::tab:selected
137 | {
138 | border-top-left-radius: 3px;
139 | border-top-right-radius: 3px;
140 | margin-bottom: 0px;
141 | }
142 |
143 | QTabBar::tab:!selected:hover
144 | {
145 | /*border-top: 2px solid #ffaa00;
146 | padding-bottom: 3px;*/
147 | border-top-left-radius: 3px;
148 | border-top-right-radius: 3px;
149 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434, stop:0.2 #343434, stop:0.1 #ffaa00);
150 | }
151 |
152 | QToolTip
153 | {
154 | border: 1px solid black;
155 | background-color: #f1c690;
156 | padding: 1px;
157 | border-radius: 3px;
158 | color: black;
159 |
160 | }
161 | .Layout_Style {
162 | border :1px solid rgb(93, 93, 99);
163 | }
--------------------------------------------------------------------------------