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

Fix audio playback bugs due to setting speed #3040

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Conversation

ahmedre
Copy link
Contributor

@ahmedre ahmedre commented Jan 2, 2025

This patch fixes bugs due to setting the playback speed on certain
devices, even if the person does not try to change the playback speed at
all. For example, on a Pixel 8, pausing the audio and resuming causes
the playback to stop ui wise without stopping service wise due to a
silent exception from setting the playback params.

The fix here, as suggested by Claude, is not re-using the playback
params, and, instead, setting a new one, irrespective of the current
values.

This patch fixes bugs due to setting the playback speed on certain
devices, even if the person does not try to change the playback speed at
all. For example, on a Pixel 8, pausing the audio and resuming causes
the playback to stop ui wise without stopping service wise due to a
silent exception from setting the playback params.

The fix here, as suggested by Claude, is not re-using the playback
params, and, instead, setting a new one, irrespective of the current
values.
@ahmedre ahmedre added this pull request to the merge queue Jan 2, 2025
Copy link

github-actions bot commented Jan 2, 2025

OLD: app-madani-debug.apk (signature: V1, V2)
NEW: app-madani-debug.apk (signature: V1, V2)

          │          compressed           │         uncompressed          
          ├───────────┬───────────┬───────┼───────────┬───────────┬───────
 APK      │ old       │ new       │ diff  │ old       │ new       │ diff  
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼───────
      dex │  24.1 MiB │  24.1 MiB │  +9 B │  74.8 MiB │  74.8 MiB │ -76 B 
     arsc │   2.7 MiB │   2.7 MiB │   0 B │   2.7 MiB │   2.7 MiB │   0 B 
 manifest │   5.8 KiB │   5.8 KiB │   0 B │    28 KiB │    28 KiB │   0 B 
      res │   1.7 MiB │   1.7 MiB │  +6 B │     2 MiB │     2 MiB │   0 B 
   native │  18.8 KiB │  18.8 KiB │   0 B │  36.5 KiB │  36.5 KiB │   0 B 
    asset │ 404.2 KiB │ 404.2 KiB │   0 B │ 678.6 KiB │ 678.6 KiB │   0 B 
    other │ 218.3 KiB │ 218.3 KiB │  -4 B │ 464.6 KiB │ 464.6 KiB │   0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼───────
    total │  29.2 MiB │  29.2 MiB │ +11 B │  80.6 MiB │  80.6 MiB │ -76 B 

Merged via the queue into main with commit 656e2b5 Jan 2, 2025
2 checks passed
@ahmedre ahmedre deleted the fix_playback_speed_bug branch January 2, 2025 20:37
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.

1 participant