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

Rockbox mail archive

Subject: Re: Simulator dummy functions

Re: Simulator dummy functions

From: Stéphane Doyon <>
Date: Tue, 16 Oct 2007 13:38:03 -0400 (EDT)

On Mon, 15 Oct 2007, pondlife wrote:

> Hi Stéphane,
> Ideally, the same code *should* be compiled in (and run) on the sim.
> Obviously this doesn't apply to some low-level code (e.g. FAT support,
> hardware access), but I would think talk.c shouldn't need to be split.
> What function were you thinking of?

On Mon, 15 Oct 2007, Nils wrote:

> talk.c is not built for hwcodec sims as they don't have playback at all, it
> is however built and works in swcodec sims.

Right, I should have specified HWCODEC sim.
talk.h has this:

/* We don't build talk.c for hwcodec sims so we need to define these as
empty */
#define talk_force_enqueue_next(...)
#define talk_idarray(...)
#define talk_ids(...)
#define cond_talk_ids(...)
#define cond_talk_ids_fq(...)
#define shutup(...)

... so those are grouped. In talk.h there's also:
/* this is in talk.c which isnt compiled for hwcodec simulator */
void talk_date_time(struct tm *time, bool speak_current_time_string);
#define talk_date_time(t, s)
#endif /* CONFIG_RTC */

and then in uisimulator/common/stubs.c we have:

void talk_init(void)

int talk_buffer_steal(void)
     return 0;

int talk_id(int id, bool enqueue)
     return 0;

int talk_file(char* filename, bool enqueue)
     return 0;

... and so on.

I'll eventually need to add functions and I might want to cleanup some
things in there, so I thought I should ask where I should put my dummy
stubs for the HWCODEC sim, and I should probably straighten things up so
they're all in the same place.

Stéphane Doyon
Received on 2007-10-16

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