mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-09 23:53:28 -04:00
test_codec: set the DSP's output samplerate
The DSP gets its output samplerate from the codec thread when a track is played. test_codec did not set it, so its runs with the DSP used the rate of the last track played, or the default if there was none: after "Playback frequency" was changed, they resampled to the old rate until something had been played. Set it from the mixer for each file, as the codec thread does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e27fb9a9f0
commit
4c08906670
1 changed files with 5 additions and 0 deletions
|
|
@ -726,6 +726,11 @@ static enum plugin_status test_track(const char* filename)
|
|||
|
||||
if (use_dsp) {
|
||||
rb->dsp_configure(ci.dsp, DSP_RESET, 0);
|
||||
/* The DSP is told its output samplerate when a track is played.
|
||||
* Tell it here as well, or it is that of the last track and not
|
||||
* what playback would use now. */
|
||||
rb->dsp_configure(ci.dsp, DSP_SET_OUT_FREQUENCY,
|
||||
rb->mixer_get_frequency());
|
||||
rb->dsp_configure(ci.dsp, DSP_FLUSH, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue