- made adjustments to the remaining parts of the function interface.
This commit is contained in:
parent
7923d25cce
commit
47d70c839d
8 changed files with 210 additions and 204 deletions
|
|
@ -342,7 +342,7 @@ ADD_STAT(music)
|
|||
{
|
||||
if (mus_playing.handle != nullptr)
|
||||
{
|
||||
return FString(ZMusic_GetStats((MusInfo*)mus_playing.handle).c_str());
|
||||
return ZMusic_GetStats(mus_playing.handle);
|
||||
}
|
||||
return "No song playing";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,18 +48,18 @@
|
|||
|
||||
#define FORWARD_CVAR(key) \
|
||||
decltype(*self) newval; \
|
||||
auto ret = ChangeMusicSetting(ZMusic::key, (MusInfo*)mus_playing.handle, *self, &newval); \
|
||||
auto ret = ChangeMusicSetting(zmusic_##key, mus_playing.handle, *self, &newval); \
|
||||
self = (decltype(*self))newval; \
|
||||
if (ret) S_MIDIDeviceChanged(-1);
|
||||
|
||||
#define FORWARD_BOOL_CVAR(key) \
|
||||
int newval; \
|
||||
auto ret = ChangeMusicSetting(ZMusic::key, (MusInfo*)mus_playing.handle,*self, &newval); \
|
||||
auto ret = ChangeMusicSetting(zmusic_##key, mus_playing.handle,*self, &newval); \
|
||||
self = !!newval; \
|
||||
if (ret) S_MIDIDeviceChanged(-1);
|
||||
|
||||
#define FORWARD_STRING_CVAR(key) \
|
||||
auto ret = ChangeMusicSetting(ZMusic::key, (MusInfo*)mus_playing.handle,*self); \
|
||||
auto ret = ChangeMusicSetting(zmusic_##key, mus_playing.handle,*self); \
|
||||
if (ret) S_MIDIDeviceChanged(-1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -205,6 +205,6 @@ CUSTOM_CVAR (Int, snd_mididevice, DEF_MIDIDEV, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CV
|
|||
self = DEF_MIDIDEV;
|
||||
return;
|
||||
}
|
||||
bool change = ChangeMusicSetting(ZMusic::snd_mididevice, nullptr, self);
|
||||
bool change = ChangeMusicSetting(zmusic_snd_mididevice, nullptr, self);
|
||||
if (change) S_MIDIDeviceChanged(self);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ static bool FillStream(SoundStream* stream, void* buff, int len, void* userdata)
|
|||
void S_CreateStream()
|
||||
{
|
||||
if (!mus_playing.handle) return;
|
||||
auto fmt = ZMusic_GetStreamInfo(mus_playing.handle);
|
||||
SoundStreamInfo fmt;
|
||||
ZMusic_GetStreamInfo(mus_playing.handle, &fmt);
|
||||
if (fmt.mBufferSize > 0)
|
||||
{
|
||||
int flags = fmt.mNumChannels < 0 ? 0 : SoundStream::Float;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue