mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
- Fixed: S_ClearSoundData() did not stop any channels before freeing the
samples, a problem for the alternate sound renderer if it happened to be playing any sounds at the time, since it would try to keep on playing them. SVN r483 (trunk)
This commit is contained in:
parent
dea5cf9ba4
commit
58d4c4f9ae
7 changed files with 42 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
February 14, 2007
|
||||||
|
- Fixed: S_ClearSoundData() did not stop any channels before freeing the
|
||||||
|
samples, a problem for the alternate sound renderer if it happened to be
|
||||||
|
playing any sounds at the time, since it would try to keep on playing them.
|
||||||
|
|
||||||
February 12, 2007
|
February 12, 2007
|
||||||
- Added two new cvars (win_x and win_y) that keep track of the window
|
- Added two new cvars (win_x and win_y) that keep track of the window
|
||||||
position when not playing in fullscreen mode.
|
position when not playing in fullscreen mode.
|
||||||
|
@ -43,7 +48,7 @@ February 3, 2007
|
||||||
|
|
||||||
February 2, 2007
|
February 2, 2007
|
||||||
- Added a new fixrtext tool that sets the IMAGE_SCN_MEM_WRITE flag for
|
- Added a new fixrtext tool that sets the IMAGE_SCN_MEM_WRITE flag for
|
||||||
.rtext files in the assembly object files. Now I can avoid doing this at
|
.rtext sections in the assembly object files. Now I can avoid doing this at
|
||||||
runtime, which means that ZDoom is now UPX-compatible if anyone wants to
|
runtime, which means that ZDoom is now UPX-compatible if anyone wants to
|
||||||
pack it.
|
pack it.
|
||||||
|
|
||||||
|
|
|
@ -746,6 +746,7 @@ static void S_ClearSoundData()
|
||||||
|
|
||||||
if (GSnd != NULL)
|
if (GSnd != NULL)
|
||||||
{
|
{
|
||||||
|
GSnd->StopAllChannels();
|
||||||
for (i = 0; i < S_sfx.Size(); ++i)
|
for (i = 0; i < S_sfx.Size(); ++i)
|
||||||
{
|
{
|
||||||
GSnd->UnloadSound (&S_sfx[i]);
|
GSnd->UnloadSound (&S_sfx[i]);
|
||||||
|
|
|
@ -546,6 +546,23 @@ void AltSoundRenderer::StopSound (long handle)
|
||||||
chan->Sample = NULL;
|
chan->Sample = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// AltSoundRenderer :: StopAllChannels
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
void AltSoundRenderer::StopAllChannels ()
|
||||||
|
{
|
||||||
|
if (Channels != NULL)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < NumChannels; ++i)
|
||||||
|
{
|
||||||
|
Channels[i].Sample = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// AltSoundRenderer :: SetSfxPaused
|
// AltSoundRenderer :: SetSfxPaused
|
||||||
|
|
|
@ -30,6 +30,9 @@ public:
|
||||||
// Stops a sound channel.
|
// Stops a sound channel.
|
||||||
void StopSound (long handle);
|
void StopSound (long handle);
|
||||||
|
|
||||||
|
// Stops all sounds.
|
||||||
|
void StopAllChannels ();
|
||||||
|
|
||||||
// Pauses or resumes all sound effect channels.
|
// Pauses or resumes all sound effect channels.
|
||||||
void SetSfxPaused (bool paused);
|
void SetSfxPaused (bool paused);
|
||||||
|
|
||||||
|
|
|
@ -756,6 +756,15 @@ void FMODSoundRenderer::StopSound (long handle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FMODSoundRenderer::StopAllChannels ()
|
||||||
|
{
|
||||||
|
for (long i = 1; i <= NumChannels; ++i)
|
||||||
|
{
|
||||||
|
StopSound (i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void FMODSoundRenderer::SetSfxPaused (bool paused)
|
void FMODSoundRenderer::SetSfxPaused (bool paused)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < NumChannels; ++i)
|
for (int i = 0; i < NumChannels; ++i)
|
||||||
|
|
|
@ -32,6 +32,9 @@ public:
|
||||||
// Stops a sound channel.
|
// Stops a sound channel.
|
||||||
void StopSound (long handle);
|
void StopSound (long handle);
|
||||||
|
|
||||||
|
// Stops all sounds.
|
||||||
|
void StopAllChannels ();
|
||||||
|
|
||||||
// Pauses or resumes all sound effect channels.
|
// Pauses or resumes all sound effect channels.
|
||||||
void SetSfxPaused (bool paused);
|
void SetSfxPaused (bool paused);
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,9 @@ public:
|
||||||
// Stops a sound channel.
|
// Stops a sound channel.
|
||||||
virtual void StopSound (long handle) = 0;
|
virtual void StopSound (long handle) = 0;
|
||||||
|
|
||||||
|
// Stops all sounds.
|
||||||
|
virtual void StopAllChannels () = 0;
|
||||||
|
|
||||||
// Pauses or resumes all sound effect channels.
|
// Pauses or resumes all sound effect channels.
|
||||||
virtual void SetSfxPaused (bool paused) = 0;
|
virtual void SetSfxPaused (bool paused) = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue