Opened 3 years ago

Closed 3 years ago

#7233 closed defect (invalid)

Problem with decoding gta3 sound assets in c++ lang

Reported by: Filip Owned by:
Priority: normal Component: avcodec
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug: ffmpeg 4.0 broke mp3 compatibility with openAL buffers(AV_SAMPLE_FMT_S16P)
How to reproduce: download latest version of openRW(requires gta3 assets), after starting new game there's no sound in cutscenes (mp3 stereo example: BET.mp3)

I think it's caused by switching from decoder mp3 to mp3float.

I was trying to use workaround - libswresampler. Mp3 started working, but then started happen problems with mono wav(pcm). FFmpeg doesn't recognized channel_layout and crashes. To fix it I've set it manually every time when nr channels is equal one. But then when playing these sounds it possible to hear cracking/ticking. I would say artifacts.

(there's also 80MB file with short pcm sounds, with resampling sounds are distorted and audible everywhere(in binaural mode))


pull on which I work:

manually trying to decode:

ffmpeg version 4.0
built on arch linux

Change History (1)

comment:1 by Carl Eugen Hoyos, 3 years ago

Resolution: invalid
Status: newclosed

Neither sample format for a given decoder nor the default decoder for a given format is part of the api. The second would not be possible, the first is simply a fact, both pixel format and sample format have changed in the past.

Note: See TracTickets for help on using tickets.