From e35f5b3644753e5d95975c37f132e64b059db335 Mon Sep 17 00:00:00 2001 From: pudding Date: Sun, 28 Jan 2024 14:05:59 +0000 Subject: [PATCH] Emit some more audio properties for CD --- .../BassCdMetaDataSourceStrategy.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/FoxTunes.Output.Bass.Cd/BassCdMetaDataSourceStrategy.cs b/FoxTunes.Output.Bass.Cd/BassCdMetaDataSourceStrategy.cs index 401784cf5..5453d5417 100644 --- a/FoxTunes.Output.Bass.Cd/BassCdMetaDataSourceStrategy.cs +++ b/FoxTunes.Output.Bass.Cd/BassCdMetaDataSourceStrategy.cs @@ -6,6 +6,14 @@ namespace FoxTunes { public class BassCdMetaDataSourceStrategy : BaseComponent, IBassCdMetaDataSourceStrategy { + const int BIT_RATE = 1411; + + const int CHANNELS = 2; + + const int SAMPLE_RATE = 44100; + + const int BITS_PER_SAMPLE = 16; + public BassCdMetaDataSourceStrategy(int drive) { this.Drive = drive; @@ -37,6 +45,22 @@ public virtual IEnumerable GetProperties(int track) //What the fuck is this? Something to do with 44.1kHz/16bit? Value = ((BassCd.GetTrackLength(this.Drive, track) / 176400) * 1000).ToString() }; + yield return new MetaDataItem(CommonProperties.AudioBitrate, MetaDataItemType.Property) + { + Value = BIT_RATE.ToString() + }; + yield return new MetaDataItem(CommonProperties.AudioChannels, MetaDataItemType.Property) + { + Value = CHANNELS.ToString() + }; + yield return new MetaDataItem(CommonProperties.AudioSampleRate, MetaDataItemType.Property) + { + Value = SAMPLE_RATE.ToString() + }; + yield return new MetaDataItem(CommonProperties.BitsPerSample, MetaDataItemType.Property) + { + Value = BITS_PER_SAMPLE.ToString() + }; } } }