Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: pcm_set_frequency is ignored

Re: pcm_set_frequency is ignored

From: Magnus Holmgren <lear_at_algonet.se>
Date: Mon, 01 Sep 2008 07:24:24 +0200

Joseph Garvin wrote:

> I tried:
>
> struct dsp_config* dsp = (struct dsp_config
> *)rb->dsp_configure(NULL, DSP_MYDSP,
>
> CODEC_IDX_AUDIO);
> rb->dsp_configure(dsp, DSP_SWITCH_FREQUENCY, 22050);
> rb->pcm_set_frequency(22050);
> rb->pcm_apply_settings();
>
> But this still had no effect, at least in the simulator. Do I need to
> use dsp_process somehow? It's unclear to me how it works. I'm still
> playing the sound with pcm_play_data.

Ah, yes. pcm_play_data is a low-level interface, which is only capable
of playing what the hardware supports. dsp.c can be used to do the
conversions needed, as well as some other audio processing (like the
equalizer). As this is "apps" code, the DSP works fine in the simulator.

By the way, from what I can tell, on Sansas (and most PortalPlayer
targets), the frequency argument in pcm_set_frequency is ignored.

   Magnus
Received on 2008-09-01


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa