pcm_mixer: Get default sample rate from pcm layer.
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit daef425c5946651408b0ac496955bc07e2bdf632 Author: Solomon Peachy <[email protected]> Date: Sat Mar 28 08:14:52 2026 -0400 pcm_mixer: Get default sample rate from pcm layer. Change-Id: I6eccb37556e70f23112bbb0e26f4a45ac0930245 diff --git a/firmware/pcm_mixer.c b/firmware/pcm_mixer.c index d36560f149..92da971fb1 100644 --- a/firmware/pcm_mixer.c +++ b/firmware/pcm_mixer.c @@ -33,7 +33,7 @@ before the last samples are sent to the codec and so things are done in parallel (as much as possible) with sending-out data. */ -static unsigned int mixer_sampr = HW_SAMPR_DEFAULT; +static unsigned int mixer_sampr = -1UL; static unsigned int mix_frame_size = MIX_FRAME_SAMPLES*4; /* Define this to nonzero to add a marker pulse at each frame start */ @@ -266,7 +266,10 @@ static void mixer_start_pcm(void) #endif /* Requires a shared global sample rate for all channels */ - pcm_set_frequency(mixer_sampr); + if (mixer_sampr == -1UL) + mixer_sampr = pcm_get_frequency(); + else + pcm_set_frequency(mixer_sampr); /* Prepare initial frames and set up the double buffer */ mixer_buffer_callback(PCM_DMAST_STARTED); -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs