• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Decoding compressed audio to LPCM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Decoding compressed audio to LPCM


  • Subject: Decoding compressed audio to LPCM
  • From: Waverly Edwards <email@hidden>
  • Date: Mon, 02 Jul 2018 20:36:37 +0000
  • Thread-topic: Decoding compressed audio to LPCM

Would someone provide guidance on how I can decompress M4A and AAC files into
memory as raw LPCM.
I need to decompress M4A and AAC files, manipulate and recompress the files
back to disk.
Writing data from LPCM to M4A or AAC is not a problem (except AAC file
durations are always wrong but will play)

I can read .caf, .m4a, .aac files into the buffer using the below code but only
the .caf files are actually raw and allow me to work directly with the buffer
contents

let file = try? AVAudioFile(forReading: url)
let buffer = AVAudioPCMBuffer(pcmFormat: file!.processingFormat, frameCapacity:
AVAudioFrameCount(file!.length))
do {
    try file!.read(into: buffer!)
} catch  {
// problem, do something
}

I  looked into AVAudioCompressedBuffer but I do not see how I get the data into
this type of buffer and how to expand this into raw data for manipulation

If it matters, I am programming on OSX (Sierra).

Any advice?

Thank you,


W.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Decoding compressed audio to LPCM
      • From: Matt Ingalls <email@hidden>
  • Next by Date: Re: Decoding compressed audio to LPCM
  • Next by thread: Re: Decoding compressed audio to LPCM
  • Index(es):
    • Date
    • Thread