Rockbox mail archiveSubject: Re: Simulator dummy functions
Re: Simulator dummy functions
From: Stéphane Doyon <s.doyon_at_videotron.ca>
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
#if defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC)
... so those are grouped. In talk.h there's also:
/* this is in talk.c which isnt compiled for hwcodec simulator */
#if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC
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:
#if CONFIG_CODEC != SWCODEC
int talk_id(int id, bool enqueue)
int talk_file(char* filename, bool enqueue)
... 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 <s.doyon_at_videotron.ca> http://pages.videotron.com/sdoyon/Received on 2007-10-16