Which audio file format is the easiest to manipulate?

Hi, nice computer faces,

In accordance with the question that I had previously regarding access to samples in the audio file , now I understand that there may not be a Core Audio Format.

Moreover, on page 15 of the specification , it mentions something that C is "notational convenience", i.e. you can't just hack it with some c functions and do what you want with it.

However, if I want to open an audio file and then run C, C ++ or Objective-C code on it to play around with the sample values, in which format is it best to do this: WAV? AIFF? other?

Please keep in mind that I would like it to be able to run on iOS.

Thanks!

+4
source share
5 answers

Uncompressed WAV is the defacto standard for audio editing. You can use various libraries to easily manipulate them. If you just want completely raw samples, even if the WAV header is not sent with PCM, you will need to know the frequency of your choice, frequency, etc. Since you will not have the kind of information that will usually be in the WAV header, these are uncompressed samples.

+2
source

Uncompressed WAV files. They consist of a header followed by raw samples.

+9
source

I somehow manipulated WAV through C ++, and it was pretty easy. I used this specification to write my code: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ With this document and a little understanding of digital sound, you can easily manipulate WAV files.

+5
source

The simplest uncompressed WAV file format has only a 44-byte header (which tells you the sampling rate, the number of bits to sample and whether the data is stereo pairs or mono), and then directly into the raw PCM array (usually) short integers.

In a low-intensity processor (for example, Intel or most ARM), you can map this file format directly to the C array of 16-bit shorts and simply index it with the corresponding offset from the header.

+1
source

Uncompressed WAV will be the easiest to use, since you do not need to deal with decrypting them before manipulating, so you probably want to start with this until you are confident in your manipulation procedures / code.

However, if you do not plan to use only a few spot effects or a rather large resulting package, it may be, in the end, better to look at something like IMA ADPCM. The decoding algorithms are there (more on this at http://wiki.multimedia.cx/index.php?title=IMA_ADPCM ), it is relatively simple to implement, and this will allow you to pick up more sounds in your product.

0
source

Source: https://habr.com/ru/post/1338901/


All Articles