mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
plugins: pacbox: remove hw_freq_sampr usage
Change-Id: I365b4f901dd2fbcc22bf1a8009a9d9b58a1da556
This commit is contained in:
parent
da53cc0f14
commit
9b207bfb91
1 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue