Skip to content

Commit

Permalink
Revert "Add support for WavPack (.wv) in DAT files"
Browse files Browse the repository at this point in the history
This reverts commit bbe7c87.
  • Loading branch information
PiKeyAr committed Dec 21, 2024
1 parent 571a1e1 commit 8f17904
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
7 changes: 0 additions & 7 deletions SADXModLoader/MediaFns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ void WMPInit_r()
bassinit = !!BASS_Init(-1, 44100, BASS_DEVICE_3D, nullptr, nullptr);
BASS_Set3DFactors(0.1f, 0.1f, 0.0f);
BASS_SetConfig(BASS_CONFIG_3DALGORITHM, BASS_3DALG_FULL);
// Load the WavPack plugin
std::wstring fullPath = bassFolder + L"basswv.dll";
HPLUGIN plugin = BASS_PluginLoad(fullPath.c_str(), BASS_UNICODE);
if (!plugin)
PrintDebug("Error loading BASS WavPack plugin: %d\n", BASS_ErrorGetCode());
else if (!BASS_PluginEnable(plugin, TRUE))
PrintDebug("Error initializing BASS WavPack plugin: %d\n", BASS_ErrorGetCode());
}

/**
Expand Down
13 changes: 1 addition & 12 deletions SADXModLoader/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,10 @@ static void StopBASS(int ch)

static BOOL LoadBASS(int ch, void* wavememory, int wavesize, bool dolby)
{
if (!wavememory || !sndname)
return FALSE;
if (ch >= 0 && ch < MAX_SOUND)
{
StopBASS(ch);
if (sndname[10] == 'w' && sndname[11] == 'v')
{
// WavPack .wv loaded directly with BASS
bass_channels[ch] = BASS_StreamCreateFile(true, (unsigned char*)wavememory, 0, wavesize, dolby ? BASS_SAMPLE_3D : NULL);
}
else
{
// Other files loaded with vgmstream
bass_channels[ch] = BASS_VGMSTREAM_StreamCreateFromMemory((unsigned char*)wavememory, wavesize, sndname, dolby ? BASS_SAMPLE_3D : NULL);
}
bass_channels[ch] = BASS_VGMSTREAM_StreamCreateFromMemory((unsigned char*)wavememory, wavesize, sndname, dolby ? BASS_SAMPLE_3D : NULL);
return bass_channels[ch] != NULL;
}
return FALSE;
Expand Down
Binary file removed extlib/bass/basswv.dll
Binary file not shown.

0 comments on commit 8f17904

Please sign in to comment.