mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-19 17:01:46 +00:00
Handle the sample type passed to S_CreateCustomStream
This commit is contained in:
parent
bc447c8ca9
commit
ffab3a1b46
1 changed files with 2 additions and 1 deletions
|
@ -126,8 +126,9 @@ SoundStream *S_CreateCustomStream(size_t size, int samplerate, int numchannels,
|
|||
chans = ChannelConfig_Stereo;
|
||||
else
|
||||
return nullptr;
|
||||
const SampleType stype{(sampletype == MusicSamplesFloat) ? SampleType_Float32 : SampleType_Int16};
|
||||
|
||||
auto stream = GSnd->CreateStream(cb, int(size), SampleType_Int16, chans, samplerate, userdata);
|
||||
auto stream = GSnd->CreateStream(cb, int(size), stype, chans, samplerate, userdata);
|
||||
if (stream)
|
||||
{
|
||||
stream->Play(true, 1);
|
||||
|
|
Loading…
Reference in a new issue