Opened 17 years ago

Closed 10 years ago

#4804 closed Patch - Feature (Won't Fix)

Add software amplification support to libmyth/AudioOutput

Reported by: chhamilton@… Owned by: JYA
Priority: minor Milestone: unknown
Component: MythTV - Audio Output Version: 0.23.1
Severity: low Keywords: replaygain mythmusic preamp amplification gain
Cc: Ticket locked: no

Description

In anticipation of adding ReplayGain? support to MythMusic, it is required that the AudioOutput? layer support software amplification.

Attachments (7)

preamp-r16313.patch (6.6 KB) - added by chhamilton@… 17 years ago.
Patch adding software preamp to libmyth/AudioOutput.
libs_libmyth-preamp-patch-ticket-4804.patch (7.4 KB) - added by Erik Hovland <erik@…> 17 years ago.
This patch is the same patch, but against trunk as of 2008-04-14
libs_libmyth-change-pound-define-function-to-generic.patch (3.1 KB) - added by Erik Hovland <erik@…> 17 years ago.
Replaces the #define APPLY_PRE_AMP with a C++ generic function
libs_libmyth-change-pound-define-function-to-generic.2.patch (3.1 KB) - added by Erik Hovland <erik@…> 17 years ago.
Replaces the previous patch. There was a bug where I accidentally dropped the multiply operator
libs_libmyth-suppress-compiler-warnings-ticket-4804.patch (1.2 KB) - added by Erik Hovland <erik@…> 16 years ago.
Suppresses compiler warnings introduced in the original patch
libs_libmyth-preamp-patch-ticket-4804 (7.5 KB) - added by Erik Hovland <erik@…> 15 years ago.
Same patch as before but against trunk as of 2010-02-03
libs_libmyth-preamp-patch-ticket-4804.2 (7.5 KB) - added by Erik Hovland <erik@…> 15 years ago.
Same patch as before but against trunk as of 2010-02-03

Download all attachments as: .zip

Change History (24)

Changed 17 years ago by chhamilton@…

Attachment: preamp-r16313.patch added

Patch adding software preamp to libmyth/AudioOutput.

comment:1 Changed 17 years ago by chhamilton@…

I've attached a patch that adds software preamp software to AudioOutput/AudioOutputBase?. The approach taken was to inplace modify all samples fed to AudioOutputBase::AddSamples?. There is also some early clipping monitoring stuff in place, which could eventually be used to implement an automatic gain control if so desired.

The patch is relative to the mythtv/libs/libmyth directory of revision 16313, and can be found here.

comment:2 in reply to:  1 Changed 17 years ago by Roo <roo.watt@…>

Replying to chhamilton@hotmail.com:

There is also some early clipping monitoring stuff in place, which could eventually be used to implement an automatic gain control if so desired.

Another use that springs to mind is to correct for differences between mythmusic and recording volume for playback.

Haven't tried the patch but nice idea.

Changed 17 years ago by Erik Hovland <erik@…>

This patch is the same patch, but against trunk as of 2008-04-14

Changed 17 years ago by Erik Hovland <erik@…>

Replaces the #define APPLY_PRE_AMP with a C++ generic function

comment:3 Changed 17 years ago by Erik Hovland <erik@…>

Probably someone will pipe up and say whether the #define or my idea for a generic function is a better idea or not. But since I would like to see this patch or something like it get into the tree, I have integrated it into my patch set and will continue to do what I can for it.

Changed 17 years ago by Erik Hovland <erik@…>

Replaces the previous patch. There was a bug where I accidentally dropped the multiply operator

comment:4 Changed 17 years ago by stuartm

Milestone: unknown0.22
Version: unknownhead

This functionality will definitely make it into the tree, but we're all pretty busy right now and no-one has got around to reviewing it yet.

Changed 16 years ago by Erik Hovland <erik@…>

Suppresses compiler warnings introduced in the original patch

comment:5 Changed 16 years ago by Erik Hovland <erik@…>

I noticed that while compiling mythmusic and mythphone with the original patch in place that the introduced member functions that take values are not abstract and as such do not deal with the given parameters. The compiler throws a warning because the parameters are unused. The newly attached patch changes those member functions so that the warning is suppress. It requires the original patch (or the updated version I attached on 2008-04-14).

comment:6 Changed 16 years ago by elkin@…

does this patch provide the possibility of making sure that the volume of AC3, mp3 etc is the same from recording to recording? Right now I have recordings in AC3 that are very quiet compared to recordings with mp3 in them.

comment:7 Changed 16 years ago by stuartm

Ticket locked: set

comment:8 Changed 15 years ago by stuartm

Component: mythtvMythTV - General
Milestone: 0.220.23
Ticket locked: unset

comment:9 Changed 15 years ago by paulh

Component: MythTV - GeneralMythTV - Audio Output
Owner: changed from Isaac Richards to JYA
Status: newassigned

Changed 15 years ago by Erik Hovland <erik@…>

Same patch as before but against trunk as of 2010-02-03

Changed 15 years ago by Erik Hovland <erik@…>

Same patch as before but against trunk as of 2010-02-03

comment:10 Changed 15 years ago by paulh

Milestone: 0.230.24

comment:11 Changed 14 years ago by JYA

Milestone: 0.240.25

ReplayGain? isn't supported in mythmusic, so no much point at this stage to merge it

comment:12 Changed 14 years ago by chhamilton@…

This is a minimally invasive change, and a prerequisite to ever adding ReplayGain? support. Why not simply merge it now? Heck, I might even feel sufficiently motivated by that show of faith to revisit my old implementation of ReplayGain? for MythMusic (built against 0.20-fixes once upon a time).

comment:13 Changed 14 years ago by JYA

That patch needs to be almost fully rewritten for the new audio code. It can't be merged as is.

comment:14 Changed 14 years ago by stuartm

Milestone: 0.25

Milestone 0.25 deleted

comment:15 Changed 13 years ago by beirdo

Milestone: 0.25unknown

comment:16 Changed 13 years ago by stuartm

Type: enhancementPatch - Feature
Version: head0.23.1

comment:17 Changed 10 years ago by paulh

Resolution: Won't Fix
Status: assignedclosed

Don't think there is much point keeping this ticket open the patch needs to be completely rewritten for the new audio code.

Note: See TracTickets for help on using tickets.