Skip to content
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

AudioThrottler & CircularBuffer #414

Merged
merged 17 commits into from
Jun 22, 2022
Merged

AudioThrottler & CircularBuffer #414

merged 17 commits into from
Jun 22, 2022

Conversation

jwallet
Copy link
Owner

@jwallet jwallet commented Apr 29, 2022

No ideal either, it has difficulty to know when to cut when the user skip a track since Spotify immediately plays the other. So I will have to add a toggle feature on it. The feature can be useful if the user records a playlist and do not touch Spotify until the recording is done.

The user will probably have to turn off Automix and Crossfade features in Spotify Playback settings

may help resolve issue #359
tweaked resolve #411
relates to #399 #247 #83 #100
may help resolve issue #170 (if spotify does not provide the track info, it won't do much)

AudioCircularBuffer keeps track of the current playback for about 10 seconds then overwrite itself

AudioThrottler sets the Buffer 5 seconds behind, it has 3 types of reader.
Once Spotify changes to the next track, TrimStart will be fired for the new recording, TrimEnd will be fired for the old recording, otherwise None will always be the default value.

  • None (normal behavior), it gets the data from the throttler.
  • TrimStart (use when starting a recording), it will set the reader to the next track (last detected silence)
  • TrimEnd (use when ending a recording), it will ends as soon as a silence is detected.

@jwallet jwallet marked this pull request as draft April 29, 2022 03:48
@jwallet jwallet changed the title Audio: Throttler & CircularBuffer. Recorder got reworked. Audio: Throttler & CircularBuffer May 4, 2022
@jwallet jwallet changed the title Audio: Throttler & CircularBuffer AudioThrottler & CircularBuffer May 4, 2022
we need at least 1s of offsetbuffer to match waveFormat.averageBitratePerSec
@jwallet jwallet added the test 🧪 Needs to be unit tested label May 4, 2022
@jwallet jwallet mentioned this pull request May 20, 2022
@jwallet jwallet marked this pull request as ready for review June 22, 2022 00:49
@jwallet jwallet removed the test 🧪 Needs to be unit tested label Jun 22, 2022
@jwallet jwallet merged commit e3272cd into master Jun 22, 2022
@jwallet jwallet deleted the throttler branch June 22, 2022 01:31
jwallet added a commit that referenced this pull request Jun 22, 2022
AudioThrottler & CircularBuffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

listen to the selected device while recording
1 participant