Opened 15 years ago

Closed 14 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: no Analyzed by developer: no

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@… 14 years ago.
Initial patch for this bug.

Download all attachments as: .zip

Change History (7)

comment:1 by rotmer@…, 14 years ago

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.

by rotmer@…, 14 years ago

Initial patch for this bug.

comment:2 by rotmer@…, 14 years ago

comment:3 by rotmer@…, 14 years ago

Summary: adjusting softvol / volume filter during playback causes static on u8 audioAdjusting 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 by rotmer@…, 14 years ago

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

comment:5 by rotmer@…, 14 years ago

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

comment:6 by reimar, 14 years ago

Resolution: fixed
Status: newclosed

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.