LibMedia: Read the Matroska SamplingFrequency element

This commit is contained in:
Zaggy1024 2025-10-21 15:04:41 -05:00 committed by Jelle Raaijmakers
parent 364b422ae0
commit 180f2a07f1
Notes: github-actions[bot] 2025-11-21 10:04:21 +00:00

View file

@ -73,6 +73,7 @@ constexpr u32 BITS_PER_CHANNEL_ID = 0x55B2;
// Audio
constexpr u32 CHANNELS_ID = 0x9F;
constexpr u32 SAMPLING_FREQUENCY_ID = 0xB5;
constexpr u32 BIT_DEPTH_ID = 0x6264;
// Clusters
@ -449,6 +450,10 @@ static DecoderErrorOr<TrackEntry::AudioTrack> parse_audio_track_information(Stre
audio_track.channels = TRY_READ(streamer.read_u64());
dbgln_if(MATROSKA_TRACE_DEBUG, "Read AudioTrack's Channels attribute: {}", audio_track.channels);
break;
case SAMPLING_FREQUENCY_ID:
audio_track.sampling_frequency = TRY_READ(streamer.read_float());
dbgln_if(MATROSKA_TRACE_DEBUG, "Read AudioTrack's SamplingFrequency attribute: {}", audio_track.channels);
break;
case BIT_DEPTH_ID:
audio_track.bit_depth = TRY_READ(streamer.read_u64());
dbgln_if(MATROSKA_TRACE_DEBUG, "Read AudioTrack's BitDepth attribute: {}", audio_track.bit_depth);