SDL_mixer: aiff: set audio duration. (d00c4)

From d00c491d313f23bb91956d0c46c8009dcedf6314 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 10 Mar 2026 17:10:03 -0400
Subject: [PATCH] aiff: set audio duration.

(Thanks, BeWorld2018!)

Reference Issue #828.

(cherry picked from commit f9d6701d5d0e621cc0acd47103246eefc8a594c4)
---
 src/decoder_aiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/decoder_aiff.c b/src/decoder_aiff.c
index ac13b84c..3ffac607 100644
--- a/src/decoder_aiff.c
+++ b/src/decoder_aiff.c
@@ -381,6 +381,7 @@ static bool AIFF_init_audio_internal(AIFF_AudioData *adata, SDL_IOStream *io, SD
     adata->framesize = channels * (samplesize / 8);
     adata->stop = adata->start + channels * numsamples * (samplesize / 8);
     adata->fetch = FetchPCM;
+    adata->num_pcm_frames = (Sint64) numsamples;
 
     // Decode the audio data format
     spec->freq = (int)frequency;
@@ -499,7 +500,6 @@ static bool SDLCALL AIFF_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_P
         return false;
     }
 
-    adata->num_pcm_frames = MIX_DURATION_UNKNOWN;  // !!! FIXME: AIFF_init_audio_internal needs to set this.
     const bool rc = AIFF_init_audio_internal(adata, io, spec, props);
     if (!rc) {
         SDL_free(adata);