Mozilla is the maker of the famous Firefox web browser and the birthplace of the likes of Rust and Servo (read more about Embedding the Servo Web Engine in Qt). Firefox is a huge, multi-platform, multi-language project with 21 million lines of code back in 2020, according to their own blog post. Navigating in projects […]
Blog Archives
Implementing an Audio Mixer, Part 2 Basic DSP with Qt Multimedia
Recap In Part 1, we covered PCM audio and superimposing waveforms, and developed an algorithm to combine an arbitrary number of audio streams into one. Now we need to use these ideas to finish a full implementation using Qt Multimedia. Using Qt Multimedia for Audio Device Access So what do we need? Well, we want […]
Synchronization Primitives in C++20 std::latch and std::barrier
In C++20, the standard library introduced new synchronization primitives: std::latch and std::barrier. These are the utilities designed to coordinate between concurrent threads. What is a synchronization primitive? In concurrent programming, synchronization primitives are the fundamental tools that help in managing the coordination, execution order, and data safety of multiple threads or processes that run concurrently. […]
Implementing an Audio Mixer, Part 1 Basic DSP with Qt Multimedia
Motivation When using Qt Multimedia to play audio files, it’s common to use QMediaPlayer, as it supports a larger variety of formats than QSound and QSoundEffect. Consider a Qt application with several audio sources; for example, different notification sounds that may play simultaneously. We want to avoid cutting notification sounds off when a new one […]
Qt and Trivial Relocation (Part 5) Trivial Relocation and Standard C++
In the previous posts of this series (if you’ve missed them: parts 1, 2, 3, and 4), we have learned about relocation and trivial relocation. We have explored what relocation means, what trivial relocation means, and how it can be used to optimize the implementation of certain data structures, such as the reallocation of a […]
More Ways to Rust
In our earlier blog, The Smarter Way to Rust, we discuss why a blend of C++ and Rust is sometimes the best solution to building robust applications. But when you’re merging these two languages, it’s critical to keep in mind that the transition from C++ to Rust isn’t about syntax, it’s about philosophy. Adapting to […]
Formatting Selected Text in QML Quasi-Backporting Qt 6.7 QML cursorSelection to Older Versions
Motivation Let’s say we’re working on a QML project that involves a TextEdit. There’s some text in it: here is some text We want to select part of this text and hit ctrl+B to make it bold: here is some text In Qt Widgets, this is trivial, but not so much in QML – we […]
The Smarter Way to Rust
If you’ve been following our blog, you’re likely aware of Rust’s growing presence in embedded systems. While Rust excels in safety-by-design, it’s also common to find it integrated with C++. This strategic approach leverages the strengths of both languages, including extensive C++ capabilities honed over the years in complex embedded systems. Let’s delve into some […]
KDGpu 0.5.0 is here! Our Vulkan wrapper now has OpenXR integration and more.
Since we first announced it last year, our Vulkan wrapper KDGpu has been busy evolving to meet customer needs and our own. Our last post announced the public release of v0.1.0, and version 0.5.0 is available today. It’s never been easier to interact with modern graphics technologies, enabling you to focus on the big picture […]
Qt and Trivial Relocation (Part 4) On trivial relocation and move assignments
In the last post of this series we learned that: erasing elements from the middle of a vector can be implemented, in general, via a series of move assignments, move constructions, swaps, destructions for types with value semantics, the exact strategy does not really matter for types with write-through reference semantics, the strategy matters, because […]