Opened 10 years ago

Closed 10 years ago

#1561 closed defect (fixed)

[PATCH] Adjusting softvol / volume filter during playback causes static on big-endian audio on little-endian archs

Reported by: compn Owned by: reynaldo@…
Priority: normal Component: af
Version: HEAD Severity: normal
Keywords: Cc: rotmer@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

-af volume=5 works
but using -softvol and 0/9 keys causes static

Attachments (1)

mplayer-audio-formats-filter-fix-ver3.patch (3.2 KB) - added by rotmer@… 10 years ago.
Initial patch for this bug.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by rotmer@…

  • Cc rotmer@… added

Adding patch for seems like this bug i'm having issues here too with. For me here it is triggered with s16be audio. Here is the related output:

AUDIO: 48000 Hz, 2 ch, s16be, 1536.0 kbit/100.00% (ratio: 192000->192000)
AO: [alsa] 48000Hz 2ch s16be (2 bytes per sample)

I don't like quite that much how exactly that patch works, so resulting chain looks like this then: input s16be -> format filter s16le -> softvol s16le -> format s16be -> output s16be, so there are 2 format filters for just softvol to work okay, but it works here nevertheless.

Maybe better way would be to somehow switch output to s16le on the fly as it is done automatically when you run mplayer -af volume file.vob, in this case related output is:

AUDIO: 48000 Hz, 2 ch, s16be, 1536.0 kbit/100.00% (ratio: 192000->192000)
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

And soltvol works fine as it is now without patches.

Changed 10 years ago by rotmer@…

Initial patch for this bug.

comment:2 Changed 10 years ago by rotmer@…

comment:3 Changed 10 years ago by rotmer@…

  • Summary changed from adjusting softvol / volume filter during playback causes static on u8 audio to Adjusting softvol / volume filter during playback causes static on big-endian audio on little-endian archs

Ah, just noticed sample avi file from Reynaldo http://samples.mplayerhq.hu/avi/toonumentary-skieth.avi. It works here okay on svn without patches, so changing Summary a bit to actual sample file to date http://narod.ru/disk/17990301000/softvol-static-bug-1561.vob.html.

comment:4 Changed 10 years ago by rotmer@…

  • bug_file_loc changed from http://samples.mplayerhq.hu/avi/toonumentary-skieth.avi to http://narod.ru/disk/17990301000/softvol-static-bug-1561.vob.html

comment:5 Changed 10 years ago by rotmer@…

  • Summary changed from Adjusting softvol / volume filter during playback causes static on big-endian audio on little-endian archs to [PATCH] Adjusting softvol / volume filter during playback causes static on big-endian audio on little-endian archs

comment:6 Changed 10 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

Avoiding double format filters would either mean converting to le from the start (giving worse performance if volume control is never actually used) or reinitializing the output (giving audio dropout when changing volume the first time), neither is really any better.
Fixed in SVN r30659, however without calling af_reinit recursively, recursion really should be reserved for cases where it means a vast simplification, otherwise the risk of endless recursion is a too high maintenance burden.

Note: See TracTickets for help on using tickets.