sbooth / SFBAudioEngine

A powerhouse of audio functionality for macOS and iOS
https://sbooth.github.io/SFBAudioEngine/
MIT License
552 stars 87 forks source link

Correct mishandling of encoder parameters #212

Closed mytianer closed 2 years ago

mytianer commented 2 years ago

Hello, when I use this library, I found a lot of problems, many formats cannot be directly converted successfully using the following code: try AudioConverter.convert(file.url, to: URL(fileURLWithPath: "xxxxx/xxxx.xxx"))

Others

  1. Opus and speex encode work well, but there is a problem with decoding playback
  2. There seems to be a problem when ogg and oga encode
  3. The use of custom encoder parameters for mp3 has no effect

I'm not proficient with c and c++ code, I don't know if I'm using the wrong method or there is an error in itself

sbooth commented 2 years ago

Thanks for this PR. You've certainly found a few bugs and most of your changes are correct. Please see my other comments on a few of the specifics.

Regarding the other issues you raise, could you open a separate issue for each one for easier tracking?

sbooth commented 2 years ago

If you make the two changes discussed above I should be able to merge this PR.

mytianer commented 2 years ago

I have already modified 2 files

sbooth commented 2 years ago

Thank you for this PR. This repository has a signed commit policy so since the changes were somewhat small I went ahead and duplicated them in PRs #213 and #214