Handle the sample type passed to S_CreateCustomStream
This commit is contained in:
parent
e902ad62fa
commit
f17f732b7a
1 changed files with 2 additions and 1 deletions
|
|
@ -183,8 +183,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…
Add table
Add a link
Reference in a new issue