mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
parent
e083f78f8e
commit
85364c2bb6
4 changed files with 6 additions and 6 deletions
|
@ -82,7 +82,7 @@ extern int nomusic;
|
|||
extern bool nosound;
|
||||
inline bool MusicEnabled()
|
||||
{
|
||||
return !nomusic;
|
||||
return mus_enabled && !nomusic;
|
||||
}
|
||||
|
||||
inline bool SoundEnabled()
|
||||
|
|
|
@ -110,10 +110,10 @@ static bool StreamCallbackFunc(SoundStream* stream, void* buff, int len, void* u
|
|||
return true;
|
||||
}
|
||||
|
||||
InterplayDecoder::InterplayDecoder()
|
||||
InterplayDecoder::InterplayDecoder(bool soundenabled)
|
||||
{
|
||||
bIsPlaying = false;
|
||||
bAudioStarted = false;
|
||||
bAudioStarted = !soundenabled; // This prevents the stream from getting created
|
||||
|
||||
nWidth = 0;
|
||||
nHeight = 0;
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
kAudioBlocks = 20 // alloc a lot of blocks - need to store lots of audio data before video frames start.
|
||||
};
|
||||
|
||||
InterplayDecoder();
|
||||
InterplayDecoder(bool soundenabled);
|
||||
~InterplayDecoder();
|
||||
|
||||
bool Open(FileReader &fr);
|
||||
|
|
|
@ -194,7 +194,7 @@ class DMvePlayer : public DScreenJob
|
|||
public:
|
||||
bool isvalid() { return !failed; }
|
||||
|
||||
DMvePlayer(FileReader& fr)
|
||||
DMvePlayer(FileReader& fr) : decoder(SoundEnabled())
|
||||
{
|
||||
failed = !decoder.Open(fr);
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ public:
|
|||
int sound = animSnd[i].soundnum;
|
||||
if (sound == -1)
|
||||
soundEngine->StopAllChannels();
|
||||
else
|
||||
else if (SoundEnabled())
|
||||
soundEngine->StartSound(SOURCE_None, nullptr, nullptr, CHAN_AUTO, CHANF_UI, sound, 1.f, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue