Skip to content

File Format: ADS

Emily Pasfield edited this page Nov 30, 2024 · 2 revisions

ads (or ss2) is a proprietary format developed by Sony. Created to store audio streams, most commonly PCM16_LE or SONY_4BIT_ADPCM/VAG streams. It is a very similar concept to traditional WAV files, but with a simpler header. Event thought the typical extension for these is ads, it is possible to find this format under a variety of different ones, such as ss2.

It was used on many PlayStation 2 games.

File Structure

The header's magic number should be "SShd", and the body's magic number should be "SSbd". The header size is typically 24 bytes, but depending on the revision of the ADS header it could change.

There are two main stream codecs:

  • 1 (0x01): PCM16_LE
  • 16 (0x10): SONY_4BIT_ADPCM/VAG

If the case is the latter, the audio data must be split up into chunks that are 16 bytes wide, refer to the VAG chunk format.

The sample rate and number of channels must always be greater than 0.

The interleave specifies how many bytes to read for each channel, for example if the stream has 2 channels (normal stereo) and the interleave is set to 64, the bytes will be read as

  • 64 bytes for the left channel
  • 64 bytes for the right channel
  • 64 bytes for the left channel
  • 64 bytes for the right channel
  • ...

However with the number of channels set to 1 (mono), the interleave is irrelevant and must be set to 0.

Name Type Endianness
Header magic number ASCII character x4 N/A
Header size Unsigned 32 bit integer Little
Stream codec Unsigned 32 bit integer Little
Sample rate Unsigned 32 bit integer Little
Number of channels Unsigned 32 bit integer Little
Interleave Unsigned 32 bit integer Little
Padding Unsigned 32 bit integer Little
Padding Unsigned 32 bit integer Little
Body magic number ASCII character x4 N/A
Body size Unsigned 32 bit integer Little

Body continues to the end of the file.

Clone this wiki locally