[Freeciv-Dev] Re: [Patch] Sound8
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 12 Feb 2002, Jason Short wrote:
> Unfortunately, the code never actually resets the elements when the
> sound sample it corresponds to is freed, so once the buffer is full this
> will happen every time a sample is played.
I don't understand what you are referring to.
> Assuming ESD doesn't have a "maximum channels" limit, one solution would
> be to just start the sample and not track it at all thereafter. Then it
> can end at its own time...the problem being that on shutodwn() there is
> no way for us to stop it. Obviously the music sample ID must be
> tracked, since only one music should be playing at a time - but with
> music we can be pretty sure that it won't stop until we tell it to.
This is not a problem. Since we track music in a separate "channel"
anyway, and only one music can play at a time, we can stop it at program
exit separatedly of what is done to sound effects. Since the other sound
smaples don't loop, they will stop when they are done, irrespective of
whether the program has quit or not (unlike with SDL, where sound will
terminate at program exit).
So we did I use sample buffering and not just a play&forget function?
Because I wanted to add some cacheing to reduce file loads. As of now it
only does a single cacheing check, but this could be much improved. It
isn't any better simply because I forgot all about it once I had the basic
structure in place and I started coding the more fun parts...
Of course, if there are actual structural problems with the way the ESD
code is written now, I'll rewrite it. I just don't see the problem with
it as it is now.
> And SDL has similar (though not identical) problems...
Please explain.
Yours,
Per
"What we anticipate seldom occurs: but what we least expect generally
happens." -- Benjamin Disraeli
- [Freeciv-Dev] [Patch] Sound8, Raimar Falke, 2002/02/01
- [Freeciv-Dev] Re: [Patch] Sound8, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8, Anthony Ferrand, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8, Anthony Ferrand, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8, Per I. Mathisen, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8, Jason Short, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Sound8,
Per I. Mathisen <=
- [Freeciv-Dev] Re: [Patch] Sound8, Jason Short, 2002/02/15
- [Freeciv-Dev] Re: [Patch] Sound8, Per I. Mathisen, 2002/02/15
- [Freeciv-Dev] Re: [Patch] Sound8, Raimar Falke, 2002/02/13
[Freeciv-Dev] Re: [Patch] Sound8, Jason Short, 2002/02/12
[Freeciv-Dev] Re: [Patch] Sound8, Per I. Mathisen, 2002/02/17
|
|