[Scummvm-devel] CD sound interface
J.Brown (Ender/Amigo)
ender at enderboi.com
Wed Mar 20 03:49:04 CET 2002
Actually, I commited a patch to CVS several days ago... which does only
use one ;)
playtrack is now obsolete... and suprise suprise, I called the function
exactly what you posted, even the end_frame variable.
track is the track from 0. So it's pretty much always '1'.
num_loops is the number of times to repeat, also from 0.
One play is 0, two plays is 1, etc. I believe -1 is infinity.. and yes,
it should loop between start_frame and (if present) end_frame.
Regards, | It's always bad news in computing.. and beware
| of anything claming to be good news - because
| its probably a virus. - Salmon Days
Ender |
(James Brown) | [Nehahra, EasyCuts, PureLS, www.QuakeSrc.org]
On 20 Mar 2002, Marcus Comstedt wrote:
> Date: 20 Mar 2002 12:36:42 +0100
> From: Marcus Comstedt <marcus at mc.pp.se>
> To: scummvm-devel at lists.sourceforge.net
> Subject: [Scummvm-devel] CD sound interface
>
>
> Hi.
>
> I was looking a bit at adding CD sound support for the Dreamcast port,
> but I'm a bit confused by the interface.
>
> First of all, why have two almost identical functions
>
> void cd_playtrack(int track, int offset, int delay)
> void cd_play(int track, int num_loops, int start_frame)
>
> instead of having one general
>
> void cd_play(int track, int num_loops, int start_frame, int end_frame)
>
> which subsumes both? (As far as I can see, "start_frame" and "offset"
> are identical, and "delay" would be identical to "end_frame" if one
> existed...) Maybe this is a candidate for refactoring during the
> current code freeze?
>
> Secondly, I'm a little unsure about the parameters:
>
> * track
>
> Is this the actual track number in the TOC, or does it mean
> something like "the n:th audio track", which seems to be what the
> SDL version is actually doing if I read the SDL docs correctly?
> Is it offset; i.e. is the first track specified as number 0 or 1?
>
> * num_loops
>
> Is it the number of plays, or the number of repeats? I.e. if the
> sound should be played exactly once, should num_loops be 0 or 1?
> I'm guessing that -1 means infinite looping, is this correct?
> If a start_frame is given, should the repetitions also start at this
> frame? (I hope this is the case, as then looping could be delegated
> to the drive itself.)
>
>
> // Marcus
>
>
>
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>
More information about the Scummvm-devel
mailing list