diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-18 23:19:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-18 23:19:22 +0100 |
| commit | 75518e16a2c35400ac641975c74ff72b404cef69 (patch) | |
| tree | c9baedfcbc728aacb5d748faa91f1c4ef3c58239 /src/lib/player.cc | |
| parent | 88ea433b3fa1c09b94ffc94b48e164a40ede9cfa (diff) | |
Try to make audio gain work again.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index f8ccb0142..ebc810214 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -300,6 +300,13 @@ Player::process_audio (weak_ptr<Piece> weak_piece, shared_ptr<const AudioBuffers shared_ptr<AudioContent> content = dynamic_pointer_cast<AudioContent> (piece->content); assert (content); + /* Gain */ + if (content->audio_gain() != 0) { + shared_ptr<AudioBuffers> gain (new AudioBuffers (audio)); + gain->apply_gain (content->audio_gain ()); + audio = gain; + } + /* Resample */ if (content->content_audio_frame_rate() != content->output_audio_frame_rate()) { shared_ptr<Resampler> r = resampler (content, true); |
