Skip to content

Commit

Permalink
Merge branch 'dev41' into unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
starg2 committed Dec 23, 2023
2 parents fa8146f + 95fa1dc commit 91b18ff
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 19 deletions.
1 change: 1 addition & 0 deletions FLAC/src/stream_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
# include <config.h>
#endif

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h> /* for malloc() */
#include <string.h> /* for memset/memcpy() */
Expand Down
9 changes: 3 additions & 6 deletions interface/w32g_res.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4158,36 +4158,33 @@ VS_VERSION_INFO VERSIONINFO
{
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileVersion", TIMID_VERSION_RESSTR
VALUE "FileVersion", TIMID_VERSION4_RESSTR
#ifdef UNICODE
#ifdef TWSYNG32
VALUE "FileDescription", "TiMidity++ Win32GUI Synthesizer (Unicode)\0"
VALUE "InternalName", "twsyng_u8\0"
VALUE "OriginalFilename", "twsyng_u8.exe\0"
VALUE "ProductName", "TiMidity++\0"
#else
VALUE "FileDescription", "TiMidity++ Win32GUI (Unicode)\0"
VALUE "InternalName", "timw32g_u8\0"
VALUE "OriginalFilename", "timw32g_u8.exe\0"
VALUE "ProductName", "TiMidity++\0"
#endif
#else
#ifdef TWSYNG32
VALUE "FileDescription", "TiMidity++ Win32GUI Synthesizer\0"
VALUE "InternalName", "twsyng\0"
VALUE "OriginalFilename", "twsyng.exe\0"
VALUE "ProductName", "TiMidity++\0"
#else
VALUE "FileDescription", "TiMidity++ Win32GUI\0"
VALUE "InternalName", "timw32g\0"
VALUE "OriginalFilename", "timw32g.exe\0"
VALUE "ProductName", "TiMidity++\0"
#endif
#endif
VALUE "ProductName", "TiMidity++\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2018 Masanao Izumo <[email protected]>\r\nCopyright (C) 1995 Tuukka Toivonen <[email protected]>\0"
VALUE "LegalTrademarks", "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductVersion", TIMID_VERSION
VALUE "ProductVersion", TIMID_VERSION_RESSTR
VALUE "SpecialBuild", "\0"
}
}
Expand Down
1 change: 1 addition & 0 deletions sf_view_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ add_executable(
sfview_dlg.rc
)

add_dependencies(sfviewer UpdateTim41Version)
target_link_libraries(sfviewer timidity_cfgforsf libarc utils comctl32 shlwapi ws2_32)
install(TARGETS sfviewer)
41 changes: 40 additions & 1 deletion sf_view_gui/sfview_dlg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <wingdi.h>
#include <commctrl.h>
#include "resource.h"
#include "version.h"

IDB_TREEICON BITMAP "bitmap1.bmp"

Expand Down Expand Up @@ -30,7 +31,7 @@ END
101 DIALOGEX 0, 0, 255, 195
STYLE WS_OVERLAPPEDWINDOW | DS_CENTER
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Soundfont Viewer 1.01"
CAPTION SFVIEWER_TITLE_WITH_VERSION
MENU IDR_MENU1
LANGUAGE LANG_JAPANESE, 0x1
FONT 9, "MS UI Gothic", FW_NORMAL, 0, 128
Expand All @@ -43,3 +44,41 @@ END
IDI_ICON1 ICON "icon1.ico"


//
// Version Information resources
//
#ifdef _MSC_VER
LANGUAGE LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION TIMID_VERSION4_COMMA
PRODUCTVERSION TIMID_VERSION4_COMMA
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
FILEFLAGSMASK 0x0000003F
FILEFLAGS 0x00000000
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004E4"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileVersion", TIMID_VERSION4_RESSTR
VALUE "FileDescription", "Soundfont Viewer\0"
VALUE "InternalName", "sfviewer\0"
VALUE "OriginalFilename", "sfviewer.exe\0"
VALUE "ProductName", "TiMidity++\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2018 Masanao Izumo <[email protected]>\r\nCopyright (C) 1995 Tuukka Toivonen <[email protected]>\0"
VALUE "LegalTrademarks", "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductVersion", TIMID_VERSION_RESSTR
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0000, 0x04E4
END
END
18 changes: 7 additions & 11 deletions timidity/wasapi_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ static int write_buffer_event(void)
{
UINT32 padding = 0;
size_t out_bytes, out_frames;
size_t short_bytes = 0, short_frames = 0;
BYTE *buf = NULL;

if(!IsExclusive)
Expand All @@ -532,20 +533,15 @@ static int write_buffer_event(void)
out_bytes = calc_output_bytes((BufferFrames - padding) * FrameBytes);
out_frames = out_bytes / FrameBytes;
if(IsExclusive && out_frames < BufferFrames){
if(!input_buffer(NULL, BufferFrames * FrameBytes - out_bytes))
return FALSE;
out_bytes = BufferFrames * FrameBytes;
out_frames = out_bytes / FrameBytes;
}else if(out_frames == 0){
if(!input_buffer(NULL, FrameBytes - out_bytes))
return FALSE;
out_bytes = FrameBytes;
out_frames = 1;
short_frames = BufferFrames - out_frames;
short_bytes = short_frames * FrameBytes;
}
if(check_hresult_failed(IAudioRenderClient_GetBuffer(pAudioRenderClient, out_frames, &buf), "IAudioRenderClient::GetBuffer()"))
if(check_hresult_failed(IAudioRenderClient_GetBuffer(pAudioRenderClient, out_frames + short_frames, &buf), "IAudioRenderClient::GetBuffer()"))
return FALSE;
output_buffer((uint8 *)buf, out_bytes);
IAudioRenderClient_ReleaseBuffer(pAudioRenderClient, out_frames, 0);
if(short_bytes > 0)
memset(buf + out_bytes, 0, short_bytes);
IAudioRenderClient_ReleaseBuffer(pAudioRenderClient, out_frames + short_frames, 0);
return TRUE;
}

Expand Down
5 changes: 4 additions & 1 deletion version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define ___VERSION_H_

#define TIMID_VERSION "${tim41VersionStr}"
#define TIMID_VERSION_RESSTR "${tim41VersionStr}\0"
#define TIMID_VERSION4_COMMA ${tim41Version4Comma}
#define TIMID_VERSION_RESSTR "${tim41Version4Comma}\0"
#define TIMID_VERSION4_RESSTR "${tim41Version4Comma}\0"

#define SFVIEWER_TITLE_WITH_VERSION "Soundfont Viewer v${tim41VersionStr}"

#endif /* !___VERSION_H_ */

0 comments on commit 91b18ff

Please sign in to comment.