Sunday, 10 June 2012

Re: [gccsdk] Scummvm on Risc OS on a Pandaboard

In message <d503cc9c52.Jo@hobbes.bass-software.com> you wrote:

> In message <CANsTO==e6Y+S7aUTtDP_Dn0GaU=vPGVFBonKr9itQk1Fwa62SA@mail.gmail.com>
> Manuel Alfayate <redwindwanderer@gmail.com> wrote:
>
> > Hi all,
> >
> > I'm new to this list and Risc OS in general, hence I'm trying some fun apps
> > to "get hooked" to the system :)
>
> Welcome. :-)
>
> > Sadly, I'm having a lot of problems with SDL ports, specially crackling
> > sound.
> > Chris Gransden told me this is because Pandaboard doesn't support any sound
> > output rate below 44100 Hz, so I was wondering if someone here has updated
> > Scummvm port for Risc OS with proper Pandaboard sound. (I know scummvm has
> > output rate selection options, but they don't seem to modify ouput rate in
> > currently available port by Peter Naulls).
>
> Christopher Martin has recently contributed several changes to
> DigitalRenderer module and UnixLib's interface to DigitalRenderer:
>
> <URL:http://www.riscos.info/websvn/filedetails.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Friscos%2Fdrenderer%2FChangeLog>
> <URL:http://www.riscos.info/websvn/filedetails.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2FChangeLog>
>
> And those are exactly those components responsible for sound in ports.
>
> I can't tell whether those changes addresses the issues you're mentioning
> here (I hope Christopher can comment on that) but if so, a new build of
> Scummvm will probably be needed.

Here's the short of it: (1) Ensure your System:Modules.DRenderer is
version 0.56 beta 8 or newer. (2) Any remaining audio problems will
require a rebuild of ScummVM with the latest UnixLib.

Here's the long emplanation for the curious...

The latest version of the DigitalRenderer module is 0.56 beta 8 and it
does a much better job of setting the sound output rate as requested
and restoring the rate when the software quits. So it is possible
that, if your system has an older version of DigitalRenderer installed
(as System:Modules.DRenderer), then it may not be properly setting the
sound output rate to 44100 and that failure would result in rather bad
sound output. Bearing in mind that I haven't tried ScummVM, it may be
that the latest DigitalRenderer module alone will fix many problems
with sound output.

But sadly, DigitalRenderer can't do the whole job. The whole chain
goes like this: the ported app thinks it is talking to </dev/dsp>,
which is emulated by the UnixLib library, which talks to the
DigitalRenderer module, which talks to the RISC OS Sound module, which
talks to the machine's hardware. I have recently made changes to the
</dev/dsp> emulation, but of course these changes post-date the build
of ScummVM. As a result, ScummVM on the Pandaboard may be suffering
another problem which I will now relate...

If I understand correctly, Beagleboard and Pandboard audio hardware
needs to be disabled in order to perform any kind of configuration
read or write. If true, it would be very nasty!! Apps ported from
Linux do the sensible thing of first opening the </dev/dsp> device
before issuing (a great many) ioctls to configure it. With the old
UnixLib DSP emulation running on the Pandboard, this could result in
the audio hardware being disabled-then-enabled many times in rapid
succession. If ScummVM is innocently looking at the sound
configuration a lot, then it will be flicking the audio off-and-on and
that doesn't sound at all pretty!

Some of my recent changes to the DSP emulation address this problem by
deferring switch-on of the audio hardware until the first sound sample
is sent to the DSP, so the audio remains off while it is being
configured. But the old UnixLib compiled into ScummVM won't be doing
that; it'll be switching the audio back on after every config op.
--
Regards, Chris.

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment