According to @naught101 comment, I would follow this process to detect the best acodec:
$ ffmpeg -formats | grep PCM
DE f32be PCM 32-bit floating-point big-endian
DE f32le PCM 32-bit floating-point little-endian
DE f64be PCM 64-bit floating-point big-endian
DE f64le PCM 64-bit floating-point little-endian
DE s16be PCM signed 16-bit big-endian
DE s16le PCM signed 16-bit little-endian
DE s24be PCM signed 24-bit big-endian
DE s24le PCM signed 24-bit little-endian
DE s32be PCM signed 32-bit big-endian
DE s32le PCM signed 32-bit little-endian
DE u16be PCM unsigned 16-bit big-endian
DE u16le PCM unsigned 16-bit little-endian
DE u24be PCM unsigned 24-bit big-endian
DE u24le PCM unsigned 24-bit little-endian
DE u32be PCM unsigned 32-bit big-endian
DE u32le PCM unsigned 32-bit little-endian
At this point, consider your platform to choose between big-endian, little-endian, the choose bitrate:
$ ffmpeg -i sample.mp3
[mp3 @ 0x7fb33180da00] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'sample.mp3':
Metadata:
title : Saturday
artist : Winterwood
album : Love In The Heart
track : 2/15
TPA : 1/1
encoded_by : iTunes 11.0.1
genre : Country & Folk
date : 1997
Duration: 00:04:27.76, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
We can see that this audio file is a mp3 (this is not obvious, despite of the extension of the input file, just check the bytes) has a bitrate of 128 kb/s, the codec was s16p, sampling at 44100 Hz, so we choose accordingly:
$ ffmpeg -i sample.mp3 -acodec pcm_s16le -ar 44100 sample.wav
Input #0, mp3, from 'sample.mp3':
Metadata:
title : Saturday
artist : Winterwood
album : Love In The Heart
track : 2/15
TPA : 1/1
encoded_by : iTunes 11.0.1
genre : Country & Folk
date : 1997
Duration: 00:04:27.76, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
File 'sample.wav' already exists. Overwrite ? [y/N] y
Output #0, wav, to 'sample.wav':
Metadata:
INAM : Saturday
IART : Winterwood
IPRD : Love In The Heart
IPRT : 2/15
TPA : 1/1
ITCH : iTunes 11.0.1
IGNR : Country & Folk
ICRD : 1997
ISFT : Lavf56.4.101
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Metadata:
encoder : Lavc56.1.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
size= 46125kB time=00:04:27.75 bitrate=1411.2kbits/s
video:0kB audio:46125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000457%
If you are on mac you can that check the audio if it has no white noise at the beginning / end (when the mp3 original audio has no audio for some msec/sec):
$ afplay sample.wav
and of course you can double check the bitmap:
$ ffmpeg -i sample.wav
Input #0, wav, from 'sample.wav':
Metadata:
artist : Winterwood
date : 1997
genre : Country & Folk
title : Saturday
album : Love In The Heart
track : 2/15
encoder : Lavf56.4.101
encoded_by : iTunes 11.0.1
Duration: 00:04:27.76, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s