Bug roundup, audio + file logging#127
Merged
Merged
Conversation
dgramop
reviewed
Jun 19, 2025
dgramop
left a comment
Contributor
There was a problem hiding this comment.
Needs testing on windows. Also we should list default log paths for each operating system in the README - anyone supporting a user will need this information
| fn log_file_name() -> String { | ||
| chrono::Local::now() | ||
| .naive_local() | ||
| .format("dsp-studio-log_%Y-%m-%d_%H:%M:%S.txt") |
Contributor
There was a problem hiding this comment.
Suggested change
| .format("dsp-studio-log_%Y-%m-%d_%H:%M:%S.txt") | |
| .format("foxhunter-studio-log_%Y-%m-%d_%H:%M:%S.txt") |
dgramop
reviewed
Jun 22, 2025
| #[block(range = { initial: 2MHz, range: 50kHz..=60MHz })] | ||
| sample_rate: FloatValue, | ||
| #[block(default = "F64Picker::with_supported_fn(supported_audio_rates)")] | ||
| #[block(default = "F64Picker::new(vec![24000.0, 44100.0, 48000.0, 96000.0])")] |
Contributor
There was a problem hiding this comment.
are these hard-coded default rates going to be a problem/is this just a short term workaround until we get a sample rate solver?
Contributor
Author
There was a problem hiding this comment.
They shouldnt since these are very much agreed upon. I would say 99% of audio rates used by devices or stored in files are one of these four
dgramop
reviewed
Jun 22, 2025
| .collect(); | ||
|
|
||
| if block_attrs.len() != 1 { | ||
| let Some(block_attr) = block_attrs.get(0) else { |
Contributor
There was a problem hiding this comment.
cool! let else! very interesting
dgramop
approved these changes
Jun 22, 2025
dgramop
self-requested a review
June 22, 2025 18:53
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Description
AudioSourceandAudioSinksince the implementations in futuresdr panicked and were subpartracing_subscriberthat writes to a file (json format).#[block(skip)](via theBlockderive macro)ByteBufabstration that can be used to combine multiple writes into a fixed size (e.g for a fixed size audio hardware buffer)Related issues
Fixes #117
Fixes #130
How was this PR tested?
Android
N/A
Desktop (dsp-runner)
Macos
examples/audio-source3.fxWorksWindows
examples/audio-source3.fxWorksLinux (audio):
examples/audio-source3.fxWorksLinux (logging):
Also will write to temp dir if
--log-pathis unspecified:Also handles the case where the user specifies a directory as the log file path (we create a file inside the dir):
Sanity check