Closed jigneshchovatiya closed 8 months ago
This sounds like an issue with the mp3 file itself.
see https://github.com/dmrschmidt/DSWaveformImage/issues/52#issuecomment-1329550520
there’s a lot of audio tools out there that create invalid audio data.
If you can confirm that opening the file with a different audio tool shows different behavior, I can investigate further if you upload the mp3 somewhere.
@dmrschmidt and What's about Last Stripe Round cap not showing
i will share mp3 file link letter Here
Ah I didn’t notice that at first. That surely is not how it’s supposed to be. And it’s a separate issue from the mp3 file.
I’ll have a look. Is this SwiftUI? What phone / simulator / device are you running this on?
Ah I didn’t notice that at first. That surely is not how it’s supposed to be. And it’s a separate issue from the mp3 file.
I’ll have a look. Is this SwiftUI? What phone / simulator / device are you running this on?
It's .m4a file not mp3 , it's swift not SwiftUI , iphone13 Pro , Simulator iPhone 14
i will share mp3 file link letter Here
Any update on this?
6361f60195c97c3373483a47.mp3.zip @dmrschmidt Can you check this audio File it's not working
A look at the file header reveals that this is, in fact, not an mp3 file.
Not exactly sure what format it is, but definitely not an mp3 file.
iOS uses a rather simplistic approach when loading a file. It simply looks at the file ending - in your case mp3. When it then tries to load that file, but it does not adhere to the actual mp3 file format, it fails to load.
That's what you are observing.
To fix the issue, please ensure to either
.mp3
ending orOne more addition. I've run the file through MediaInfo and it appears to be in AMR format. Possibly from an online tool called SoundHandle or from an Android Device. The built-in iOS audio libraries do not appear to support that format out of the box. macOS can play it back when the ending is changed to .mp4, but they may be using some other means which are not supported in the same way.
I won't be able to support all different kinds of existing audio formats, so the solution remains the same. Ensure that the files you import are converted to a natively supported file format, which could be valid mp3 or aac among others.
striped(.init(color: .white,width: 5.0,spacing: 8.0,lineCap: .round)
Last Stripe Round cap not showing and also not support mp3 file