-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Slow toFloatChannelData
performance with Dolby Atmos audio
#8
Comments
Happy to supply mp4 but will need approval. I may be able to find an example unlicensed. I have also tried using ffmpeg -i input.mp4 -vn -acodec copy output.mp4 |
ffmpeg format output:
|
toFloatChannelData
performance with Enhanced AC-3 audiotoFloatChannelData
performance with Dolby Atmos audio
Perhaps it's worth adding that the Atmos mp4 has 12 channels:
Where as a typical mp3 has 2:
I might have a go at optimising to only render using first two channels. Potentially could use // Create the result array with preallocated capacity
var result = [[Float]](repeating: [], count: channelCount)
for channel in 0..<channelCount {
result[channel] = Array(UnsafeBufferPointer(start: pcmFloatChannelData[channel], count: frameLength * stride))
} |
macOS Version(s) Used to Build
macOS 14.5 Sonoma
Xcode Version(s)
Xcode 15.4
Description
When using mp4 audio format which contains AC-3 audio of about 04:30 the cpu maxes out for over a minute.
Curious to know if
toFloatChannelData()
is thread safe as I may be able to then display a loading indicator whilst wave is loading.Crash Logs, Screenshots or Other Attachments (if applicable)
The text was updated successfully, but these errors were encountered: