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

USDX does not handle audio files with more than two channels (stereo) correctly (on macOS and Linux). #860

Open
bohning opened this issue Jun 26, 2024 · 4 comments

Comments

@bohning
Copy link
Collaborator

bohning commented Jun 26, 2024

Actual behaviour

USDX seems to incorrectly handle multi-channel audio files (multi as in more than two channels = stereo), at least on macOS and Linux (but seems to work on Windows).

I have an m4a which contains 6 channels of audio (known as "5.1", "3F2R/LFE" is the info that VLC provides me - meaning "3 front, 2 rear/Low Frequency Effects = bass/subwoofer). When using as audio source via #MP3, USDX plays back the file way faster than it should, so it's not usable. It seems that it tries to squeeze in audio from multiple channels into a timeframe. The playback sound is okay, but the timings are messed up, e.g. the timer is a lot faster than regular time. If there is a video, the video will play with the increased speed.

image

Expected behaviour

USDX should be able to handle multi-channel audio files, probably by just disregarding the additional channels and using left and right channel for stereo playback.

Steps to reproduce

This 5.1 m4a file can be used together with the following minimal txt to reproduce and debug this issue. The lyrics helper is on steroids, the time display progresses way too fast.

#TITLE:multi-channel bug
#ARTIST:multi-channel bug
#MP3:a-trip-far-far-away_5.1_.m4a
#BPM:400
#GAP:18060
: 0 1 0 
- 1
: 1 1 0 
E

Details

  • USDX version: latest main (self-compiled)
  • Operating System + version: macOS Sonoma (14.5), Intel (confirmed to also happen on Linux, but doesn't happen on Windows)
@bohning
Copy link
Collaborator Author

bohning commented Jun 26, 2024

I guess the comment here says it all:

// TODO: should we use this or not? Should we allow 5.1 channel audio?

@bohning
Copy link
Collaborator Author

bohning commented Jun 26, 2024

@s09bQ5 Would that be something you could take a look at? Or decide that it's not worth fixing and require a (max) 2-channel audio file?

@s09bQ5
Copy link
Collaborator

s09bQ5 commented Jun 26, 2024

I'd love to look into this, but I'm quite busy until Sunday.
Can you provide a test file?
How many channels does your playback device have?

@bohning
Copy link
Collaborator Author

bohning commented Jun 26, 2024

There is no rush here whatsoever. I linked a test file above (it's a random 5.1 m4a file). My playback device has 3 channels (center left, center right and subwoofer).

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

No branches or pull requests

2 participants