Skip to content

Track looping creates audio gap in iOS playback #91

Description

@valeriiamykhalova

Our team is switching to react-native-track-player, which seems to be the best option for native playback, but we encountered a bug that is not fixable with JS. We would greatly appreciate any tips on whether this is a known issue and if there's a way to fix it. If it's not on the schedule, are there any suggestions on where to look to fix it ourselves?

Describe the bug
A noticeable audio gap during track looping when using RepeatMode.Track. The gap occurs when the track restarts.

To Reproduce

  1. Setup TrackPlayer with a single audio track
  2. Set RepeatMode.Track
  3. Play audio and let it loop
  4. You'll hear a gap when the loop resets

Code example in RN:

await TrackPlayer.add(track);
await TrackPlayer.setRepeatMode(RepeatMode.Track);
await TrackPlayer.play();

Expected behavior
Seamless gapless playback when the audio track loops.

Smartphone:

  • Device: iPhone 14, Simulator iPhone SE 3rd generation
  • OS: iOS 17.5, iOS 18.0
  • Version: SwiftAudioEx 1.1.0

Additional context
Using:

  • react-native-track-player: 4.1.1
  • SwiftAudioEx: 1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions