dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: pcm_set_frequency is ignored

Re: pcm_set_frequency is ignored

From: Joseph Garvin <>
Date: Mon, 1 Sep 2008 08:48:46 -0400

On Mon, Sep 1, 2008 at 1:24 AM, Magnus Holmgren <> wrote:

> Joseph Garvin wrote:
> I tried:
>> struct dsp_config* dsp = (struct dsp_config *)rb->dsp_configure(NULL,
>> 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.

Ah, OK. So I'm guessing I need to make a buffer, and give pcm_play_data a
callback that will use dsp_process to fill that buffer (I'm assuming
dsp_process's output is sound converted to the player's preferred
frequency, channels, etc. and that you use dsp_configure to let it know the
format of the input). I'll give that a try.
Received on 2008-09-01

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy