Skip to content

Commit

Permalink
Add proper libdvd-audio download URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
tuffy committed Dec 2, 2014
1 parent f71576c commit dc17b31
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
37 changes: 23 additions & 14 deletions dvda2track
Expand Up @@ -342,6 +342,12 @@ if (__name__ == '__main__'):
output_metadata)) in zip(tracks_to_rip,
range(1, len(tracks_to_rip) + 1),
output_tracks):
# determine whether we're adding ReplayGain
add_replay_gain = (output_class.supports_replay_gain() and
(options.add_replay_gain if
options.add_replay_gain is not None else
audiotools.ADD_REPLAYGAIN))

# get track from title
try:
track = title.track(track_number)
Expand Down Expand Up @@ -370,23 +376,26 @@ if (__name__ == '__main__'):

# encode output file itself
try:
# try to calculate ReplayGain during extraction
# if all tracks have the same sample rate
sample_rates.add(reader.sample_rate)

# all sample rates are identical so far
if len(sample_rates) == 1:
# setup new calculator if one hasn't been already
if replay_gain is None:
replay_gain = \
audiotools.ReplayGainCalculator(reader.sample_rate)

track_reader = replay_gain.to_pcm(reader)
if add_replay_gain:
# try to calculate ReplayGain during extraction
# if all tracks have the same sample rate
sample_rates.add(reader.sample_rate)

# all sample rates are identical so far
if len(sample_rates) == 1:
# setup new calculator if one hasn't been already
if replay_gain is None:
replay_gain = \
audiotools.ReplayGainCalculator(reader.sample_rate)

track_reader = replay_gain.to_pcm(reader)
else:
# sample rate mismatch, so cease calculation
track_reader = reader
else:
# sample rate mismatch, so cease calculation
# not adding ReplayGain at all
track_reader = reader


track = output_class.from_pcm(
str(output_filename),
audiotools.PCMReaderProgress(
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Expand Up @@ -29,7 +29,8 @@ libcdio_paranoia: probe
# If not present, the audiotools.dvda module will be omitted
# and the dvda2track and dvdainfo utilities won't be installed.
#
# libdvd-audio can be downloaded from: ???
# libdvd-audio can be downloaded from:
# http://libdvd-audio.sourceforge.net
libdvd-audio: probe

# libpulse is used for PulseAudio playback
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -53,7 +53,7 @@

LIBRARY_URLS = {"libcdio_paranoia": "http://www.gnu.org/software/libcdio/",
"libcdio": "http://www.gnu.org/software/libcdio/",
"libdvd-audio": "http://???", #FIXME
"libdvd-audio": "http://libdvd-audio.sourceforge.net",
"libmpg123": "http://www.mpg123.org",
"vorbisfile": "http://xiph.org",
"opusfile": "http://www.opus-codec.org",
Expand Down

0 comments on commit dc17b31

Please sign in to comment.