andygrundman / Audio-Scan

Audio::Scan - Fast Perl XS metadata and tag reader for all common audio file formats
GNU General Public License v2.0
4 stars 13 forks source link

Some WavPack DSD file the song_length_ms is incorrect #9

Closed aeeq closed 11 months ago

aeeq commented 3 years ago

I found a problem when using LMS. Some WV files the duration is incorrect.

The LMS team says it seems to be a problem in Audio::Scan.

The info from the wavpack file:

  $VAR1={
      'audio_size' => 696793736,
      'file_size' => 696793736,
      'audio_offset' => 0,
      'encoder_version' => 1040,
      'bitrate' => 13922300,
      'song_length_ms' => 400390,
      'total_samples' => 1130061824,
      'channels' => 2,
      'lossless' => 1,
      'samplerate' => 2822400,
      'bits_per_sample' => 1,
      'jenkins_hash' => 1973334605
    };

The info from the decompressed dff file:

  $VAR1 = {
      'bitrate' => 5644814,
      'id3_version' => 'ID3v2.3.0',
      'audio_size' => 1356257280,
      'tag_diar_artist' => 'Cembalo Deluxe Vol. 2',
      'song_length_ms' => 1922133,
      'channels' => 2,
      'bits_per_sample' => 1,
      'jenkins_hash' => 2820175086,
      'samplerate' => 2822400,
      'file_size' => 1356260682,
      'audio_offset' => 144,
      'tag_diti_title' => 'Cembalo Deluxe Vol. 2'
    };

In the latter the correct song_length_ms is given.

The LMS issue link

kimmot commented 3 years ago

I have used this patch in Daphile. Sorry that I have forgot to send it here earlier. 001_fix_wavpack_dsd_song_length_overflow.txt