-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Refactor: Audio recorder class #19911
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
criticalAY
wants to merge
3
commits into
ankidroid:main
Choose a base branch
from
criticalAY:refactor/common-ar
base: main
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
+355
−372
Conversation
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
Contributor
Author
|
Something is wrong with git or maybe I messed up idk the test is not there :( Sorry about the multiple force pushes files went missing |
29c4998 to
361a058
Compare
BrayanDSO
requested changes
Dec 23, 2025
Member
BrayanDSO
left a comment
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.
Also, please send a video showing how you manually tested it.
You haven't described at all how you've done it.
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/test/java/com/ichi2/anki/recorder/AudioRecorderTest.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
1dc2ba8 to
5487018
Compare
BrayanDSO
requested changes
Dec 23, 2025
AnkiDroid/src/test/java/com/ichi2/anki/recorder/AudioRecorderTest.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
5487018 to
1cc8439
Compare
1cc8439 to
4f7899f
Compare
Contributor
Author
|
BrayanDSO
approved these changes
Dec 29, 2025
AnkiDroid/src/main/java/com/ichi2/anki/recorder/AudioRecorder.kt
Outdated
Show resolved
Hide resolved
- Consolidation of duplicate AudioRecorder classes into a single one - Added support for AAC (High Quality) with a fallback to AMR_NB (Standard Quality).
- update Audio recorder usage in Audio controller and reviewer
4f7899f to
e830400
Compare
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.
Purpose / Description
The code was duplicated so here I am modernizing AudioRecorder(picking best of both) and remove duplicate implementations
Fixes
NA
Approach
Remove dupicate code and create a new class
How Has This Been Tested?
Unit tests and manually on google pixel 10:
Screen_recording_20251223_152315.mp4
Learning (optional, can help others)
NA
Checklist
Please, go through these checks before submitting the PR.