Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'replaygain'
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Mar 12, 2021
2 parents bf33403 + d102304 commit 3d55c76
Show file tree
Hide file tree
Showing 29 changed files with 925 additions and 44 deletions.
4 changes: 3 additions & 1 deletion bin/windows/zmusic/include/zmusic.h
Expand Up @@ -29,7 +29,8 @@ typedef enum EMIDIType_
MIDI_MIDI,
MIDI_HMI,
MIDI_XMI,
MIDI_MUS
MIDI_MUS,
MIDI_MIDS
} EMIDIType;

typedef enum EMidiDevice_
Expand Down Expand Up @@ -313,6 +314,7 @@ extern "C"
DLL_IMPORT void ZMusic_Close(ZMusic_MusicStream song);
DLL_IMPORT zmusic_bool ZMusic_SetSubsong(ZMusic_MusicStream song, int subsong);
DLL_IMPORT zmusic_bool ZMusic_IsLooping(ZMusic_MusicStream song);
DLL_IMPORT int ZMusic_GetDeviceType(ZMusic_MusicStream song);
DLL_IMPORT zmusic_bool ZMusic_IsMIDI(ZMusic_MusicStream song);
DLL_IMPORT void ZMusic_VolumeChanged(ZMusic_MusicStream song);
DLL_IMPORT zmusic_bool ZMusic_WriteSMF(ZMusic_MidiSource source, const char* fn, int looplimit);
Expand Down
2 changes: 1 addition & 1 deletion libraries/asmjit/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required( VERSION 3.1.0 )

#make_release_only()

Expand Down
2 changes: 1 addition & 1 deletion libraries/bzip2/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 2.8.7 )
cmake_minimum_required( VERSION 3.1.0 )

make_release_only()

Expand Down
2 changes: 1 addition & 1 deletion libraries/gdtoa/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 2.8.7 )
cmake_minimum_required( VERSION 3.1.0 )

set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )

Expand Down
2 changes: 1 addition & 1 deletion libraries/glslang/OGLCompilersDLL/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required( VERSION 3.1.0 )

make_release_only()
use_fast_math()
Expand Down
2 changes: 1 addition & 1 deletion libraries/glslang/glslang/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required( VERSION 3.1.0 )

make_release_only()
use_fast_math()
Expand Down
2 changes: 1 addition & 1 deletion libraries/glslang/spirv/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required( VERSION 3.1.0 )

make_release_only()
use_fast_math()
Expand Down
2 changes: 1 addition & 1 deletion libraries/jpeg/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 2.8.7 )
cmake_minimum_required( VERSION 3.1.0 )

make_release_only()

Expand Down
2 changes: 1 addition & 1 deletion libraries/lzma/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 2.8.7 )
cmake_minimum_required( VERSION 3.1.0 )

make_release_only()

Expand Down
2 changes: 1 addition & 1 deletion libraries/zlib/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required( VERSION 3.1.0 )
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

make_release_only()
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 2.8.7 )
cmake_minimum_required( VERSION 3.1.0 )

include(precompiled_headers)

Expand Down Expand Up @@ -992,6 +992,7 @@ set (PCH_SOURCES
common/2d/v_2ddrawer.cpp
common/2d/v_drawtext.cpp
common/2d/v_draw.cpp
common/thirdparty/gain_analysis.cpp
common/thirdparty/sfmt/SFMT.cpp
common/fonts/singlelumpfont.cpp
common/fonts/singlepicfont.cpp
Expand Down
16 changes: 0 additions & 16 deletions src/common/audio/music/i_music.cpp
Expand Up @@ -270,22 +270,6 @@ void I_SetMusicVolume (double factor)
I_SetRelativeVolume((float)factor);
}

//==========================================================================
//
// test a relative music volume
//
//==========================================================================

CCMD(testmusicvol)
{
if (argv.argc() > 1)
{
I_SetRelativeVolume((float)strtod(argv[1], nullptr));
}
else
Printf("Current relative volume is %1.2f\n", relative_volume);
}

//==========================================================================
//
// STAT music
Expand Down
10 changes: 10 additions & 0 deletions src/common/audio/music/i_music.h
Expand Up @@ -56,4 +56,14 @@ EXTERN_CVAR(Bool, mus_enabled)
EXTERN_CVAR(Float, snd_musicvolume)


inline float AmplitudeTodB(float amplitude)
{
return 20.0f * log10(amplitude);
}

inline float dBToAmplitude(float dB)
{
return pow(10.0f, dB / 20.0f);
}

#endif //__I_MUSIC_H__

0 comments on commit 3d55c76

Please sign in to comment.