mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Support external decoders that don't report valid length in wav header
This commit is contained in:
@@ -210,7 +210,23 @@ namespace TagLib.Aac
|
||||
{
|
||||
return audiobitrate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
|
||||
@@ -276,9 +276,25 @@ namespace TagLib.Aiff
|
||||
return (int) ((stream_length*8L)/
|
||||
d.TotalSeconds)/1000;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -303,9 +303,25 @@ namespace TagLib.Ape {
|
||||
return (int) ((stream_length * 8L) /
|
||||
d.TotalSeconds) / 1000;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -131,9 +131,25 @@ namespace TagLib.Flac
|
||||
((stream_length * 8L) /
|
||||
Duration.TotalSeconds) / 1000 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -123,8 +123,18 @@ namespace TagLib {
|
||||
/// A <see cref="int" /> value containing a bitrate of the
|
||||
/// audio represented by the current instance.
|
||||
/// </value>
|
||||
int AudioBitrate {get;}
|
||||
|
||||
int AudioBitrate {get;}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
long AudioSampleCount {get;}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
|
||||
@@ -133,8 +133,23 @@ namespace TagLib.Matroska
|
||||
public int AudioBitrate
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Audio track sampling rate.
|
||||
/// </summary>
|
||||
|
||||
@@ -214,9 +214,25 @@ namespace TagLib.MusePack {
|
||||
((stream_length * 8L) /
|
||||
Duration.TotalSeconds) / 1000 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -359,9 +359,25 @@ namespace TagLib.Mpeg {
|
||||
AudioLayer > 0 ? AudioLayer - 1 : 0,
|
||||
(int) (flags >> 12) & 0x0F];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -193,9 +193,25 @@ namespace TagLib.Mpeg4 {
|
||||
// Return from the elementary stream descriptor.
|
||||
return (int) esds.AverageBitrate;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -213,9 +213,25 @@ namespace TagLib.Ogg.Codecs
|
||||
return (int) ((float)header.bitrate_nominal /
|
||||
1000f + 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -244,9 +244,37 @@ namespace TagLib {
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (ICodec codec in codecs)
|
||||
{
|
||||
if (codec == null ||
|
||||
(codec.MediaTypes & MediaTypes.Audio) == 0)
|
||||
continue;
|
||||
|
||||
IAudioCodec audio = codec as IAudioCodec;
|
||||
|
||||
if (audio != null && audio.AudioSampleCount != 0)
|
||||
return audio.AudioSampleCount;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -203,9 +203,25 @@ namespace TagLib.Riff {
|
||||
return (int) Math.Round (
|
||||
average_bytes_per_second * 8d / 1000d);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample rate of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -148,9 +148,25 @@ namespace TagLib.WavPack {
|
||||
|
||||
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sample count of the audio represented by the
|
||||
/// current instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="int" /> value containing the sample count
|
||||
/// of the audio represented by the current instance.
|
||||
/// </value>
|
||||
public long AudioSampleCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the duration of the media represented by the current
|
||||
/// instance.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user