mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
pcm_mixer: Get default sample rate from pcm layer.
Change-Id: I6eccb37556e70f23112bbb0e26f4a45ac0930245
This commit is contained in:
parent
759ef2767a
commit
daef425c59
1 changed files with 5 additions and 2 deletions
|
|
@ -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,6 +266,9 @@ static void mixer_start_pcm(void)
|
|||
#endif
|
||||
|
||||
/* Requires a shared global sample rate for all channels */
|
||||
if (mixer_sampr == -1UL)
|
||||
mixer_sampr = pcm_get_frequency();
|
||||
else
|
||||
pcm_set_frequency(mixer_sampr);
|
||||
|
||||
/* Prepare initial frames and set up the double buffer */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue