MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / Sound_VideoPlayCallback

Function Sound_VideoPlayCallback

TombEngine/Sound/sound.cpp:716–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714}
715
716void Sound_VideoPlayCallback(void* data, const void* samples, unsigned count, int64_t pts)
717{
718 if (!BASS_ChannelIsActive(BASS_Video))
719 {
720 BASS_ChannelPlay(BASS_Video, false);
721 BASS_ChannelSetAttribute(BASS_Video, BASS_ATTRIB_VOL, GlobalFXVolume / 100.0f);
722 Sound_CheckBASSError("Starting audio stream routing for video playback", false);
723 }
724
725 int bytes = count * SOUND_CHANNEL_COUNT * sizeof(float);
726 BASS_StreamPutData(BASS_Video, samples, bytes);
727 Sound_CheckBASSError("Video playback audio stream buffering", false);
728}
729
730void Sound_VideoFlushCallback(void* data, int64_t pts)
731{

Callers

nothing calls this directly

Calls 1

Sound_CheckBASSErrorFunction · 0.85

Tested by

no test coverage detected