element-hq / element-hq/element-ios

Stereo opus files sound glitchy when playing back.

Open
#6,603 1 comment 0 reactions 0 assignees View on GitHub
A-Media O-Uncommon S-Minor T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Upload one of the sample files from https://filesamples.com/formats/opus to a room from web.
2. Open the room on iOS
3. Play the file back.

### Outcome

#### What did you expect?
The file to sound the same as it does on desktop.

#### What happened instead?
It sounds very glitchy and reports as being twice the length it should be.

It looks like the SwiftOGG package is forcing `kAudioChannelLayoutTag_Mono` instead of reading this from the file.

### Your phone model

iPhone 12

### Operating system version

iOS 15.6.1

### Application version

1.8.27

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Research direction

Start by tracing iOS playback of uploaded Opus files and inspect how the SwiftOGG package determines its channel layout. Reproduce with a stereo sample from filesamples.com on an iPhone 12 running iOS 15.6.1, then verify that playback matches desktop and no longer reports twice the expected duration.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.