Skip to content

Commit

Permalink
Added option to play at frequency 48kHz
Browse files Browse the repository at this point in the history
  • Loading branch information
zbych-r committed Mar 28, 2018
1 parent 33d9956 commit f057b46
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
Binary file modified in_sidplay2/Release/in_sidplay2.dll
Binary file not shown.
5 changes: 5 additions & 0 deletions in_sidplay2/ThreadSidPlayer.cpp
Expand Up @@ -729,6 +729,11 @@ int CThreadSidPlayer::GetSongLength(SidTune &tune)
{
length = m_playerConfig.playLimitSec;
}

if (length < 0)
{
return 0;
}
return length;
}

Expand Down
19 changes: 13 additions & 6 deletions in_sidplay2/configDlg.cpp
Expand Up @@ -24,6 +24,7 @@ void ConfigDlgInitDialog(HWND hWnd)


//FREQ
SendDlgItemMessage(hWnd, IDC_FREQUENCY, CB_ADDSTRING, 0, (LPARAM)L"48000");
SendDlgItemMessage(hWnd,IDC_FREQUENCY,CB_ADDSTRING,0,(LPARAM)L"44100");
SendDlgItemMessage(hWnd,IDC_FREQUENCY,CB_ADDSTRING,0,(LPARAM)L"22050");
SendDlgItemMessage(hWnd,IDC_FREQUENCY,CB_ADDSTRING,0,(LPARAM)L"11025");
Expand All @@ -46,16 +47,19 @@ void ConfigDlgInitDialog(HWND hWnd)

//set values:
//freq
switch(playerConfig->sidConfig.frequency)
switch (playerConfig->sidConfig.frequency)
{
case 44100:
case 48000:
val = 0;
break;
case 44100:
val = 1;
break;
case 22050:
val=1;
val = 2;
break;
case 11025:
val=2;
val = 3;
break;
}
SendDlgItemMessage(hWnd,IDC_FREQUENCY,CB_SETCURSEL,(WPARAM)val,0);
Expand Down Expand Up @@ -149,12 +153,15 @@ void UpdateConfig(HWND hWnd)
switch(val)
{
case 0:
playerConfig->sidConfig.frequency = 44100;
playerConfig->sidConfig.frequency = 48000;
break;
case 1:
playerConfig->sidConfig.frequency = 22050;
playerConfig->sidConfig.frequency = 44100;
break;
case 2:
playerConfig->sidConfig.frequency = 22050;
break;
case 3:
playerConfig->sidConfig.frequency = 11025;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion in_sidplay2/in_sidplay2.cpp
Expand Up @@ -593,7 +593,7 @@ void eq_set(int on, char data[10], int preamp)
extern In_Module inmod =
{
IN_VER, // defined in IN2.H
"Winamp SIDPlayer (libsidplayfp) v2.1.4.0"
"Winamp SIDPlayer (libsidplayfp) v2.1.5.0"
// winamp runs on both alpha systems and x86 ones. :)
/*#ifdef __alpha
"(AXP)"
Expand Down
10 changes: 5 additions & 5 deletions in_sidplay2/in_sidplay2.rc
Expand Up @@ -110,7 +110,7 @@ END

IDD_ABOUTDLG DIALOGEX 0, 0, 195, 145
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "in_sidplay2 2.1.4.0"
CAPTION "in_sidplay2 2.1.5.0"
FONT 8, "Microsoft Sans Serif", 700, 0, 0xEE
BEGIN
DEFPUSHBUTTON "OK",IDOK,72,124,50,14
Expand Down Expand Up @@ -220,8 +220,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,1,4,0
PRODUCTVERSION 2,1,4,0
FILEVERSION 2,1,5,0
PRODUCTVERSION 2,1,5,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -238,12 +238,12 @@ BEGIN
BEGIN
VALUE "Comments", "Winamp plugin for SID files"
VALUE "FileDescription", "in_sidplay2 Winamp plugin for SID files"
VALUE "FileVersion", "2.1.4.0"
VALUE "FileVersion", "2.1.5.0"
VALUE "InternalName", "in_sidplay2"
VALUE "LegalCopyright", "Copyright (C) 2016 Zbigniew Ross (Licensed under GNU GPL)"
VALUE "OriginalFilename", "in_sidplay2"
VALUE "ProductName", "in_sidplay2"
VALUE "ProductVersion", "2.1.4.0"
VALUE "ProductVersion", "2.1.5.0"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit f057b46

Please sign in to comment.