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

Crashes when I use my audio.m4a file replace VoiceRecordingWeb.m4a https://github.com/FSilver/Resource/blob/main/audio.m4a #7

Closed
FSilver opened this issue Oct 31, 2022 · 1 comment

Comments

@FSilver
Copy link

FSilver commented Oct 31, 2022

  1. func testConversionRoundTrip() {
    let src = Bundle.main.url(forResource: "VoiceRecordingWeb", withExtension: "m4a")!

func testConversionRoundTrip() {
let src = Bundle.main.url(forResource: "audio", withExtension: "m4a")!

  1. creashed
    encoder = opus_encoder_create(opusRate, pcmChannels, application.rawValue, &status)
    OGGEncoder.swift:80: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

  2. AVAudioRecorder
    [
    AVFormatIDKey: NSNumber(value: kAudioFormatMPEG4AAC),
    AVNumberOfChannelsKey: 1,
    AVEncoderAudioQualityKey : AVAudioQuality.low.rawValue,
    AVLinearPCMBitDepthKey : 16,
    AVSampleRateKey : 44100.0
    ]
    use this setting to create audio.m4a
    文件地址 https://github.com/FSilver/Resource/blob/main/audio.m4a

@FSilver FSilver changed the title Crashes when I use my audio.m4a file replace VoiceRecordingWeb.m4a Crashes when I use my audio.m4a file replace VoiceRecordingWeb.m4a https://github.com/FSilver/Resource/blob/main/audio.m4a Oct 31, 2022
@FSilver
Copy link
Author

FSilver commented Oct 31, 2022

must be 48HZ

@FSilver FSilver closed this as completed Oct 31, 2022
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

1 participant