-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Real time safe recording with ring buffer stage one #7903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
steven-jaro
wants to merge
27
commits into
LMMS:feature/recording-stage-one
Choose a base branch
from
steven-jaro:recording-with-ringbuffer
base: feature/recording-stage-one
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5a9c811
Ring buffer for recording first implementation
steven-jaro c6f8047
Fixed ring buffer implementation approach to make it more stable and …
steven-jaro 2fc50ec
Better approach for no audio saturation, code optimization, no segfau…
steven-jaro 2c43aa8
Removed resize and reserve from any real time context
steven-jaro aa33e45
Fixed spaces instead of tabs size 4 and Johannes requests
steven-jaro 8541272
Changed DEFAULT_BUFFER_SIZE to 100
steven-jaro dad148e
Update src/core/AudioEngine.cpp
steven-jaro e6c1097
Update include/AudioEngine.h
steven-jaro e25a58e
Update src/core/AudioEngine.cpp
steven-jaro bb00189
Update src/core/AudioEngine.cpp
steven-jaro 264d15b
Update src/core/AudioEngine.cpp
steven-jaro 3d02d41
Update src/core/AudioEngine.cpp
steven-jaro 6b4d07d
Update src/core/AudioEngine.cpp
steven-jaro 69734f9
Update src/core/AudioEngine.cpp
steven-jaro 1dae270
Update src/core/AudioEngine.cpp
steven-jaro d9a22b2
Update src/core/AudioEngine.cpp
steven-jaro cae9d61
Update src/core/AudioEngine.cpp
steven-jaro 00ab49d
Update src/core/AudioEngine.cpp
steven-jaro d6cbe34
Update src/core/AudioEngine.cpp
steven-jaro ed4ecb8
Update src/core/AudioEngine.cpp
steven-jaro 2047da5
Update src/core/AudioEngine.cpp
steven-jaro 11432b1
Update src/core/AudioEngine.cpp
steven-jaro 5820a43
Update src/core/AudioEngine.cpp
steven-jaro 52868fd
Fixed unsafe substraction in processBufferedInputFrames
steven-jaro 89f6521
Fixed szeli1 Requested changes includir refator
steven-jaro 45cdb83
Update src/core/AudioEngine.cpp
steven-jaro 95bbfd6
Update src/core/AudioEngine.cpp
steven-jaro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed szeli1 Requested changes includir refator
- Loading branch information
commit 89f6521ceb77749889ce4c3bcf0324f4702e6274
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really real time safe when it uses mutexes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is real-time safe. The mutex in
requestChangeInModel()is NOT in the real-timeaudio callback path. Here's why:
Normal playback mode:
nextBuffer()→m_fifo->read()(lockless, no mutex)renderNextBuffer()which includesthe mutex, but this is outside the RT path
Export/rendering mode:
The architecture ensures that
pushInputFrames()(called from audio device callback)only writes to the lockless ring buffer, while
processBufferedInputFrames()(which hasthe mutex) runs either in the fifoWriter thread or in rendering mode where RT-safety
isn't required.