plugins: pacbox: remove hw_freq_sampr usage

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 9b207bfb91b26603d19ccb70a15ee8c29ddadd7c
Author: mojyack <[email protected]>
Date:   Mon Feb 16 11:29:55 2026 +0900

    plugins: pacbox: remove hw_freq_sampr usage
    
    Change-Id: I365b4f901dd2fbcc22bf1a8009a9d9b58a1da556

diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c
index a8208f1e51..34f103039d 100644
--- a/apps/plugins/pacbox/pacbox.c
+++ b/apps/plugins/pacbox/pacbox.c
@@ -395,19 +395,19 @@ static void start_sound(void)
 #endif
 
     /* Get the closest rate >= to what is preferred */
+    const struct pcm_sink_caps* caps = rb->pcm_current_sink_caps();
     sr_index = rb->round_value_to_list32(PREFERRED_SAMPLING_RATE,
-                        rb->hw_freq_sampr, HW_NUM_FREQ, false);
+                        caps->samprs, caps->num_samprs, false);
 
-    if (rb->hw_freq_sampr[sr_index] < PREFERRED_SAMPLING_RATE
-        && sr_index > 0)
+    if (caps->samprs[sr_index] < PREFERRED_SAMPLING_RATE && sr_index > 0)
     {
         /* Round up */
         sr_index--;
     }
 
-    wsg3_set_sampling_rate(rb->hw_freq_sampr[sr_index]);
+    wsg3_set_sampling_rate(caps->samprs[sr_index]);
 
-    rb->mixer_set_frequency(rb->hw_freq_sampr[sr_index]);
+    rb->mixer_set_frequency(caps->samprs[sr_index]);
     rb->mixer_channel_play_data(PCM_MIXER_CHAN_PLAYBACK, get_more, NULL, 0);
 
     sound_playing = true;
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.