MusicMod: Added music modification, it currently only works in Windows

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1736 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson committed 2009-01-03 01:38:44 +00:00
1 parent 55db229929
commit 264056972d
69 files changed
+5299 -511

No files matched your search

+83 -15
View File
@@ -34,6 +34,10 @@ ConfVar::ConfVar( TCHAR * szKey, ConfMode mode )
{
// MessageBox( 0, TEXT( "no const @ ConfVar" ), TEXT( "" ), 0 );
// ---------------------------------------------------------------------------------------
//wprintf("ConfVar::ConfVar(TCHAR) > Got <%s>\n", szKey);
// ---------------------------------------------------------------------------------------
// Init
const int iLen = ( int )_tcslen( szKey );
m_szKey = new TCHAR[ iLen + 1 ];
@@ -57,6 +61,10 @@ ConfVar::ConfVar( TCHAR * szKey, ConfMode mode )
////////////////////////////////////////////////////////////////////////////////
ConfVar::ConfVar( const TCHAR * szKey, ConfMode mode )
{
// ---------------------------------------------------------------------------------------
//wprintf("ConfVar::ConfVar(const TCHAR) > Got <%s>\n", szKey);
// ---------------------------------------------------------------------------------------
// Init
m_szKey = ( TCHAR * )szKey;
@@ -68,6 +76,11 @@ ConfVar::ConfVar( const TCHAR * szKey, ConfMode mode )
// Register
if( !conf_map ) conf_map = new map<TCHAR *, ConfVar *>;
conf_map->insert( pair<TCHAR *, ConfVar *>( m_szKey, this ) );
// ---------------------------------------------------------------------------------------
//wprintf("ConfVar::ConfVar(const TCHAR) > Insert <%s>\n", ConfVar::m_szKey);
// ---------------------------------------------------------------------------------------
}
@@ -82,6 +95,8 @@ ConfVar::~ConfVar()
// =======================================================================================
// The line name is collected in ConfVar, then ConfBool gets the boolean
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////////////////
@@ -89,11 +104,16 @@ ConfBool::ConfBool( bool * pbData, TCHAR * szKey, ConfMode mode, bool bDefault )
{
// MessageBox( 0, TEXT( "no const @ ConfBool" ), TEXT( "" ), 0 );
// ---------------------------------------------------------------------------------------
wprintf("ConfBool(TCHAR) > Get <%s>\n", szKey);
// ---------------------------------------------------------------------------------------
m_pbData = pbData;
m_bDefault = bDefault;
// *pbData = bDefault;
}
// =======================================================================================
@@ -102,6 +122,10 @@ ConfBool::ConfBool( bool * pbData, TCHAR * szKey, ConfMode mode, bool bDefault )
////////////////////////////////////////////////////////////////////////////////
ConfBool::ConfBool( bool * pbData, const TCHAR * szKey, ConfMode mode, bool bDefault ) : ConfVar( szKey, mode )
{
// ---------------------------------------------------------------------------------------
wprintf("ConfBool(TCHAR) > Get <%s>\n", szKey);
// ---------------------------------------------------------------------------------------
m_pbData = pbData;
m_bDefault = bDefault;
@@ -115,6 +139,8 @@ ConfBool::ConfBool( bool * pbData, const TCHAR * szKey, ConfMode mode, bool bDef
////////////////////////////////////////////////////////////////////////////////
void ConfBool::Read()
{
wprintf("ConfBool::Read() > Begin <m_bRead:%i> and <szIniPath:%s>\n", m_bRead, szIniPath);
if( m_bRead || !szIniPath ) return;
*m_pbData = ( GetPrivateProfileInt( SECTION, m_szKey, ( int )m_bDefault, szIniPath ) != 0 );
@@ -493,22 +519,31 @@ ConfString::ConfString( TCHAR * szData, const TCHAR * szKey, ConfMode mode, TCHA
////////////////////////////////////////////////////////////////////////////////
void ConfString::Read()
{
wprintf( "ConfString::Read() > Begin\n");
if( m_bRead || !szIniPath ) return;
GetPrivateProfileString( SECTION, m_szKey, m_szDefault, m_szData, m_iMaxLen, szIniPath );
wprintf( "ConfString::Read() > GetPrivateProfileString <%s> <%s> <%s>\n", m_szKey, m_szData, szIniPath);
m_bRead = true;
}
// =======================================================================================
// I don't use this
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////////////////
void ConfString::Write()
{
/*
WritePrivateProfileString( SECTION, m_szKey, m_szData, szIniPath );
m_bRead = true;
}
*/
}
// =======================================================================================
@@ -531,7 +566,9 @@ ConfCurDir::ConfCurDir( TCHAR * szData, const TCHAR * szKey ) : ConfString( szDa
}
// =======================================================================================
// MAJOR FUNCTION: This changes the relative path for the whole application
// =======================================================================================
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////////////////
@@ -542,9 +579,12 @@ void ConfCurDir::Read()
// MessageBox( 0, m_szData, TEXT( "CurDir" ), 0 );
// Apply
SetCurrentDirectory( m_szData );
}
//SetCurrentDirectory( m_szData );
wprintf("ConfCurDir::Read > End <%s>\n", m_szData);
}
// =======================================================================================
// =======================================================================================
////////////////////////////////////////////////////////////////////////////////
@@ -556,6 +596,7 @@ void ConfCurDir::Write()
GetCurrentDirectory( MAX_PATH, m_szData ); // Note: without trailing slash
// MessageBox( 0, m_szData, TEXT( "CurDir" ), 0 );
//wprintf("ConfCurDir::Read <%s>\n", m_szData);
ConfString::Write();
}
@@ -565,10 +606,12 @@ void ConfCurDir::Write()
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////////////////
void Conf::Init( HINSTANCE hInstance )
void Conf::Init()
{
if( szIniPath ) return;
// =======================================================================================
// Find the right ini file
// Long filename
szIniPath = new TCHAR[ _MAX_PATH ];
@@ -578,40 +621,65 @@ void Conf::Init( HINSTANCE hInstance )
TCHAR szDir[ _MAX_DIR ] = TEXT( "" );
GetModuleFileName( hInstance, szFull, _MAX_PATH );
// ---------------------------------------------------------------------------------------
// We place the full path in szFull
//GetModuleFileName( hInstance, szFull, _MAX_PATH );
GetModuleFileName( NULL, szFull, _MAX_PATH ); // No don't use that
// ---------------------------------------------------------------------------------------
_tsplitpath( szFull, szDrive, szDir, NULL, NULL );
// Convert short to long path
GetLongPathName( szDir, szDir, _MAX_DIR );
// ---------------------------------------------------------------------------------------
// We place information about the file in fd
// ---------------------------------------------------------------------------------------
// Convert short to long file
WIN32_FIND_DATA fd;
HANDLE h = FindFirstFile( szFull, &fd );
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
// Convert File.exe to File.ini
// ---------------------------------------------------------------------------------------
// Search last dot
TCHAR * szSearch = fd.cFileName + _tcslen( fd.cFileName ) - 1;
while( ( *szSearch != TEXT( '.' ) ) && ( szSearch > fd.cFileName ) )
{
szSearch--;
}
// ---------------------------------------------------------------------------------------
// Replace extension
_tcscpy( szSearch, TEXT( ".ini" ) );
// ---------------------------------------------------------------------------------------
// Copy full filename
_sntprintf( szIniPath, _MAX_PATH, TEXT( "%s%s%s" ), szDrive, szDir, fd.cFileName );
//_sntprintf( szIniPath, _MAX_PATH, TEXT( "%s%s%s" ), szDrive, szDir, fd.cFileName );
_sntprintf( szIniPath, _MAX_PATH, TEXT( "%s%s%s" ), szDrive, szDir, TEXT( "Plainamp.ini" ) );
wprintf("DLL > We got the ini path <%s>\n", szIniPath);
// =======================================================================================
// Read all
// ---------------------------------------------------------------------------------------
// Read all settings in it
// ---------------------------------------------------------------------------------------
// Read all (original comment)
map<TCHAR *, ConfVar *>::iterator iter = conf_map->begin();
// =======================================================================================
// *** Something changes the API relative paths here
while( iter != conf_map->end() )
{
iter->second->Read();
iter++;
iter->second->Read(); // *** This changes the relative path
iter++;
}
// =======================================================================================
// ---------------------------------------------------------------------------------------
}
+5 -2
View File
@@ -22,7 +22,8 @@
namespace Conf
{
void Init( HINSTANCE hInstance );
//void Init( HINSTANCE hInstance );
void Init( );
void Write();
};
@@ -71,7 +72,9 @@ protected:
private:
bool m_bCopyKey; ///< Keyname is copy (has to be freed on destruction)
friend void Conf::Init( HINSTANCE hInstance );
//friend void Conf::Init( HINSTANCE hInstance );
friend void Conf::Init( );
friend void Conf::Write();
};
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_CONSOLE_H
@@ -145,6 +145,7 @@ bool DspPlugin::Unload()
_stprintf( szBuffer, TEXT( "Unloading <%s>" ), GetFilename() );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
printf( ">>>Unloading <%s>\n" , GetFilename() );
header = NULL;
+4 -1
View File
@@ -17,7 +17,10 @@
#include <windows.h>
#include <tchar.h>
// =======================================================================================
// Global declarations
#include "../Global.h"
// =======================================================================================
/*
== TYPE =============================================================================
@@ -151,6 +151,7 @@ bool GenPlugin::Unload()
_stprintf( szBuffer, TEXT( "Unloading <%s>" ), GetFilename() );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
printf( ">>>Unloading <%s>\n" , GetFilename() );
// Quit
+42 -10
View File
@@ -1,15 +1,46 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Include
// ¯¯¯¯¯¯¯¯¯¯
#include "../../Common/Src/Console.h" // Local common
/////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Declarations and definitions
// ¯¯¯¯¯¯¯¯¯¯
// This will build Plainamp without the GUI
#define NOGUI
// =======================================================================================
// Because there are undefined in 64 bit it's easy to redefine them in case we use 64 bit
// ---------------------
#ifdef _M_X64
#define GWL_WNDPROC (-4)
#define GetWindowLong GetWindowLongPtrA // or GetWindowLongPtr
#endif
// =======================================================================================
////////////////////////////////////
// =======================================================================================
// Back to Plainamp code
// ---------------------
#ifndef PA_GLOBAL_H
#define PA_GLOBAL_H
@@ -115,3 +146,4 @@ struct TextCompare
#endif // PA_GLOBAL_H
+10 -4
View File
@@ -25,7 +25,9 @@
#include "kiss_fft/kiss_fftr.h"
*/
#include "fftw3/fftw3.h"
// =======================================================================================
//#include "fftw3/fftw3.h"
// =======================================================================================
#include <math.h>
@@ -234,7 +236,8 @@ void VSAAddPCMData( void * PCMData, int nch, int bps, int timestamp )
// TODO: Much to optimize!
// =======================================================================================
/*
// Spectrum
static unsigned char spec_left[ 576 ];
static unsigned char spec_right[ 576 ];
@@ -311,10 +314,13 @@ void VSAAddPCMData( void * PCMData, int nch, int bps, int timestamp )
}
VisCache::PutSpecRight( spec_right );
}
// =======================================================================================
*/
// Cleanup FFT
fftw_destroy_plan( p );
// =======================================================================================
//fftw_destroy_plan( p );
// =======================================================================================
// fftw_free(in);
// fftw_free(out);
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Global.h"
+20 -6
View File
@@ -9,6 +9,9 @@
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
#include "Global.h"
// =======================================================================================
#include "InputPlugin.h"
#include "Console.h"
@@ -24,9 +27,8 @@ InputPlugin * active_input_plugin = NULL; // extern
////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
// The InputPlugin class is inherited from the Plugin class
InputPlugin::InputPlugin( TCHAR * szDllpath, bool bKeepLoaded ) : Plugin( szDllpath )
{
iHookerIndex = -1;
@@ -35,6 +37,8 @@ InputPlugin::InputPlugin( TCHAR * szDllpath, bool bKeepLoaded ) : Plugin( szDllp
iFiltersLen = 0;
plugin = NULL;
wprintf("\InputPlugin::InputPlugin > Begin\n");
if( !Load() )
{
return;
@@ -65,6 +69,8 @@ InputPlugin::~InputPlugin()
////////////////////////////////////////////////////////////////////////////////
bool InputPlugin::Load()
{
printf("InputPlugin::Load() was called. IsLoaded: %i\n", IsLoaded());
if( IsLoaded() ) return true;
@@ -144,13 +150,15 @@ bool InputPlugin::Load()
}
#ifdef NOGUI
printf( "Loading <%s>, %s\n" , GetFilename(), szName );
#else
TCHAR szBuffer[ 5000 ];
_stprintf( szBuffer, TEXT( "Loading <%s>, %s" ), GetFilename(), szName );
Console::Append( szBuffer );
#endif
Integrate();
Integrate(); // This function is just below
// Note: Plugins that use a wndproc hook need
@@ -226,10 +234,15 @@ bool InputPlugin::Integrate()
// Append filter name
ToTchar( walk_out, start_display, len_display );
// =======================================================================================
// Print used filetypes
TCHAR szBuffer[ 5000 ];
*(walk_out + len_display) = TEXT( '\0' );
_stprintf( szBuffer, TEXT( " %s" ), walk_out );
Console::Append( szBuffer );
//printf( szBuffer, TEXT( " %s\n" ), walk_out );
// =======================================================================================
walk_out += len_display;
// Convert and append extensions
@@ -312,6 +325,7 @@ bool InputPlugin::Unload()
_stprintf( szBuffer, TEXT( "Unloading <%s>" ), GetFilename() );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
printf( ">>>Unloading <%s>\n" , GetFilename() );
// Quit
if( plugin )
+14 -12
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_INPUT_PLUGIN_H
@@ -60,10 +60,12 @@ public:
bool About( HWND hParent );
bool Config( HWND hParent );
In_Module * plugin; // I moved this from private to public
private:
TCHAR * szFilters;
int iFiltersLen;
In_Module * plugin;
bool Integrate();
bool DisIntegrate();
@@ -75,7 +77,7 @@ private:
friend bool Playback::Play();
friend bool Playback::Pause();
friend bool Playback::Stop();
friend bool Playback::UpdateSeek();
friend bool Playback::UpdateSeek(); // this one calls some plugin-> members
friend int Playback::PercentToMs( float fPercent );
friend bool Playback::SeekPercent( float fPercent );
friend bool SeekRelative( int ms );
+110 -51
View File
@@ -10,6 +10,19 @@
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Documentation
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
/* ---- The Seekbar ----
Rebar.cpp handle the progress (playback position) bar. WndprocMain() is called every
second during playback. And several times a second when the cursor is moving over the
main window. If WM_TIMER called WndprocMain it calls Playback::UpdateSeek(); */
///////////////////////////////////
#include "Main.h"
#include "GlobalVersion.h"
#include "Playlist.h"
@@ -30,7 +43,6 @@
#include "Config.h"
#include <shellapi.h>
#define CLASSNAME_MAIN TEXT( "Winamp v1.x" )
#define MAIN_TITLE PLAINAMP_LONG_TITLE
@@ -87,45 +99,68 @@ ConfBool cbMinimizeToTray( &bMinimizeToTray, TEXT( "MinimizeToTray" ), CONF_MODE
////////////////////////////////////////////////////////////////////////////////
bool BuildMainWindow()
{
// Register class
WNDCLASS wc = {
0, // UINT style
WndprocMain, // WNDPROC lpfnWndProc
0, // int cbClsExtra
0, // int cbWndExtra
g_hInstance, // HINSTANCE hInstance
LoadIcon( g_hInstance, TEXT( "IDI_ICON1" ) ), // HICON hIcon
LoadCursor( NULL, IDC_ARROW ), // HCURSOR hCursor
( HBRUSH )COLOR_WINDOW, // HBRUSH hbrBackground
NULL, // LPCTSTR lpszMenuName
CLASSNAME_MAIN // LPCTSTR lpszClassName
};
if( !RegisterClass( &wc ) ) return false;
// Create window
WindowMain = CreateWindowEx(
WS_EX_WINDOWEDGE, // DWORD dwExStyle
CLASSNAME_MAIN, // LPCTSTR lpClassName
MAIN_TITLE, // LPCTSTR lpWindowName
WS_OVERLAPPED | // DWORD dwStyle
// WS_VISIBLE | //
WS_CLIPCHILDREN | //
WS_BORDER | //
WS_SYSMENU | //
WS_THICKFRAME | //
WS_MINIMIZEBOX | //
WS_MAXIMIZEBOX, //
rMainDefault.left, // int x
rMainDefault.top, // int y
rMainDefault.right - rMainDefault.left, // int nWidth
rMainDefault.bottom - rMainDefault.top, // int nHeight
NULL, // HWND hWndParent
NULL, // HMENU hMenu
g_hInstance, // HINSTANCE hInstance
NULL // LPVOID lpParam
);
//#ifndef NOGUI
// =======================================================================================
/* Disabling this window creation cause continuous "Error setting DirectSound cooperative level"
messages for some reason. So I leave it here for now. */
// Register class
WNDCLASS wc = {
0, // UINT style
WndprocMain, // WNDPROC lpfnWndProc
0, // int cbClsExtra
0, // int cbWndExtra
g_hInstance, // HINSTANCE hInstance
LoadIcon( g_hInstance, TEXT( "IDI_ICON1" ) ), // HICON hIcon
LoadCursor( NULL, IDC_ARROW ), // HCURSOR hCursor
( HBRUSH )COLOR_WINDOW, // HBRUSH hbrBackground
NULL, // LPCTSTR lpszMenuName
CLASSNAME_MAIN // LPCTSTR lpszClassName
};
if( !RegisterClass( &wc ) ) return false;
// Create WindowMain
WindowMain = CreateWindowEx(
WS_EX_WINDOWEDGE, // DWORD dwExStyle
CLASSNAME_MAIN, // LPCTSTR lpClassName
MAIN_TITLE, // LPCTSTR lpWindowName
WS_OVERLAPPED | // DWORD dwStyle
// WS_VISIBLE | //
WS_CLIPCHILDREN | //
WS_BORDER | //
WS_SYSMENU | //
WS_THICKFRAME | //
WS_MINIMIZEBOX | //
WS_MAXIMIZEBOX, //
rMainDefault.left, // int x
rMainDefault.top, // int y
rMainDefault.right - rMainDefault.left, // int nWidth
rMainDefault.bottom - rMainDefault.top, // int nHeight
NULL, // HWND hWndParent
NULL, // HMENU hMenu
g_hInstance, // HINSTANCE hInstance
NULL // LPVOID lpParam
);
// =======================================================================================
//#endif
// =======================================================================================
#ifdef NOGUI
// If this is not called a crash occurs
PlaylistView::Create();
// We have now done what we wanted so we skip the rest of the file
return true;
#else
// =======================================================================================
if( !WindowMain )
{
@@ -143,6 +178,7 @@ bool BuildMainWindow()
HMENU playlist_menu = CreatePopupMenu();
HMENU windows_menu = CreatePopupMenu();
// Plainamp
AppendMenu( plainamp_menu, MF_STRING, WINAMP_OPTIONS_PREFS, TEXT( "Preferences \tCtrl+P" ) );
AppendMenu( plainamp_menu, MF_SEPARATOR | MF_DISABLED | MF_GRAYED, ( UINT_PTR )-1, NULL );
@@ -183,7 +219,7 @@ bool BuildMainWindow()
SetMenu( WindowMain, main_menu );
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
main_context_menu = CreatePopupMenu();
AppendMenu( main_context_menu, MF_STRING, WINAMP_HELP_ABOUT, TEXT( "Plainamp" ) );
@@ -205,10 +241,11 @@ bool BuildMainWindow()
AppendMenu( main_context_menu, MF_STRING, PLAINAMP_TOGGLE_MANAGER, TEXT( "Plugin Manager" ) );
/*
/*
AppendMenu( main_context_menu, MF_STRING | MF_DISABLED | MF_GRAYED, MENU_MAIN_CONTEXT_MANAGER, TEXT( "Plugin Manager" ) );
AppendMenu( main_context_menu, MF_STRING | MF_DISABLED | MF_GRAYED, MENU_MAIN_CONTEXT_CONSOLE, TEXT( "Console" ) );
*/
*/
AppendMenu( main_context_menu, MF_SEPARATOR | MF_DISABLED | MF_GRAYED, ( UINT_PTR )-1, NULL );
opts_context_menu = CreatePopupMenu();
@@ -228,8 +265,14 @@ bool BuildMainWindow()
AppendMenu( main_context_menu, MF_STRING, WINAMP_FILE_QUIT, TEXT( "Exit" ) );
Toolbar::Create();
BuildMainStatus();
Toolbar::Create(); // This removes all buttons and status bars
//BuildMainStatus();
// =======================================================================================
// If this is not created a crash occurs
PlaylistView::Create();
Playlist::Create();
@@ -237,6 +280,7 @@ bool BuildMainWindow()
return true;
#endif
}
@@ -324,11 +368,22 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
// Tool windows are hidden on minimize/re-shown on restore
static bool bConsoleTodo = false;
static bool bManagerTodo = false;
static bool bRemoveIcon = false;
#ifdef NOGUI
wprintf("DLL > Main.cpp:WndprocMain() was called. But nothing will be done. \n");
#else
Console::Append( TEXT( "Main.cpp:WndprocMain was called" ) );
#endif
switch( message )
{
#ifdef NOGUI
//printf(" > WndprocMain message: %i\n", message);
#else
case WM_SETFOCUS:
// To re-"blue"
SetFocus( WindowPlaylist );
@@ -336,8 +391,8 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
case WM_CREATE:
// Note: [WindowMain] is not valid yet but [hwnd] is!
Console::Create();
PluginManager::Build();
Console::Create(); // make the console window
PluginManager::Build(); // make the plugin window
break;
case WM_NOTIFY:
@@ -496,7 +551,7 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
}
break;
}
case WM_SYSKEYDOWN:
switch( wp ) // [Alt]+[...]
{
@@ -636,7 +691,9 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
case WM_DESTROY:
{
// =======================================================================================
// Save playlist
/*
TCHAR * szPlaylistMind = new TCHAR[ iHomeDirLen + 12 + 1 ];
memcpy( szPlaylistMind, szHomeDir, iHomeDirLen * sizeof( TCHAR ) );
memcpy( szPlaylistMind + iHomeDirLen, TEXT( "Plainamp.m3u" ), 12 * sizeof( TCHAR ) );
@@ -645,7 +702,8 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
Playlist::ExportPlaylistFile( szPlaylistMind );
delete [] szPlaylistMind;
*/
// =======================================================================================
cwpcWinPlaceMain.TriggerCallback();
cwpcWinPlaceMain.RemoveCallback();
@@ -726,7 +784,7 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
}
}
break;
case TRAY_MSG:
switch( lp )
{
@@ -749,9 +807,10 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
}
return 0;
#endif
default:
return WndprocWinamp( hwnd, message, wp, lp );
}
return DefWindowProc( hwnd, message, wp, lp );
}
+11 -11
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_MAIN_H
@@ -42,7 +42,7 @@ extern HMENU main_context_menu;
bool BuildMainWindow();
bool BuildMainWindow();
void About( HWND hParent );
LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp );
+17 -2
View File
@@ -256,10 +256,25 @@ int Output_Pause( int pause )
////////////////////////////////////////////////////////////////////////////////
void Output_SetVolume( int volume )
{
for( int i = 0; i < active_output_count; i++ )
/* There was a call here with the volume value -666 that I could not see the source of,
so I added this check to see that we got a positive volume. */
if(volume >= 0)
{
active_output_plugins[ i ]->plugin->SetVolume( volume );
// =======================================================================================
// The volume goes from 0 to 255
//TCHAR szBuffer[ 5000 ];
//_stprintf( szBuffer, TEXT( "DLL > Output_SetVolume <%i>" ), volume );
//Console::Append( szBuffer );
//Console::Append( TEXT( " " ) );
//wprintf( "DLL > Output_SetVolume <%i>\n", volume );
// =======================================================================================
for( int i = 0; i < active_output_count; i++ )
{
active_output_plugins[ i ]->plugin->SetVolume( volume );
}
}
}
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_OUTPUT_H
@@ -42,11 +42,15 @@ OutputPlugin::OutputPlugin( TCHAR * szDllpath, bool bKeepLoaded ) : Plugin( szDl
}
////////////////////////////////////////////////////////////////////////////////
// Quick hack!!!
TCHAR * szBuffer = new TCHAR[ 500 ]; // NOT LOCAL!!!
_stprintf( szBuffer, TEXT( "OutputPluginActive___%s" ), GetFilename() );
ConfBool * cbActive = new ConfBool( &bActive, szBuffer, CONF_MODE_INTERNAL, false );
cbActive->Read();
printf("OutputPlugin > GetFilename() returned <%s>\n", szBuffer );
printf("OutputPlugin > We now have <bActive:%i> and <bKeepLoaded:%i>\n", bActive, bKeepLoaded );
if( bActive )
{
@@ -62,6 +66,7 @@ OutputPlugin::OutputPlugin( TCHAR * szDllpath, bool bKeepLoaded ) : Plugin( szDl
// So out_ds keeps loaded for now.
if( _tcscmp( GetFilename(), TEXT( "out_ds.dll" ) ) )
{
printf("OutputPlugin > Unload called from OutputPlugin::OutputPlugin\n");
Unload();
}
}
@@ -128,9 +133,15 @@ bool OutputPlugin::Load()
_stprintf( szBuffer, TEXT( "Loading <%s>, %s" ), GetFilename(), szName );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
printf( ">>>Loading <%s>, %s\n" , GetFilename(), szName );
if( plugin->Init )
{
// We remove the WNDPROC things
#ifdef NOGUI
plugin->Init();
#else
// Init
const WNDPROC WndprocBefore = ( WNDPROC )GetWindowLong( WindowMain, GWL_WNDPROC );
plugin->Init();
@@ -150,6 +161,7 @@ bool OutputPlugin::Load()
{
Console::Append( TEXT( "Wndproc hook added (by plugin)" ) );
}
#endif
}
return true;
@@ -169,6 +181,7 @@ bool OutputPlugin::Unload()
_stprintf( szBuffer, TEXT( "Unloading <%s>" ), GetFilename() );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
printf( ">>>Unloading <%s>\n" , GetFilename() );
// Quit
if( plugin )
@@ -235,6 +248,8 @@ bool OutputPlugin::Config( HWND hParent )
////////////////////////////////////////////////////////////////////////////////
bool OutputPlugin::Start()
{
wprintf( "OutputPlugin::Start() > Begin <IsLoaded():%i> <bActive:%i> <active_output_count:%i>\n" , IsLoaded(), bActive, active_output_count );
if( !IsLoaded() ) return false;
if( bActive ) return true;
@@ -257,6 +272,7 @@ bool OutputPlugin::Start()
_stprintf( szBuffer, TEXT( "Output plugin <%s> activated" ), GetFilename() );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
wprintf( "\n >>> OutputPlugin::Start() > Output plugin <%s> activated\n\n" , GetFilename() );
bActive = true;
+13 -11
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_OUTPUT_PLUGIN_H
@@ -58,10 +58,12 @@ public:
bool Start();
bool Stop();
Out_Module * plugin; // Moved to public
private:
bool bActive;
int iArrayIndex;
Out_Module * plugin;
// TODO
+149 -45
View File
@@ -50,49 +50,70 @@ TCHAR * szCurrentFilename = NULL;
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
// The timer that calls WndprocMain every second
void EnableTimer( bool bEnabled )
{
// Return if the timer is already activated
if( bEnabled == bTimerRunning ) return;
if( bEnabled )
{
SetTimer( WindowMain, TIMER_SEEK_UPDATE, 1000, NULL );
wprintf( "EnableTimer > Activated\n" );
}
else
{
KillTimer( WindowMain, TIMER_SEEK_UPDATE );
StatusReset();
wprintf( "EnableTimer > Killed\n" );
}
bTimerRunning = bEnabled;
}
// =======================================================================================
////////////////////////////////////////////////////////////////////////////////
///
//
////////////////////////////////////////////////////////////////////////////////
bool OpenPlay( TCHAR * szFilename, int iNumber )
{
// TODO: cleanup!!!
// =======================================================================================
#ifdef NOGUI
wprintf( "Playback.cpp: OpenPlay > Begin <%i> <%s>\n" , iNumber, szFilename );
#else
TCHAR sszBuffer[ 5000 ];
_stprintf( sszBuffer, TEXT( "Playback.cpp: OpenPlay was called <%i> <%s>" ), iNumber, szFilename );
Console::Append( sszBuffer );
#endif
// =======================================================================================
// =======================================================================================
// Get the right input plugin
// ---------------------------------------------------------------------------------------
if( !szFilename ) return false;
szCurrentFilename = szFilename;
// ---------------------------------------------------------------------------------------
// TODO: non-file support
// Get extension
// ---------------------------------------------------------------------------------------
// Get file extension
const int iLen = ( int )_tcslen( szFilename );
TCHAR * walk = szFilename + iLen - 1;
while( ( walk >= szFilename ) && ( *walk != TEXT( '.' ) ) ) walk--;
walk++;
// ---------------------------------------------------------------------------------------
const int iExtLen = ( int )_tcslen( walk );
TCHAR * szExt = new TCHAR[ iExtLen + 1 ];
memcpy( szExt, walk, iExtLen * sizeof( TCHAR ) );
szExt[ iExtLen ] = TEXT( '\0' );
// Get input plugin from extension map
// ---------------------------------------------------------------------------------------
// Compare the extension to the supported extension by the current input plugins
map <TCHAR *, InputPlugin *, TextCompare>::iterator iter =
ext_map.find( szExt );
delete [] szExt;
@@ -100,11 +121,15 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
{
Console::Append( TEXT( "ERROR: Extension not supported" ) );
Console::Append( " " );
wprintf("OpenPlay > ERROR: Extension not supported\n");
return false;
}
InputPlugin * old_input = active_input_plugin;
}
// ---------------------------------------------------------------------------------------
// Now that we know which input pugin to use we set that one as active
InputPlugin * old_input = active_input_plugin; // Save the last one, if any
active_input_plugin = iter->second;
wprintf("OpenPlay > Input plugin '%s' activated\n", active_input_plugin->GetName());
// =======================================================================================
if( old_input )
{
@@ -120,17 +145,21 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
{
Console::Append( TEXT( "ERROR: Input plugin is NULL" ) );
Console::Append( " " );
wprintf("OpenPlay > ERROR: Input plugin is NULL\n");
return false;
}
// Connect
wprintf( "OpenPlay > OutMod\n" );
active_input_plugin->plugin->outMod = &output_server; // output->plugin;
// =======================================================================================
// Re-apply volume and panning
active_input_plugin->plugin->SetVolume( iCurVol );
active_input_plugin->plugin->SetPan( iCurPan );
Playback::Eq::Reapply();
//active_input_plugin->plugin->SetVolume( iCurVol );
//active_input_plugin->plugin->SetPan( iCurPan );
//Playback::Eq::Reapply();
// =======================================================================================
// Play
#ifdef PA_UNICODE
@@ -153,31 +182,43 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
active_input_plugin->plugin->Play( szTemp );
delete [] szTemp;
#else
#else
// =======================================================================================
// Play the file
// ---------------------------------------------------------------------------------------
// Title
TCHAR szTitle[ 2000 ] = TEXT( "\0" );
int length_in_ms;
wprintf( "OpenPlay > GetFileInfo\n" );
active_input_plugin->plugin->GetFileInfo( szFilename, szTitle, &length_in_ms );
wprintf( "OpenPlay > Play\n" );
active_input_plugin->plugin->Play( szFilename );
// =======================================================================================
#endif
bPlaying = true;
bPaused = false;
// Title
TCHAR szBuffer[ 5000 ];
_stprintf( szBuffer, TEXT( "%i. %s - Plainamp" ), iNumber, szTitle );
SetWindowText( WindowMain, szBuffer );
/*
// =======================================================================================
// Title
//TCHAR szBuffer[ 5000 ];
//_stprintf( szBuffer, TEXT( "%i. %s - Plainamp" ), iNumber, szTitle );
//SetWindowText( WindowMain, szBuffer );
// =======================================================================================
/*
TCHAR * szBasename = szFilename + uLen - 1;
while( ( szBasename > szFilename ) && ( *szBasename != TEXT( '\\' ) ) ) szBasename--;
szBasename++;
*/
*/
// Timer ON
EnableTimer( true );
//EnableTimer( true );
wprintf( "OpenPlay > End\n" );
return true;
}
@@ -243,12 +284,23 @@ bool Playback::Prev()
////////////////////////////////////////////////////////////////////////////////
///
// Play the file
////////////////////////////////////////////////////////////////////////////////
bool Playback::Play()
{
static int iLastIndex = -1;
if( bPlaying )
// ---------------------------------------------------------------------------------------
TCHAR sszBuffer[ 5000 ];
_stprintf( sszBuffer, TEXT( "Playback::Play() with bPlaying <%i>\n" ), bPlaying );
Console::Append( sszBuffer );
Console::Append( TEXT( " " ) );
wprintf( "Playback::Play() > Begin <%i>\n" , bPlaying );
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
if( bPlaying ) // If we are currently playing a file
{
if( !active_input_plugin ) return false;
if( !active_input_plugin->plugin ) return false;
@@ -256,14 +308,14 @@ bool Playback::Play()
const int iIndex = playlist->GetCurIndex();
if( iIndex < 0 ) return false;
/*
TCHAR szBuffer[ 5000 ];
_stprintf( szBuffer, TEXT( "OLD [%i] NEW [%i]" ), iLastIndex, iIndex );
SetWindowText( WindowMain, szBuffer );
*/
/*
TCHAR szBuffer[ 5000 ];
_stprintf( szBuffer, TEXT( "OLD [%i] NEW [%i]" ), iLastIndex, iIndex );
SetWindowText( WindowMain, szBuffer );
*/
// Same track/file as before?
TCHAR * szFilename = Playlist::GetFilename( iIndex );
// If we are not playing the same track/file as before
TCHAR * szFilename = Playlist::GetFilename( iIndex );
if( szFilename != szCurrentFilename )
{
// New track!
@@ -272,7 +324,7 @@ bool Playback::Play()
// NOT TWICE active_input_plugin->plugin->Stop();
// Timer OFF
EnableTimer( false );
//EnableTimer( false );
// Get filename
if( !szFilename )
@@ -297,7 +349,7 @@ bool Playback::Play()
bPaused = false;
// Timer ON
EnableTimer( true );
//EnableTimer( true );
}
else
{
@@ -306,13 +358,26 @@ bool Playback::Play()
}
}
}
else
// =======================================================================================
else // we are not currently playing
{
const int iIndex = playlist->GetCurIndex();
if( iIndex < 0 ) return false;
// Get filename
TCHAR * szFilename = Playlist::GetFilename( iIndex );
// =======================================================================================
//bool bPlaying = false;
//TCHAR * szFilename = TEXT("C:\Files\Spel och spelfusk\Console\Gamecube\Code\vgmstream (isolate ast)\Music\demo36_02.ast");
//bPlaying = OpenPlay( szFilename, 1 );
//bPlaying = OpenPlay( szFilename, iIndex + 1 );
//Console::Append( TEXT( "Playback.cpp:Playback::Play() called OpenPlay" ) );
// =======================================================================================
if( !szFilename )
{
Console::Append( TEXT( "ERROR: Could not resolve filename" ) );
@@ -320,6 +385,12 @@ bool Playback::Play()
return false;
}
TCHAR szBuffer[ 5000 ];
_stprintf( szBuffer, TEXT( "Playback.cpp: Play() got the filename <%s>" ), szFilename);
Console::Append( szBuffer );
// Console::Append( TEXT( " " ) );
wprintf( "Playback::Play() > Filename <%s>\n", szFilename);
// Play
iLastIndex = iIndex;
bPlaying = OpenPlay( szFilename, iIndex + 1 );
@@ -327,7 +398,7 @@ bool Playback::Play()
}
return true;
}
// =======================================================================================
////////////////////////////////////////////////////////////////////////////////
@@ -346,7 +417,7 @@ bool Playback::Pause()
bPaused = false;
// Timer ON
EnableTimer( true );
//EnableTimer( true );
}
else
{
@@ -355,7 +426,7 @@ bool Playback::Pause()
bPaused = true;
// Timer OFF
EnableTimer( false );
//EnableTimer( false );
}
// Console::Append( TEXT( "Playback::Pause" ) );
@@ -371,21 +442,23 @@ bool Playback::Stop()
{
if( !bPlaying ) return false;
// ---------------------------------------------------------------------------------------
// Stop
if( active_input_plugin && active_input_plugin->plugin )
{
active_input_plugin->plugin->Stop();
}
active_input_plugin = NULL; // QUICK FIX
// ---------------------------------------------------------------------------------------
bPlaying = false;
bPaused = false;
// Timer OFF
EnableTimer( false );
// Timer OFF > It was never turned on
//EnableTimer( false );
// Reset seekbar
Playback::UpdateSeek();
// Reset seekbar > We don't need this
//Playback::UpdateSeek();
return true;
}
@@ -425,15 +498,35 @@ bool Playback::IsPaused()
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////////////////
//int getlength();
//int getoutputtime();
bool Playback::UpdateSeek()
{
#ifdef NOGUI
printf( "Playback::UpdateSeek > Begin\n" );
if( active_input_plugin )
{
printf( "GetLength() > Begin\n" );
const int ms_len = active_input_plugin->plugin->GetLength();
//const int ms_cur = active_input_plugin->plugin->GetOutputTime();
//const int ms_len = getlength();
//const int ms_cur = getoutputtime();
//printf( "Current position is <%i of %i>\n", ms_cur, ms_len );
}
return true;
#else
static bool bSliderEnabledBefore = false;
bool bSliderEnabledAfter;
if( !WindowSeek ) return false;
//if( !WindowSeek ) return false;
int iVal = 0;
// If it has not been set
if( !active_input_plugin || !active_input_plugin->plugin )
{
if( bSliderEnabledBefore )
@@ -455,8 +548,18 @@ bool Playback::UpdateSeek()
iVal = ( ms_cur * 1000 ) / ms_len;
if( iVal > 1000 ) iVal = 0;
// =======================================================================================
//TCHAR szBuffer[ 5000 ];
//_stprintf( szBuffer, TEXT( "Current position is <%i of %i>" ), ms_cur, ms_len );
//Console::Append( szBuffer );
//Console::Append( TEXT( " " ) );
printf( "Current position is <%i of %i>\n", ms_cur, ms_len );
// =======================================================================================
}
if( !bSliderEnabledBefore )
{
EnableWindow( WindowSeek, TRUE );
@@ -468,6 +571,7 @@ bool Playback::UpdateSeek()
}
return true;
#endif
}
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_PLAYBACK_H
+408
View File
@@ -0,0 +1,408 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Usage instructions
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
// =======================================================================================
// Plugins
// ---------------------------------------------------------------------------------------
// Plainamp setup > The output plugin must be manually loaded and activated the first time it's used.
// After that the ini saves OutputPluginActive___out_wave_gpl.dll=1. Input plugins are automatically
// found, loaded and activated.
// =======================================================================================
// =======================================================================================
// The ini path szIniPath
// ---------------------------------------------------------------------------------------
/* We will get problems if the program can't find the ini settings. Plugins will not be loaded,
or loadedand then unloaded before activated, or not working. */
// =======================================================================================
///////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Include
// ¯¯¯¯¯¯¯¯¯¯
#include <iostream>
//#include "Unicode.h"
//#include "Output.h"
#include <windows.h>
#include <string>
#include "Global.h" // Local
#include "Font.h"
#include "InputPlugin.h"
#include "OutputPlugin.h"
#include "VisPlugin.h"
#include "DspPlugin.h"
#include "GenPlugin.h"
#include "Main.h"
#include "Rebar.h"
#include "Playlist.h"
#include "Status.h"
#include "PluginManager.h"
#include "Prefs.h"
#include "Config.h"
#include "Emabox/Emabox.h"
#include "Console.h"
#include "PlayerExport.h" // DLL Player
/////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Declarations and definitions
// ¯¯¯¯¯¯¯¯¯¯
// -------------------------
// Keys
// ---------
#define PLUS_ALT ( FVIRTKEY | FALT )
#define PLUS_CONTROL ( FVIRTKEY | FCONTROL )
#define PLUS_CONTROL_ALT ( FVIRTKEY | FCONTROL | FALT )
#define PLUS_CONTROL_SHIFT ( FVIRTKEY | FCONTROL | FSHIFT )
#define PLUS_SHIFT ( FVIRTKEY | FSHIFT )
// -------------
HINSTANCE g_hInstance = NULL; // extern
HINSTANCE hInstance = NULL; // extern
TCHAR * szHomeDir = NULL; // extern
int iHomeDirLen = 0; // extern
TCHAR * szPluginDir = NULL; // extern
int iPluginDirLen = 0; // extern
// -------------------------
/* Read global settings from the ini file. They are read from the ini file through Config.h.
Usage: ( &where to place it, the option name, public or private, default value) */
// ---------
TCHAR szCurDir[ MAX_PATH + 1 ] = TEXT( "" );
ConfCurDir ccdCurDir( szCurDir, TEXT( "CurDir" ) );
// -------------------------
bool bWarnPluginsMissing;
ConfBool cbWarnPluginsMissing( &bWarnPluginsMissing, TEXT( "WarnPluginsMissing" ), CONF_MODE_PUBLIC, false );
bool bLoop;
ConfBool cbLoop( &bLoop, TEXT( "Loop" ), CONF_MODE_PUBLIC, false );
/////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////
//int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow )
void Player_Main(bool Console)
{
// =======================================================================================
// Set variables
//g_hInstance = hInstance;
// =======================================================================================
//printf( "DLL > main_dll() opened\n" );
if (Console) Player_Console(true);
//MessageBox(0, "main() opened", "", 0);
//printf( "main() opened\n" );
wprintf( "DLL > main_dll() > Begin\n" );
// =======================================================================================
// Load full config from ini file
//Conf::Init( hInstance );
Conf::Init( );
// ---------------------------------------------------------------------------------------
wprintf( "DLL > bLoop <%i>\n", bLoop);
wprintf( "DLL > bWarnPluginsMissing <%i>\n", bWarnPluginsMissing);
// ---------------------------------------------------------------------------------------
// =======================================================================================
// =======================================================================================
/* Get home dir. We use the TCHAR type for the dirname to insure us against foreign letters
in the dirnames */
szHomeDir = new TCHAR[ MAX_PATH + 1 ];
iHomeDirLen = GetModuleFileName( NULL, szHomeDir, MAX_PATH );
//if( !iHomeDirLen ) return 1;
// ---------------------------------------------------------------------------------------
// Walk through the pathname and look for backslashes
TCHAR * walk = szHomeDir + iHomeDirLen - 1;
while( ( walk > szHomeDir ) && ( *walk != TEXT( '\\' ) ) ) walk--;
// ---------------------------------------------------------------------------------------
walk++;
*walk = TEXT( '\0' );
iHomeDirLen = walk - szHomeDir;
// =======================================================================================
// =======================================================================================
/* Get plugins dir. Notice to change the number 8 in two places below if the dir name
is changed */
szPluginDir = new TCHAR[ MAX_PATH + 1 ];
memcpy( szPluginDir, szHomeDir, iHomeDirLen * sizeof( TCHAR ) );
memcpy( szPluginDir + iHomeDirLen, TEXT( "PluginsMusic" ), 12 * sizeof( TCHAR ) );
szPluginDir[ iHomeDirLen + 12 ] = TEXT( '\0' );
wprintf("DLL > Plugindir: %s\n\n", szPluginDir);
// =======================================================================================
#ifndef NOGUI
Font::Create();
//Console::Append( TEXT( "Winmain.cpp called Font::Create()" ) );
#endif
// =======================================================================================
// The only thing this function currently does is creating the Playlist.
// =======================================================================================
BuildMainWindow();
//addfiletoplaylist("c:\\zelda\\demo37_01.ast");
//addfiletoplaylist("c:\\zelda\\demo36_02.ast");
//Console::Append( TEXT( "Winmain.cpp called BuildMainWindow()" ) );
//Prefs::Create(); // This creates windows preferences
//Console::Append( TEXT( "Winmain.cpp called Prefs::Create()" ) );
// Show window
Plugin::FindAll<InputPlugin> ( szPluginDir, TEXT( "in_*.dll" ), true );
Plugin::FindAll<OutputPlugin>( szPluginDir, TEXT( "out_*.dll" ), false );
Plugin::FindAll<VisPlugin> ( szPluginDir, TEXT( "vis_*.dll" ), false );
Plugin::FindAll<DspPlugin> ( szPluginDir, TEXT( "dsp_*.dll" ), false );
Plugin::FindAll<GenPlugin> ( szPluginDir, TEXT( "gen_*.dll" ), true );
PluginManager::Fill();
wprintf( "Winmain.cpp > PluginManager::Fill()\n" );
// ---------------------------------------------------------------------------------------
// Set volume. This must probably be done after the dll is loaded.
GlobalVolume = Playback::Volume::Get();
GlobalCurrentVolume = GlobalVolume;
Output_SetVolume( GlobalVolume );
wprintf("\n >>> Volume(%i)\n\n", GlobalVolume);
// ---------------------------------------------------------------------------------------
// =======================================================================================
// Check plugin presence
// =======================================================================================
// =======================================================================================
// Todo: all the rest...
// ACCEL accels[] = {
// =======================================================================================
// =======================================================================================
//Playback::Play();
//play_file("C:\\opening.hps");
//play_file("C:\\Files\\Spel och spelfusk\\Console\\Gamecube\\Code\\Dolphin\\Binary\\win32\\evt_x_event_00.dsp");
//printf("Winmain.cpp called Playback.cpp:Playback::Play()\n");
// =======================================================================================
// ---- Set volume and get current location ----
// Somehow we don't have access to active_input_plugin->plugin->GetLength() from here so
// we have to call it in Playback::UpdateSeek() instead
//Sleep(1000);
//Playback::UpdateSeek();
//Output_SetVolume( 100 ); // volume is better set from the ini file
// ---------------------------------------------------------------------------------------
// =======================================================================================
// =======================================================================================
// Check the plugins
if( input_plugins.empty() )
{
wprintf("\n***Warning: The input plugin is not working\n\n");
}
if( !active_input_plugin || !active_input_plugin->plugin )
{
wprintf("The input plugin is not activated yet\n");
}
else
{
//const int ms_len = active_input_plugin->plugin->GetLength();
//const int ms_cur = active_input_plugin->plugin->GetOutputTime();
//wprintf("We are at <%i of %i>\n", ms_cur, ms_len);
}
// ---------------------------------------------------------------------------------------
if( active_output_count > 0 )
{
// Minimum
int res_temp;
for( int i = 0; i < active_output_count; i++ )
{
res_temp = active_output_plugins[ i ]->plugin->GetOutputTime();
}
wprintf("Playback progress <%i>\n", res_temp);
}
else
{
wprintf("\n***Warning: The output plugin is not working\n\n");
}
// =======================================================================================
// =======================================================================================
// Current playlist items
wprintf("Size & index <%i> <%i>\n", playlist->GetSize(), playlist->GetCurIndex());
// =======================================================================================
// =======================================================================================
//This worked
//Sleep(2000);
//Playback::Stop();
//playlist->RemoveAll();
//play_file("C:\\demo36_02.ast");
// =======================================================================================
// =======================================================================================
// Current playlist items
wprintf("Size & index <%i> <%i>\n", playlist->GetSize(), playlist->GetCurIndex());
// =======================================================================================
// =======================================================================================
// This worked
//Sleep(5000);
//Playback::Stop();
//Playback::Play();
// =======================================================================================
// =======================================================================================
//bool bPlaying = false;
//TCHAR * szFilename = TEXT("C:\Files\Spel och spelfusk\Console\Gamecube\Code\vgmstream (isolate ast)\Music\demo36_02.ast");
//bPlaying = OpenPlay( szFilename, 1 );
//bPlaying = OpenPlay( szFilename, iIndex + 1 );
//Console::Append( TEXT( "Playback.cpp:Playback::Play() called OpenPlay" ) );
// =======================================================================================
// =======================================================================================
// Start the timer
if(!TimerCreated && bLoop) // Only create this the first time
{
wprintf("Created the timer\n");
MakeTime();
TimerCreated = true;
}
// =======================================================================================
wprintf( "DLL > main_dll() > End\n\n\n" );
//std::cin.get();
}
// =======================================================================================
// Should I use this?
void close()
{
printf( "The Winmain.cpp message loop was reached\n" );
// Message loop
//std::cin.get();
Playback::Stop(); // If we don't call this before we unload the dll we get a crash
printf("We are now past the message loop\n" );
//DestroyAcceleratorTable( hAccel );
// =======================================================================================
// Input
vector <InputPlugin *>::iterator iter_input = input_plugins.begin();
while( iter_input != input_plugins.end() )
{
( *iter_input )->Unload();
iter_input++;
}
// Output
vector <OutputPlugin *>::iterator iter_output = output_plugins.begin();
while( iter_output != output_plugins.end() )
{
( *iter_output )->Unload();
iter_output++;
}
// General
vector <GenPlugin *>::iterator iter_gen = gen_plugins.begin();
while( iter_gen != gen_plugins.end() )
{
( *iter_gen )->Unload();
iter_gen++;
}
// =======================================================================================
// TODO: create main::destroy
// UnregisterClass( PA_CLASSNAME, g_hInstance );
//Prefs::Destroy();
//Font::Destroy();
/*
delete [] szPluginDir;
delete [] szHomeDir;
*/
// ---------------------------------------------------------------------------------------
// We don't save any changes
//Conf::Write();
//printf("Winmain.cpp called Conf::Write(), the last function\n");
// ---------------------------------------------------------------------------------------
//std::cin.get(); // Let use see all messages
//return 0;
}
// =======================================================================================
@@ -0,0 +1,162 @@
//////////////////////////////////////////////////////////////////////////////////////////
// Include
// ¯¯¯¯¯¯¯¯¯¯
#include <iostream> // System
#include "../../Common/Src/Console.h" // Local common
#include "OutputPlugin.h" // Local
#include "Playback.h"
#include "Playlist.h"
#define _DLL_PLAYER_H_
#include "PlayerExport.h" // DLL Player
//////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Declarations and definitions
// ¯¯¯¯¯¯¯¯¯¯
std::string CurrentlyPlayingFile;
int GlobalVolume;
int GlobalCurrentVolume;
bool GlobalPause;
bool TimerCreated = false;
bool Initialized = false;
/////////////////////////////////
// -------------------------
/* We keep the file in the playlist, even though we currently only every have one file here
at a time */
// ---------
void AddFileToPlaylist(char * a)
{
//playlist->RemoveAll();
#include "unicode.h"
const int iLen = strlen(a); // I can't do this because I don't
printf( "iLen <%i>\n", iLen );
// ---------------------------------------------------------------------------------------
// Do some string conversion
TCHAR * szKeep;
szKeep = new TCHAR[ iLen + 1 ];
ToTchar( szKeep, a, iLen );
szKeep[ iLen ] = TEXT( '\0' );
playlist->PushBack( szKeep );
// ---------------------------------------------------------------------------------------
// If we added a second file the current index = -1 so we have to change that back
playlist->SetCurIndex( 0 );
}
void Player_Play(char * FileName)
{
wprintf("Play file <%s>\n", FileName);
// Check if the file exists
if(GetFileAttributes(FileName) == INVALID_FILE_ATTRIBUTES)
{
wprintf("Warning: The file <%s> does not exist. Something is wrong.\n", FileName);
return;
}
Playback::Stop();
//wprintf("Stop\n");
playlist->RemoveAll();
//wprintf("RemoveAll\n");
AddFileToPlaylist(FileName);
//wprintf("addfiletoplaylist\n");
// Play the file
Playback::Play();
CurrentlyPlayingFile = FileName;
// ---------------------------------------------------------------------------------------
// Set volume. This must probably be done after the dll is loaded.
//Output_SetVolume( Playback::Volume::Get() );
//wprintf("Volume(%i)\n", Playback::Volume::Get());
// ---------------------------------------------------------------------------------------
GlobalPause = false;
}
void Player_Pause()
{
if (!GlobalPause)
{
wprintf("DLL > Pause\n");
Playback::Pause();
GlobalPause = true;
}
else
{
wprintf("DLL > UnPause from Pause\n");
Player_Unpause();
GlobalPause = false;
}
}
void Player_Unpause()
{
wprintf("DLL > UnPause\n");
Playback::Play();
GlobalPause = false;
}
void Player_Mute()
{
wprintf("DLL > Mute <%i> <%i>\n", GlobalVolume, GlobalCurrentVolume);
// ---------------------------------------------------------------------------------------
// Set volume. For some reason Playback::Volume::Get() is not updated when we run Output_SetVolume()
// I probably disabled it by mistake, so we only keep track of the volume with GlobalVolume from now on
if(GlobalCurrentVolume > 0)
{
Output_SetVolume( 0 );
GlobalCurrentVolume = 0;
wprintf("DLL > Volume <%i>\n", GlobalCurrentVolume);
}
else
{
//Output_SetVolume( GlobalVolume );
Output_SetVolume( GlobalVolume );
GlobalCurrentVolume = GlobalVolume;
wprintf("DLL > Volume <%i>\n", GlobalCurrentVolume);
}
//wprintf("Volume(%i)\n", Playback::Volume::Get());
// ---------------------------------------------------------------------------------------
}
void Player_Volume(int a)
{
GlobalVolume = a;
Output_SetVolume( GlobalVolume );
wprintf("DLL > Volume <%i> <%i>\n", GlobalVolume, GlobalCurrentVolume);
}
void ShowConsole()
{
//startConsoleWin(130, 10000, "Console Window"); // give room for 2000 rows
StartConsoleWin(100, 2000, "ConsoleDLL"); // give room for 2000 rows
}
void Player_Console(bool Console)
{
if(Console)
ShowConsole();
else
#if defined (_WIN32)
FreeConsole();
#endif
}
@@ -0,0 +1,48 @@
// Copyright (C) 2003-2008 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//////////////////////////////////////////////////////////////////////////////////////////
// Include
// ¯¯¯¯¯¯¯¯¯¯
//////////////////////////////////
// -------------------------
// DLL Player
// ---------
void MakeTime();
#ifndef _DLL_PLAYER_H_
extern int GlobalVolume;
extern int GlobalCurrentVolume;
extern bool GlobalPause;
extern bool TimerCreated;
#endif
// Dll export
#define EXPORT __declspec(dllexport)
EXPORT void Player_Main(bool Console);
EXPORT void Player_Console(bool Console);
EXPORT void Player_Play(char *);
EXPORT void Player_Pause();
EXPORT void Player_Unpause();
EXPORT void Player_Mute();
EXPORT void Player_Volume(int);
+53 -17
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Playlist.h"
@@ -96,9 +96,12 @@ bool Playlist::Create()
{
if( WindowPlaylist ) return false;
// If this is not called a crash occurs
PlaylistView::Create();
/*
#ifndef NOGUI
RECT ClientMain;
GetClientRect( WindowMain, &ClientMain );
@@ -134,15 +137,22 @@ bool Playlist::Create()
{
SetWindowLong( WindowPlaylist, GWL_WNDPROC, ( LONG )WndprocPlaylist );
}
*/
Font::Apply( WindowPlaylist );
#endif NOGUI
TCHAR * szPlaylistMind = new TCHAR[ iHomeDirLen + 12 + 1 ];
memcpy( szPlaylistMind, szHomeDir, iHomeDirLen * sizeof( TCHAR ) );
memcpy( szPlaylistMind + iHomeDirLen, TEXT( "Plainamp.m3u" ), 12 * sizeof( TCHAR ) );
szPlaylistMind[ iHomeDirLen + 12 ] = TEXT( '\0' );
Playlist::AppendPlaylistFile( szPlaylistMind );
return true;
@@ -920,6 +930,10 @@ bool Playlist_DialogBoth( bool bOpenOrSave )
playlist->RemoveAll();
Playlist::AppendPlaylistFile( szFilename );
Playback::Play();
Console::Append( TEXT( "Playlist.cpp:Playlist_DialogBoth() called Playback::Play()" ) );
Console::Append( TEXT( " " ) );
}
}
else
@@ -960,6 +974,9 @@ bool Playlist::DialogSaveAs()
////////////////////////////////////////////////////////////////////////////////
bool Playlist::AppendPlaylistFile( TCHAR * szFilename )
{
// Open playlist file
HANDLE hFile = CreateFile(
szFilename, // LPCTSTR lpFileName
@@ -971,15 +988,20 @@ bool Playlist::AppendPlaylistFile( TCHAR * szFilename )
NULL // HANDLE hTemplateFile
);
// This will happen if there is no Playlist.m3u
/*
if( hFile == INVALID_HANDLE_VALUE )
{
// MessageBox( 0, TEXT( "Could not read playlist file" ), TEXT( "Error" ), MB_ICONERROR );
//Console::Append( "We got INVALID_HANDLE_VALUE" );
return false;
}
const bool bEmptyBefore = ( playlist->GetSize() == 0 );
*/
// Disable this
//const bool bEmptyBefore = ( playlist->GetSize() == 0 );
// =======================================================================================
// Remove filename from <szFilename> so we can
// use it as relative directory root
TCHAR * szWalk = szFilename + _tcslen( szFilename ) - 1;
@@ -1002,6 +1024,7 @@ bool Playlist::AppendPlaylistFile( TCHAR * szFilename )
char * rawdata = new char[ iSizeBytes + 1 ]; // One more so we can write '\0' on EOF
DWORD iBytesRead;
// =======================================================================================
// Read whole file
ReadFile(
hFile, // HANDLE hFile
@@ -1040,20 +1063,32 @@ bool Playlist::AppendPlaylistFile( TCHAR * szFilename )
if( ( end - beg > 2 ) && ( *beg != '#' ) )
{
TCHAR * szKeep;
if( beg[ 1 ] == ':' )
{
// TODO: Better detection, network path?
// Absolute path
// Absolute path, skip this
/*
const int iLen = end - beg;
TCHAR szBuffer[ 5000 ];
_stprintf( szBuffer, TEXT( "iLen <%i>" ), iLen );
Console::Append( szBuffer );
szKeep = new TCHAR[ iLen + 1 ];
ToTchar( szKeep, beg, iLen );
szKeep[ iLen ] = TEXT( '\0' );
*/
}
else
{
// Skip initial so we don't get a double backslash in between
while( ( beg[ 0 ] == '\\' ) && ( beg < end ) ) beg++;
// Relative path
@@ -1220,7 +1255,8 @@ TCHAR * Playlist::GetFilename( int iIndex )
return ( entry ? entry->szFilename : NULL );
*/
//TCHAR * szFilename = "C:\Files\Spel och spelfusk\Console\Gamecube\Code\vgmstream (isolate ast)\Music\demo36_02.ast";
//return szFilename;
return ( TCHAR * )playlist->Get( iIndex );
}
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_PLAYLIST_H
@@ -13,6 +13,7 @@
#include "PlaylistControler.h"
#include "Config.h"
#include "Font.h"
#include "Console.h"
bool bPlaylistFollow;
ConfBool cbPlaylistFollow( &bPlaylistFollow, TEXT( "PlaylistFollow" ), CONF_MODE_PUBLIC, true );
@@ -131,6 +132,9 @@ void PlaylistControler::SetCurIndex( int iIndex )
const int iCurIndexBefore = _database.GetCurIndex();
_database.SetCurIndex( iIndex );
// ---------------------------------------------------------------------------------------
// We disable the windows management
/*
if( bPlaylistFollow )
{
ListView_SetItemState( _hView, ( UINT )-1, 0, LVIS_SELECTED | LVIS_FOCUSED );
@@ -140,6 +144,8 @@ void PlaylistControler::SetCurIndex( int iIndex )
if( iCurIndexBefore != -1 )
ListView_RedrawItems( _hView, iCurIndexBefore, iCurIndexBefore );
ListView_RedrawItems( _hView, iIndex, iIndex );
*/
// ---------------------------------------------------------------------------------------
}
// Returns <true> on digit count change
@@ -196,6 +202,8 @@ PlaylistControler::PlaylistControler( HWND hView, bool bEnableZeroPadding, int *
_database.SetCurIndexSlave( piIndexSlave );
printf("PlaylistControler::PlaylistControler was called\n");
Refresh();
// TODO clear list view here???
@@ -207,9 +215,13 @@ void PlaylistControler::PushBack( TCHAR * szText )
const int iSize = _database.GetMaxIndex();
_database.PushBack( szText );
ListView_SetItemCount( _hView, _database.GetSize() );
// ---------------------------------------------------------------------------------------
// Disabled windows function
//ListView_SetItemCount( _hView, _database.GetSize() );
if( FixDigitsMore() ) Refresh();
//if( FixDigitsMore() ) Refresh();
// ---------------------------------------------------------------------------------------
}
void PlaylistControler::Insert( int i, TCHAR * szText )
@@ -225,7 +237,9 @@ void PlaylistControler::Insert( int i, TCHAR * szText )
void PlaylistControler::RemoveAll()
{
_database.Clear();
ListView_DeleteAllItems( _hView );
// This is for the windows playlist, we don't use that
//ListView_DeleteAllItems( _hView );
if( FixDigitsLess() ) Refresh();
}
@@ -333,6 +347,8 @@ void PlaylistControler::SelectInvert()
const TCHAR * PlaylistControler::Get( int i )
{
Console::Append( TEXT("We are in PlaylistControler::Get()") );
return _database.Get( i );
}
+22 -3
View File
@@ -9,6 +9,11 @@
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
#include "Console.h"
#include "Global.h"
// =======================================================================================
#ifndef PLAYLIST_MODEL_H
#define PLAYLIST_MODEL_H 1
@@ -19,7 +24,6 @@
using namespace std;
class PlaylistModel
{
vector<TCHAR *> _database;
@@ -43,13 +47,20 @@ public:
_piCurIndex = piIndexSlave;
}
// =======================================================================================
// This is where the _database is populated
// =======================================================================================
void PushBack( TCHAR * szText )
{
_database.push_back( szText );
Console::Append( TEXT( "PlaylistModel.h:_database.PushBack() was called " ) );
_database.push_back( szText ); // this is a <vector> API call
}
void Insert( int i, TCHAR * szText )
{
Console::Append( TEXT( "PlaylistModel.h:_database.Insert() was called " ) );
if( i <= *_piCurIndex ) ( *_piCurIndex )++;
_database.insert( _database.begin() + i, szText );
}
@@ -62,6 +73,8 @@ public:
const TCHAR * Get( int i )
{
//Console::Append( TEXT( "PlaylistModel.h:_database.Get() was called " ) );
if( 0 > i || i >= ( int )_database.size() )
{
static const TCHAR * szError = TEXT( "INDEX OUT OF RANGE" );
@@ -89,7 +102,13 @@ public:
void SetCurIndex( int iIndex )
{
if( 0 > iIndex || iIndex >= ( int )_database.size() ) return;
if( 0 > iIndex || iIndex >= ( int )_database.size() )
{
wprintf("SetCurIndex > Return");
return;
}
*_piCurIndex = iIndex;
}
+97 -87
View File
@@ -9,7 +9,7 @@
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
#include "Playlist.h"
#include "Main.h"
#include "Status.h"
@@ -20,8 +20,12 @@
WNDPROC WndprocPlaylistBackup = NULL;
LRESULT CALLBACK WndprocPlaylist( HWND hwnd, UINT message, WPARAM wp, LPARAM lp );
// =======================================================================================
// =======================================================================================
// This gives the values from the ini file.
// ConfBool = class
PlaylistControler * playlist = NULL; // extern
bool bPlaylistEntryNumberZeroPadding;
@@ -32,10 +36,15 @@ ConfInt ciCurPlaylistPosition( &iCurPlaylistPosition, TEXT( "CurPlaylistPosition
bool bInfinitePlaylist;
ConfBool cbInfinitePlaylist( &bInfinitePlaylist, TEXT( "InfinitePlaylist" ), CONF_MODE_PUBLIC, false );
// =======================================================================================
// =======================================================================================
void PlaylistView::Create()
{
#ifndef NOGUI
RECT ClientMain;
GetClientRect( WindowMain, &ClientMain );
@@ -44,8 +53,7 @@ void PlaylistView::Create()
const int iPlaylistHeight = iClientHeight - iRebarHeight - iStatusHeight;
LoadCommonControls();
//LoadCommonControls();
DWORD dwStyle;
@@ -65,10 +73,10 @@ void PlaylistView::Create()
WC_LISTVIEW, // class name - defined in commctrl.h
TEXT( "" ), // dummy text
dwStyle, // style
0,
iRebarHeight, // + -2,
iClientWidth,
iPlaylistHeight,
0,
iRebarHeight, // + -2,
iClientWidth,
iPlaylistHeight,
WindowMain, // parent
NULL, // ID
g_hInstance, // instance
@@ -76,89 +84,95 @@ void PlaylistView::Create()
if(!WindowPlaylist) return; // TODO
playlist = new PlaylistControler( WindowPlaylist, bPlaylistEntryNumberZeroPadding, &iCurPlaylistPosition );
// This calls PlaylistControler::PlaylistControler()
playlist = new PlaylistControler( WindowPlaylist, bPlaylistEntryNumberZeroPadding, &iCurPlaylistPosition );
#else
HWND WindowPlaylist = NULL;
playlist = new PlaylistControler( WindowPlaylist, bPlaylistEntryNumberZeroPadding, &iCurPlaylistPosition );
#endif
// Exchange window procedure
WndprocPlaylistBackup = ( WNDPROC )GetWindowLong( WindowPlaylist, GWL_WNDPROC );
if( WndprocPlaylistBackup != NULL )
//WndprocPlaylistBackup = ( WNDPROC )GetWindowLong( WindowPlaylist, GWL_WNDPROC );
//if( WndprocPlaylistBackup != NULL )
//{
// SetWindowLong( WindowPlaylist, GWL_WNDPROC, ( LONG )WndprocPlaylist );
//}
//ListView_SetExtendedListViewStyle( WindowPlaylist, LVS_EX_FULLROWSELECT ); // | LVS_EX_GRIDLINES );
//playlist->Resize( WindowMain );
/*
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/structures/lvcolumn.asp
*
* Remarks:
* If a column is added to a list-view control with index 0 (the leftmost column)
* and with LVCFMT_RIGHT or LVCFMT_CENTER specified, the text is not right-aligned
* or centered. The text in the index 0 column is left-aligned. Therefore if you
* keep inserting columns with index 0, the text in all columns are left-aligned.
* If you want the first column to be right-aligned or centered you can make a dummy
* column, then insert one or more columns with index 1 or higher and specify the
* alignment you require. Finally delete the dummy column.
*/
//LV_COLUMN lvColumn;
//memset( &lvColumn, 0, sizeof( LV_COLUMN ) );
//lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
//
//// Number column (with dummy hack)
//lvColumn.fmt = LVCFMT_LEFT;
//lvColumn.cx = 0;
//lvColumn.pszText = TEXT( "" );
//ListView_InsertColumn( WindowPlaylist, 0, &lvColumn );
//lvColumn.fmt = LVCFMT_RIGHT;
//lvColumn.cx = 120;
//lvColumn.pszText = TEXT( "" );
//ListView_InsertColumn( WindowPlaylist, 1, &lvColumn );
//ListView_DeleteColumn( WindowPlaylist, 0 );
// Entry
//lvColumn.fmt = LVCFMT_LEFT;
//lvColumn.cx = 120;
//lvColumn.pszText = TEXT( "Filename" );
//ListView_InsertColumn(WindowPlaylist, 1, &lvColumn);
/*
stupid test code
SCROLLINFO scrollinfo;
ZeroMemory( &scrollinfo, sizeof( SCROLLINFO ) );
scrollinfo.cbSize = sizeof( SCROLLINFO );
scrollinfo.fMask = 0; // SIF_DISABLENOSCROLL;
if( !GetScrollInfo( WindowPlaylist, SB_VERT, &scrollinfo ) )
{
SetWindowLong( WindowPlaylist, GWL_WNDPROC, ( LONG )WndprocPlaylist );
MessageBox( 0, "ERROR", "", 0 );
}
else
{
MessageBox( 0, "OKAY", "", 0 );
scrollinfo.fMask = SIF_DISABLENOSCROLL;
SetScrollInfo( WindowPlaylist, SB_VERT, &scrollinfo, TRUE );
}
if( !ShowScrollBar( WindowPlaylist, SB_VERT, TRUE ) )
{
MessageBox( 0, "ERROR ShowScrollBar", "", 0 );
}
ListView_SetExtendedListViewStyle( WindowPlaylist, LVS_EX_FULLROWSELECT ); // | LVS_EX_GRIDLINES );
playlist->Resize( WindowMain );
/*
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/structures/lvcolumn.asp
*
* Remarks:
* If a column is added to a list-view control with index 0 (the leftmost column)
* and with LVCFMT_RIGHT or LVCFMT_CENTER specified, the text is not right-aligned
* or centered. The text in the index 0 column is left-aligned. Therefore if you
* keep inserting columns with index 0, the text in all columns are left-aligned.
* If you want the first column to be right-aligned or centered you can make a dummy
* column, then insert one or more columns with index 1 or higher and specify the
* alignment you require. Finally delete the dummy column.
*/
LV_COLUMN lvColumn;
memset( &lvColumn, 0, sizeof( LV_COLUMN ) );
lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
// Number column (with dummy hack)
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 0;
lvColumn.pszText = TEXT( "" );
ListView_InsertColumn( WindowPlaylist, 0, &lvColumn );
lvColumn.fmt = LVCFMT_RIGHT;
lvColumn.cx = 120;
lvColumn.pszText = TEXT( "" );
ListView_InsertColumn( WindowPlaylist, 1, &lvColumn );
ListView_DeleteColumn( WindowPlaylist, 0 );
// Entry
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 120;
lvColumn.pszText = TEXT( "Filename" );
ListView_InsertColumn(WindowPlaylist, 1, &lvColumn);
/*
stupid test code
SCROLLINFO scrollinfo;
ZeroMemory( &scrollinfo, sizeof( SCROLLINFO ) );
scrollinfo.cbSize = sizeof( SCROLLINFO );
scrollinfo.fMask = 0; // SIF_DISABLENOSCROLL;
if( !GetScrollInfo( WindowPlaylist, SB_VERT, &scrollinfo ) )
{
MessageBox( 0, "ERROR", "", 0 );
}
else
{
MessageBox( 0, "OKAY", "", 0 );
scrollinfo.fMask = SIF_DISABLENOSCROLL;
SetScrollInfo( WindowPlaylist, SB_VERT, &scrollinfo, TRUE );
}
if( !ShowScrollBar( WindowPlaylist, SB_VERT, TRUE ) )
{
MessageBox( 0, "ERROR ShowScrollBar", "", 0 );
}
SCROLLBARINFO scrollbarinfo;
scrollbarinfo.cbSize = sizeof( SCROLLBARINFO );
if( !GetScrollBarInfo( WindowPlaylist, OBJID_VSCROLL, &scrollbarinfo ) )
{
MessageBox( 0, "ERROR GetScrollBarInfo", "", 0 );
}
*/
SCROLLBARINFO scrollbarinfo;
scrollbarinfo.cbSize = sizeof( SCROLLBARINFO );
if( !GetScrollBarInfo( WindowPlaylist, OBJID_VSCROLL, &scrollbarinfo ) )
{
MessageBox( 0, "ERROR GetScrollBarInfo", "", 0 );
}
*/
}
@@ -166,10 +180,6 @@ if( !GetScrollBarInfo( WindowPlaylist, OBJID_VSCROLL, &scrollbarinfo ) )
// Dragging
static int iItemHeight = 15;
static int iDragStartY = 0;
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Plugin.h"
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_PLUGIN_H
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "PluginManager.h"
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Prefs.h"
+32 -16
View File
@@ -1,13 +1,23 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
// WndprocRebar is called once every second during playback
// =======================================================================================
// In Toolbar::Create() the progress bar is called the Seekbar
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Rebar.h"
@@ -20,7 +30,7 @@
#include "Config.h"
#include "Winamp/wa_ipc.h"
#include "resrc1.h"
#include "Resources/resrc1.h"
@@ -240,10 +250,12 @@ bool Toolbar::Create()
}
// Exchange window procedure
WndprocRebarBackup = ( WNDPROC )GetWindowLong( WindowRebar, GWL_WNDPROC );
WndprocRebarBackup = ( WNDPROC )GetWindowLong( WindowRebar, GWL_WNDPROC );
//WndprocRebarBackup = ( WNDPROC )GetWindowLongPtr( WindowRebar, GWLP_WNDPROC ); // 64 bit
if( WndprocRebarBackup != NULL )
{
SetWindowLong( WindowRebar, GWL_WNDPROC, ( LONG )WndprocRebar );
//SetWindowLongPtr( WindowRebar, GWLP_WNDPROC, ( LONG )WndprocRebar );
}
rebar_menu = CreatePopupMenu();
@@ -1030,13 +1042,15 @@ void ContextMenuRebar( POINT * p )
////////////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK WndprocRebar( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
{
//Console::Append( TEXT("Rebar.cpp: WndprocRebar called") );
switch( message )
{
case WM_CONTEXTMENU:
case WM_CONTEXTMENU: // This affects the placement of the progress bar
{
POINT p;
GetCursorPos( &p );
ContextMenuRebar( &p );
//POINT p;
//GetCursorPos( &p );
//ContextMenuRebar( &p );
return 0;
}
@@ -1071,6 +1085,8 @@ LRESULT CALLBACK WndprocSeek( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
static bool bDown = false;
static int iLastVal = 0;
//Console::Append( TEXT("Rebar.cpp: WndprocSeek called") );
switch( message )
{
case WM_LBUTTONDOWN:
@@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "resource.h"
//#include "resource.h"
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
+126
View File
@@ -0,0 +1,126 @@
// ================================================================================================
// File description
// ----------------
/* In the GUI build there is a timer that is initiated with SetTimer() that will setup a timer that
calls the lpTimerFunc function pointer as long as your program is running a message loop. If it
doesn't run one, like in a console application (the NOGUI build), you'll have to use a different
kind of timer API, like timeSetEvent() or CreateThreadPoolTimer(). These timers use a different
thread to make the callback so be careful to properly lock and synchronize. */
// ================================================================================================
// ================================================================================================
// Library requirements
// ----------------
// This program needs winmm.lib. There's no simpler or better way to make a timer withouth it.
// ================================================================================================
// ================================================================================================
// Includes
// ----------------
#include <iostream>
//using namespace std;
#include <windows.h>
#include <mmsystem.h>
#include "Global.h"
#include "PlayerExport.h"
#include "InputPlugin.h"
// ================================================================================================
////////////////////////////////////////////////////////////////////////////////////////////
// Declarations and definitions
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void MakeTime();
int g_Stop = 0;
extern std::string CurrentlyPlayingFile;
extern bool GlobalPause;
///////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
// Manage restart when playback for a file has reached the end of the file
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
#ifdef _M_X64
void CALLBACK Update()
#else
void CALLBACK Update(unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)
#endif
{
//wprintf("DLL > Update() > Begin (%i)\n", active_input_plugin);
// --------------------------------
// Manage restart when playback for a file has reached the end of the file
// --------------
// Check if the input plugin is activated
if(!active_input_plugin || !active_input_plugin->plugin)
{
wprintf("The input plugin is not activated yet\n");
}
else
{
const int ms_len = active_input_plugin->plugin->GetLength();
const int ms_cur = active_input_plugin->plugin->GetOutputTime();
// Get the current playback progress
float progress;
if(ms_len > 0)
progress = (float)ms_cur / ms_len;
else
progress = 0;
if ( progress > 0.7 ) // Only show this if we are getting close to the end, for bugtesting
// basically
{
wprintf("Playback progress <%i of %i>\n", ms_cur, ms_len);
}
// Because cur never go all the way to len we can't use a == comparison. Insted of this
// we could also check if the location is the same as right before.
if(ms_cur > ms_len - 1000 && !GlobalPause) // avoid restarting in cases where we just pressed pause
{
wprintf("Restart <%s>\n", CurrentlyPlayingFile.c_str());
Player_Play((char *)CurrentlyPlayingFile.c_str());
}
}
// --------------
//wprintf("Make new time\n");
MakeTime(); // Make a new one
}
void MakeTime()
{
timeSetEvent(
2000, // Interval in ms
0,
#ifdef _M_X64
(LPTIMECALLBACK) Update, // The function
#else
Update,
#endif
0,
0);
}
///////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
// Start the timer
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
int MainTimer()
{
MakeTime();
//while( g_Stop == 0 )
//{
// cout << ".";
//}
//wprintf("MakeTime\n");
return 0;
}
///////////////////////////
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Unicode.h"
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_UNICODE_H
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "VisModule.h"
+11 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "VisPlugin.h"
@@ -148,6 +148,7 @@ bool VisPlugin::Unload()
_stprintf( szBuffer, TEXT( "Unloading <%s>" ), GetFilename() );
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
printf( ">>>Unloading <%s>\n" , GetFilename() );
header = NULL;
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_VIS_PLUGIN_H
+21 -10
View File
@@ -1,13 +1,17 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
// =======================================================================================
// WndprocWinamp is called repeatedly when the cursor is moved over the main window
// =======================================================================================
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#include "Winamp.h"
@@ -39,6 +43,8 @@ int IPC_GETPLAINBARTARGET = 0;
////////////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK WndprocWinamp( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
{
//Console::Append( TEXT( "Winamp.cc:WndprocWinamp was called" ) );
switch( message )
{
case WM_COMMAND:
@@ -648,6 +654,9 @@ LRESULT CALLBACK WndprocWinamp( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
case IPC_WRITE_EXTENDED_FILE_INFO: break;
case IPC_FORMAT_TITLE: break;
*/
// =======================================================================================
// Let's remove this
/*
case IPC_GETUNCOMPRESSINTERFACE:
if( wp == 0x10100000 )
{
@@ -662,6 +671,8 @@ LRESULT CALLBACK WndprocWinamp( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
return ( LRESULT )uncompress;
}
break;
*/
// =======================================================================================
case IPC_ADD_PREFS_DLG:
Prefs::AddPage( ( prefsDlgRec * )wp );
+10 -10
View File
@@ -1,13 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Plainamp, Open source Winamp core
//
// Copyright © 2005 Sebastian Pipping <[email protected]>
//
// --> http://www.hartwork.org
//
// This source code is released under the GNU General Public License (GPL).
// See GPL.txt for details. Any non-GPL usage is strictly forbidden.
////////////////////////////////////////////////////////////////////////////////
#ifndef PA_WINAMP_H
+823
View File
@@ -0,0 +1,823 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#ifndef __AFXRES_H__
#define __AFXRES_H__
#ifdef RC_INVOKED
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#include "winres.h" // extract from windows header
#endif
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifdef RC_INVOKED
#if defined(_VC80_UPGRADE) && (_VC80_UPGRADE >= 0x0700) && (_VC80_UPGRADE < 0x0800) && defined(IDR_MANIFEST)
// Handle project upgrade from VC7/VC7.1 for projects with manifest
#define IDR_MANIFEST 1024
#endif
#endif // RC_INVOKED
#ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS
#endif
/////////////////////////////////////////////////////////////////////////////
// MFC resource types (see Technical note TN024 for implementation details)
#ifndef RC_INVOKED
#define RT_DLGINIT MAKEINTRESOURCE(240)
#define RT_TOOLBAR MAKEINTRESOURCE(241)
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS
#endif
/////////////////////////////////////////////////////////////////////////////
// General style bits etc
// ControlBar styles
#define CBRS_ALIGN_LEFT 0x1000L
#define CBRS_ALIGN_TOP 0x2000L
#define CBRS_ALIGN_RIGHT 0x4000L
#define CBRS_ALIGN_BOTTOM 0x8000L
#define CBRS_ALIGN_ANY 0xF000L
#define CBRS_BORDER_LEFT 0x0100L
#define CBRS_BORDER_TOP 0x0200L
#define CBRS_BORDER_RIGHT 0x0400L
#define CBRS_BORDER_BOTTOM 0x0800L
#define CBRS_BORDER_ANY 0x0F00L
#define CBRS_TOOLTIPS 0x0010L
#define CBRS_FLYBY 0x0020L
#define CBRS_FLOAT_MULTI 0x0040L
#define CBRS_BORDER_3D 0x0080L
#define CBRS_HIDE_INPLACE 0x0008L
#define CBRS_SIZE_DYNAMIC 0x0004L
#define CBRS_SIZE_FIXED 0x0002L
#define CBRS_FLOATING 0x0001L
#define CBRS_GRIPPER 0x00400000L
#define CBRS_ORIENT_HORZ (CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM)
#define CBRS_ORIENT_VERT (CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT)
#define CBRS_ORIENT_ANY (CBRS_ORIENT_HORZ|CBRS_ORIENT_VERT)
#define CBRS_ALL 0x0040FFFFL
// the CBRS_ style is made up of an alignment style and a draw border style
// the alignment styles are mutually exclusive
// the draw border styles may be combined
#define CBRS_NOALIGN 0x00000000L
#define CBRS_LEFT (CBRS_ALIGN_LEFT|CBRS_BORDER_RIGHT)
#define CBRS_TOP (CBRS_ALIGN_TOP|CBRS_BORDER_BOTTOM)
#define CBRS_RIGHT (CBRS_ALIGN_RIGHT|CBRS_BORDER_LEFT)
#define CBRS_BOTTOM (CBRS_ALIGN_BOTTOM|CBRS_BORDER_TOP)
/////////////////////////////////////////////////////////////////////////////
// Manifest Resource ID of manifest containing Localized DLL information
#define ID_MFCLOC_MANIFEST 1000
/////////////////////////////////////////////////////////////////////////////
// Standard window components
// Mode indicators in status bar - these are routed like commands
#define ID_INDICATOR_EXT 0xE700 // extended selection indicator
#define ID_INDICATOR_CAPS 0xE701 // cap lock indicator
#define ID_INDICATOR_NUM 0xE702 // num lock indicator
#define ID_INDICATOR_SCRL 0xE703 // scroll lock indicator
#define ID_INDICATOR_OVR 0xE704 // overtype mode indicator
#define ID_INDICATOR_REC 0xE705 // record mode indicator
#define ID_INDICATOR_KANA 0xE706 // kana lock indicator
#define ID_SEPARATOR 0 // special separator value
#ifndef RC_INVOKED // code only
// Standard control bars (IDW = window ID)
#define AFX_IDW_CONTROLBAR_FIRST 0xE800
#define AFX_IDW_CONTROLBAR_LAST 0xE8FF
#define AFX_IDW_TOOLBAR 0xE800 // main Toolbar for window
#define AFX_IDW_STATUS_BAR 0xE801 // Status bar window
#define AFX_IDW_PREVIEW_BAR 0xE802 // PrintPreview Dialog Bar
#define AFX_IDW_RESIZE_BAR 0xE803 // OLE in-place resize bar
#define AFX_IDW_REBAR 0xE804 // COMCTL32 "rebar" Bar
#define AFX_IDW_DIALOGBAR 0xE805 // CDialogBar
// Note: If your application supports docking toolbars, you should
// not use the following IDs for your own toolbars. The IDs chosen
// are at the top of the first 32 such that the bars will be hidden
// while in print preview mode, and are not likely to conflict with
// IDs your application may have used succesfully in the past.
#define AFX_IDW_DOCKBAR_TOP 0xE81B
#define AFX_IDW_DOCKBAR_LEFT 0xE81C
#define AFX_IDW_DOCKBAR_RIGHT 0xE81D
#define AFX_IDW_DOCKBAR_BOTTOM 0xE81E
#define AFX_IDW_DOCKBAR_FLOAT 0xE81F
// Macro for mapping standard control bars to bitmask (limit of 32)
#define AFX_CONTROLBAR_MASK(nIDC) (1L << (nIDC - AFX_IDW_CONTROLBAR_FIRST))
// parts of Main Frame
#define AFX_IDW_PANE_FIRST 0xE900 // first pane (256 max)
#define AFX_IDW_PANE_LAST 0xE9ff
#define AFX_IDW_HSCROLL_FIRST 0xEA00 // first Horz scrollbar (16 max)
#define AFX_IDW_VSCROLL_FIRST 0xEA10 // first Vert scrollbar (16 max)
#define AFX_IDW_SIZE_BOX 0xEA20 // size box for splitters
#define AFX_IDW_PANE_SAVE 0xEA21 // to shift AFX_IDW_PANE_FIRST
#endif //!RC_INVOKED
#ifndef APSTUDIO_INVOKED
// common style for form views
#define AFX_WS_DEFAULT_VIEW (WS_CHILD | WS_VISIBLE | WS_BORDER)
#endif //!APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Standard app configurable strings
// for application title (defaults to EXE name or name in constructor)
#define AFX_IDS_APP_TITLE 0xE000
// idle message bar line
#define AFX_IDS_IDLEMESSAGE 0xE001
// message bar line when in shift-F1 help mode
#define AFX_IDS_HELPMODEMESSAGE 0xE002
// document title when editing OLE embedding
#define AFX_IDS_APP_TITLE_EMBEDDING 0xE003
// company name
#define AFX_IDS_COMPANY_NAME 0xE004
// object name when server is inplace
#define AFX_IDS_OBJ_TITLE_INPLACE 0xE005
/////////////////////////////////////////////////////////////////////////////
// Standard Commands
// File commands
#define ID_FILE_NEW 0xE100
#define ID_FILE_OPEN 0xE101
#define ID_FILE_CLOSE 0xE102
#define ID_FILE_SAVE 0xE103
#define ID_FILE_SAVE_AS 0xE104
#define ID_FILE_PAGE_SETUP 0xE105
#define ID_FILE_PRINT_SETUP 0xE106
#define ID_FILE_PRINT 0xE107
#define ID_FILE_PRINT_DIRECT 0xE108
#define ID_FILE_PRINT_PREVIEW 0xE109
#define ID_FILE_UPDATE 0xE10A
#define ID_FILE_SAVE_COPY_AS 0xE10B
#define ID_FILE_SEND_MAIL 0xE10C
#define ID_FILE_NEW_FRAME 0xE10D
#define ID_FILE_MRU_FIRST 0xE110
#define ID_FILE_MRU_FILE1 0xE110 // range - 16 max
#define ID_FILE_MRU_FILE2 0xE111
#define ID_FILE_MRU_FILE3 0xE112
#define ID_FILE_MRU_FILE4 0xE113
#define ID_FILE_MRU_FILE5 0xE114
#define ID_FILE_MRU_FILE6 0xE115
#define ID_FILE_MRU_FILE7 0xE116
#define ID_FILE_MRU_FILE8 0xE117
#define ID_FILE_MRU_FILE9 0xE118
#define ID_FILE_MRU_FILE10 0xE119
#define ID_FILE_MRU_FILE11 0xE11A
#define ID_FILE_MRU_FILE12 0xE11B
#define ID_FILE_MRU_FILE13 0xE11C
#define ID_FILE_MRU_FILE14 0xE11D
#define ID_FILE_MRU_FILE15 0xE11E
#define ID_FILE_MRU_FILE16 0xE11F
#define ID_FILE_MRU_LAST 0xE11F
// Edit commands
#define ID_EDIT_CLEAR 0xE120
#define ID_EDIT_CLEAR_ALL 0xE121
#define ID_EDIT_COPY 0xE122
#define ID_EDIT_CUT 0xE123
#define ID_EDIT_FIND 0xE124
#define ID_EDIT_PASTE 0xE125
#define ID_EDIT_PASTE_LINK 0xE126
#define ID_EDIT_PASTE_SPECIAL 0xE127
#define ID_EDIT_REPEAT 0xE128
#define ID_EDIT_REPLACE 0xE129
#define ID_EDIT_SELECT_ALL 0xE12A
#define ID_EDIT_UNDO 0xE12B
#define ID_EDIT_REDO 0xE12C
// Window commands
#define ID_WINDOW_NEW 0xE130
#define ID_WINDOW_ARRANGE 0xE131
#define ID_WINDOW_CASCADE 0xE132
#define ID_WINDOW_TILE_HORZ 0xE133
#define ID_WINDOW_TILE_VERT 0xE134
#define ID_WINDOW_SPLIT 0xE135
#ifndef RC_INVOKED // code only
#define AFX_IDM_WINDOW_FIRST 0xE130
#define AFX_IDM_WINDOW_LAST 0xE13F
#define AFX_IDM_FIRST_MDICHILD 0xFF00 // window list starts here
#endif //!RC_INVOKED
// Help and App commands
#define ID_APP_ABOUT 0xE140
#define ID_APP_EXIT 0xE141
#define ID_HELP_INDEX 0xE142
#define ID_HELP_FINDER 0xE143
#define ID_HELP_USING 0xE144
#define ID_CONTEXT_HELP 0xE145 // shift-F1
// special commands for processing help
#define ID_HELP 0xE146 // first attempt for F1
#define ID_DEFAULT_HELP 0xE147 // last attempt
// Misc
#define ID_NEXT_PANE 0xE150
#define ID_PREV_PANE 0xE151
// Format
#define ID_FORMAT_FONT 0xE160
// OLE commands
#define ID_OLE_INSERT_NEW 0xE200
#define ID_OLE_EDIT_LINKS 0xE201
#define ID_OLE_EDIT_CONVERT 0xE202
#define ID_OLE_EDIT_CHANGE_ICON 0xE203
#define ID_OLE_EDIT_PROPERTIES 0xE204
#define ID_OLE_VERB_FIRST 0xE210 // range - 16 max
#ifndef RC_INVOKED // code only
#define ID_OLE_VERB_LAST 0xE21F
#endif //!RC_INVOKED
// for print preview dialog bar
#define AFX_ID_PREVIEW_CLOSE 0xE300
#define AFX_ID_PREVIEW_NUMPAGE 0xE301 // One/Two Page button
#define AFX_ID_PREVIEW_NEXT 0xE302
#define AFX_ID_PREVIEW_PREV 0xE303
#define AFX_ID_PREVIEW_PRINT 0xE304
#define AFX_ID_PREVIEW_ZOOMIN 0xE305
#define AFX_ID_PREVIEW_ZOOMOUT 0xE306
// View commands (same number used as IDW used for control bar)
#define ID_VIEW_TOOLBAR 0xE800
#define ID_VIEW_STATUS_BAR 0xE801
#define ID_VIEW_REBAR 0xE804
#define ID_VIEW_AUTOARRANGE 0xE805
// E810 -> E81F must be kept in order for RANGE macros
#define ID_VIEW_SMALLICON 0xE810
#define ID_VIEW_LARGEICON 0xE811
#define ID_VIEW_LIST 0xE812
#define ID_VIEW_DETAILS 0xE813
#define ID_VIEW_LINEUP 0xE814
#define ID_VIEW_BYNAME 0xE815
#define AFX_ID_VIEW_MINIMUM ID_VIEW_SMALLICON
#define AFX_ID_VIEW_MAXIMUM ID_VIEW_BYNAME
// E800 -> E8FF reserved for other control bar commands
// RecordForm commands
#define ID_RECORD_FIRST 0xE900
#define ID_RECORD_LAST 0xE901
#define ID_RECORD_NEXT 0xE902
#define ID_RECORD_PREV 0xE903
/////////////////////////////////////////////////////////////////////////////
// Standard control IDs
#ifdef IDC_STATIC
#undef IDC_STATIC
#endif
#define IDC_STATIC (-1) // all static controls
/////////////////////////////////////////////////////////////////////////////
// Standard string error/warnings
#ifndef RC_INVOKED // code only
#define AFX_IDS_SCFIRST 0xEF00
#endif //!RC_INVOKED
#define AFX_IDS_SCSIZE 0xEF00
#define AFX_IDS_SCMOVE 0xEF01
#define AFX_IDS_SCMINIMIZE 0xEF02
#define AFX_IDS_SCMAXIMIZE 0xEF03
#define AFX_IDS_SCNEXTWINDOW 0xEF04
#define AFX_IDS_SCPREVWINDOW 0xEF05
#define AFX_IDS_SCCLOSE 0xEF06
#define AFX_IDS_SCRESTORE 0xEF12
#define AFX_IDS_SCTASKLIST 0xEF13
#define AFX_IDS_MDICHILD 0xEF1F
#define AFX_IDS_DESKACCESSORY 0xEFDA
// General strings
#define AFX_IDS_OPENFILE 0xF000
#define AFX_IDS_SAVEFILE 0xF001
#define AFX_IDS_ALLFILTER 0xF002
#define AFX_IDS_UNTITLED 0xF003
#define AFX_IDS_SAVEFILECOPY 0xF004
#define AFX_IDS_PREVIEW_CLOSE 0xF005
#define AFX_IDS_UNNAMED_FILE 0xF006
#define AFX_IDS_HIDE 0xF011
// MFC Standard Exception Error messages
#define AFX_IDP_NO_ERROR_AVAILABLE 0xF020
#define AFX_IDS_NOT_SUPPORTED_EXCEPTION 0xF021
#define AFX_IDS_RESOURCE_EXCEPTION 0xF022
#define AFX_IDS_MEMORY_EXCEPTION 0xF023
#define AFX_IDS_USER_EXCEPTION 0xF024
#define AFX_IDS_INVALID_ARG_EXCEPTION 0xF025
// Printing and print preview strings
#define AFX_IDS_PRINTONPORT 0xF040
#define AFX_IDS_ONEPAGE 0xF041
#define AFX_IDS_TWOPAGE 0xF042
#define AFX_IDS_PRINTPAGENUM 0xF043
#define AFX_IDS_PREVIEWPAGEDESC 0xF044
#define AFX_IDS_PRINTDEFAULTEXT 0xF045
#define AFX_IDS_PRINTDEFAULT 0xF046
#define AFX_IDS_PRINTFILTER 0xF047
#define AFX_IDS_PRINTCAPTION 0xF048
#define AFX_IDS_PRINTTOFILE 0xF049
// OLE strings
#define AFX_IDS_OBJECT_MENUITEM 0xF080
#define AFX_IDS_EDIT_VERB 0xF081
#define AFX_IDS_ACTIVATE_VERB 0xF082
#define AFX_IDS_CHANGE_LINK 0xF083
#define AFX_IDS_AUTO 0xF084
#define AFX_IDS_MANUAL 0xF085
#define AFX_IDS_FROZEN 0xF086
#define AFX_IDS_ALL_FILES 0xF087
// dynamically changing menu items
#define AFX_IDS_SAVE_MENU 0xF088
#define AFX_IDS_UPDATE_MENU 0xF089
#define AFX_IDS_SAVE_AS_MENU 0xF08A
#define AFX_IDS_SAVE_COPY_AS_MENU 0xF08B
#define AFX_IDS_EXIT_MENU 0xF08C
#define AFX_IDS_UPDATING_ITEMS 0xF08D
// COlePasteSpecialDialog defines
#define AFX_IDS_METAFILE_FORMAT 0xF08E
#define AFX_IDS_DIB_FORMAT 0xF08F
#define AFX_IDS_BITMAP_FORMAT 0xF090
#define AFX_IDS_LINKSOURCE_FORMAT 0xF091
#define AFX_IDS_EMBED_FORMAT 0xF092
// other OLE utility strings
#define AFX_IDS_PASTELINKEDTYPE 0xF094
#define AFX_IDS_UNKNOWNTYPE 0xF095
#define AFX_IDS_RTF_FORMAT 0xF096
#define AFX_IDS_TEXT_FORMAT 0xF097
// OLE datatype format error strings
#define AFX_IDS_INVALID_CURRENCY 0xF098
#define AFX_IDS_INVALID_DATETIME 0xF099
#define AFX_IDS_INVALID_DATETIMESPAN 0xF09A
// General error / prompt strings
#define AFX_IDP_INVALID_FILENAME 0xF100
#define AFX_IDP_FAILED_TO_OPEN_DOC 0xF101
#define AFX_IDP_FAILED_TO_SAVE_DOC 0xF102
#define AFX_IDP_ASK_TO_SAVE 0xF103
#define AFX_IDP_FAILED_TO_CREATE_DOC 0xF104
#define AFX_IDP_FILE_TOO_LARGE 0xF105
#define AFX_IDP_FAILED_TO_START_PRINT 0xF106
#define AFX_IDP_FAILED_TO_LAUNCH_HELP 0xF107
#define AFX_IDP_INTERNAL_FAILURE 0xF108 // general failure
#define AFX_IDP_COMMAND_FAILURE 0xF109 // command failure
#define AFX_IDP_FAILED_MEMORY_ALLOC 0xF10A
#define AFX_IDP_UNREG_DONE 0xF10B
#define AFX_IDP_UNREG_FAILURE 0xF10C
#define AFX_IDP_DLL_LOAD_FAILED 0xF10D
#define AFX_IDP_DLL_BAD_VERSION 0xF10E
// DDV parse errors
#define AFX_IDP_PARSE_INT 0xF110
#define AFX_IDP_PARSE_REAL 0xF111
#define AFX_IDP_PARSE_INT_RANGE 0xF112
#define AFX_IDP_PARSE_REAL_RANGE 0xF113
#define AFX_IDP_PARSE_STRING_SIZE 0xF114
#define AFX_IDP_PARSE_RADIO_BUTTON 0xF115
#define AFX_IDP_PARSE_BYTE 0xF116
#define AFX_IDP_PARSE_UINT 0xF117
#define AFX_IDP_PARSE_DATETIME 0xF118
#define AFX_IDP_PARSE_CURRENCY 0xF119
#define AFX_IDP_PARSE_GUID 0xF11A
#define AFX_IDP_PARSE_TIME 0xF11B
#define AFX_IDP_PARSE_DATE 0xF11C
// CFile/CArchive error strings for user failure
#define AFX_IDP_FAILED_INVALID_FORMAT 0xF120
#define AFX_IDP_FAILED_INVALID_PATH 0xF121
#define AFX_IDP_FAILED_DISK_FULL 0xF122
#define AFX_IDP_FAILED_ACCESS_READ 0xF123
#define AFX_IDP_FAILED_ACCESS_WRITE 0xF124
#define AFX_IDP_FAILED_IO_ERROR_READ 0xF125
#define AFX_IDP_FAILED_IO_ERROR_WRITE 0xF126
// Script errors / prompt strings
#define AFX_IDP_SCRIPT_ERROR 0xF130
#define AFX_IDP_SCRIPT_DISPATCH_EXCEPTION 0xF131
// OLE errors / prompt strings
#define AFX_IDP_STATIC_OBJECT 0xF180
#define AFX_IDP_FAILED_TO_CONNECT 0xF181
#define AFX_IDP_SERVER_BUSY 0xF182
#define AFX_IDP_BAD_VERB 0xF183
#define AFX_IDS_NOT_DOCOBJECT 0xF184
#define AFX_IDP_FAILED_TO_NOTIFY 0xF185
#define AFX_IDP_FAILED_TO_LAUNCH 0xF186
#define AFX_IDP_ASK_TO_UPDATE 0xF187
#define AFX_IDP_FAILED_TO_UPDATE 0xF188
#define AFX_IDP_FAILED_TO_REGISTER 0xF189
#define AFX_IDP_FAILED_TO_AUTO_REGISTER 0xF18A
#define AFX_IDP_FAILED_TO_CONVERT 0xF18B
#define AFX_IDP_GET_NOT_SUPPORTED 0xF18C
#define AFX_IDP_SET_NOT_SUPPORTED 0xF18D
#define AFX_IDP_ASK_TO_DISCARD 0xF18E
#define AFX_IDP_FAILED_TO_CREATE 0xF18F
// MAPI errors / prompt strings
#define AFX_IDP_FAILED_MAPI_LOAD 0xF190
#define AFX_IDP_INVALID_MAPI_DLL 0xF191
#define AFX_IDP_FAILED_MAPI_SEND 0xF192
#define AFX_IDP_FILE_NONE 0xF1A0
#define AFX_IDP_FILE_GENERIC 0xF1A1
#define AFX_IDP_FILE_NOT_FOUND 0xF1A2
#define AFX_IDP_FILE_BAD_PATH 0xF1A3
#define AFX_IDP_FILE_TOO_MANY_OPEN 0xF1A4
#define AFX_IDP_FILE_ACCESS_DENIED 0xF1A5
#define AFX_IDP_FILE_INVALID_FILE 0xF1A6
#define AFX_IDP_FILE_REMOVE_CURRENT 0xF1A7
#define AFX_IDP_FILE_DIR_FULL 0xF1A8
#define AFX_IDP_FILE_BAD_SEEK 0xF1A9
#define AFX_IDP_FILE_HARD_IO 0xF1AA
#define AFX_IDP_FILE_SHARING 0xF1AB
#define AFX_IDP_FILE_LOCKING 0xF1AC
#define AFX_IDP_FILE_DISKFULL 0xF1AD
#define AFX_IDP_FILE_EOF 0xF1AE
#define AFX_IDP_ARCH_NONE 0xF1B0
#define AFX_IDP_ARCH_GENERIC 0xF1B1
#define AFX_IDP_ARCH_READONLY 0xF1B2
#define AFX_IDP_ARCH_ENDOFFILE 0xF1B3
#define AFX_IDP_ARCH_WRITEONLY 0xF1B4
#define AFX_IDP_ARCH_BADINDEX 0xF1B5
#define AFX_IDP_ARCH_BADCLASS 0xF1B6
#define AFX_IDP_ARCH_BADSCHEMA 0xF1B7
#define AFX_IDS_OCC_SCALEUNITS_PIXELS 0xF1C0
// 0xf200-0xf20f reserved
// font names and point sizes
#define AFX_IDS_STATUS_FONT 0xF230
#define AFX_IDS_TOOLTIP_FONT 0xF231
#define AFX_IDS_UNICODE_FONT 0xF232
#define AFX_IDS_MINI_FONT 0xF233
// ODBC Database errors / prompt strings
#ifndef RC_INVOKED // code only
#define AFX_IDP_SQL_FIRST 0xF280
#endif //!RC_INVOKED
#define AFX_IDP_SQL_CONNECT_FAIL 0xF281
#define AFX_IDP_SQL_RECORDSET_FORWARD_ONLY 0xF282
#define AFX_IDP_SQL_EMPTY_COLUMN_LIST 0xF283
#define AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH 0xF284
#define AFX_IDP_SQL_ILLEGAL_MODE 0xF285
#define AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED 0xF286
#define AFX_IDP_SQL_NO_CURRENT_RECORD 0xF287
#define AFX_IDP_SQL_NO_ROWS_AFFECTED 0xF288
#define AFX_IDP_SQL_RECORDSET_READONLY 0xF289
#define AFX_IDP_SQL_SQL_NO_TOTAL 0xF28A
#define AFX_IDP_SQL_ODBC_LOAD_FAILED 0xF28B
#define AFX_IDP_SQL_DYNASET_NOT_SUPPORTED 0xF28C
#define AFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED 0xF28D
#define AFX_IDP_SQL_API_CONFORMANCE 0xF28E
#define AFX_IDP_SQL_SQL_CONFORMANCE 0xF28F
#define AFX_IDP_SQL_NO_DATA_FOUND 0xF290
#define AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED 0xF291
#define AFX_IDP_SQL_ODBC_V2_REQUIRED 0xF292
#define AFX_IDP_SQL_NO_POSITIONED_UPDATES 0xF293
#define AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED 0xF294
#define AFX_IDP_SQL_DATA_TRUNCATED 0xF295
#define AFX_IDP_SQL_ROW_FETCH 0xF296
#define AFX_IDP_SQL_INCORRECT_ODBC 0xF297
#define AFX_IDP_SQL_UPDATE_DELETE_FAILED 0xF298
#define AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED 0xF299
#define AFX_IDP_SQL_FIELD_NOT_FOUND 0xF29A
#define AFX_IDP_SQL_BOOKMARKS_NOT_SUPPORTED 0xF29B
#define AFX_IDP_SQL_BOOKMARKS_NOT_ENABLED 0xF29C
// ODBC Database strings
#define AFX_IDS_DELETED 0xF29D
// DAO Database errors / prompt strings
#ifndef RC_INVOKED // code only
#define AFX_IDP_DAO_FIRST 0xF2B0
#endif //!RC_INVOKED
#define AFX_IDP_DAO_ENGINE_INITIALIZATION 0xF2B0
#define AFX_IDP_DAO_DFX_BIND 0xF2B1
#define AFX_IDP_DAO_OBJECT_NOT_OPEN 0xF2B2
// ICDAORecordset::GetRows Errors
// These are not placed in DAO Errors collection
// and must be handled directly by MFC.
#define AFX_IDP_DAO_ROWTOOSHORT 0xF2B3
#define AFX_IDP_DAO_BADBINDINFO 0xF2B4
#define AFX_IDP_DAO_COLUMNUNAVAILABLE 0xF2B5
/////////////////////////////////////////////////////////////////////////////
// Strings for ISAPI support
#define AFX_IDS_HTTP_TITLE 0xF2D1
#define AFX_IDS_HTTP_NO_TEXT 0xF2D2
#define AFX_IDS_HTTP_BAD_REQUEST 0xF2D3
#define AFX_IDS_HTTP_AUTH_REQUIRED 0xF2D4
#define AFX_IDS_HTTP_FORBIDDEN 0xF2D5
#define AFX_IDS_HTTP_NOT_FOUND 0xF2D6
#define AFX_IDS_HTTP_SERVER_ERROR 0xF2D7
#define AFX_IDS_HTTP_NOT_IMPLEMENTED 0xF2D8
/////////////////////////////////////////////////////////////////////////////
// Strings for Accessibility support for CCheckListBox
#define AFX_IDS_CHECKLISTBOX_UNCHECK 0xF2E1
#define AFX_IDS_CHECKLISTBOX_CHECK 0xF2E2
#define AFX_IDS_CHECKLISTBOX_MIXED 0xF2E3
/////////////////////////////////////////////////////////////////////////////
// AFX implementation - control IDs (AFX_IDC)
// Parts of dialogs
#define AFX_IDC_LISTBOX 100
#define AFX_IDC_CHANGE 101
#define AFX_IDC_BROWSER 102
// for print dialog
#define AFX_IDC_PRINT_DOCNAME 201
#define AFX_IDC_PRINT_PRINTERNAME 202
#define AFX_IDC_PRINT_PORTNAME 203
#define AFX_IDC_PRINT_PAGENUM 204
// Property Sheet control id's (determined with Spy++)
#define ID_APPLY_NOW 0x3021
#define ID_WIZBACK 0x3023
#define ID_WIZNEXT 0x3024
#define ID_WIZFINISH 0x3025
#define AFX_IDC_TAB_CONTROL 0x3020
/////////////////////////////////////////////////////////////////////////////
// IDRs for standard components
#ifndef RC_INVOKED // code only
// These are really COMMDLG dialogs, so there usually isn't a resource
// for them, but these IDs are used as help IDs.
#define AFX_IDD_FILEOPEN 28676
#define AFX_IDD_FILESAVE 28677
#define AFX_IDD_FONT 28678
#define AFX_IDD_COLOR 28679
#define AFX_IDD_PRINT 28680
#define AFX_IDD_PRINTSETUP 28681
#define AFX_IDD_FIND 28682
#define AFX_IDD_REPLACE 28683
#endif //!RC_INVOKED
// Standard dialogs app should leave alone (0x7801->)
#define AFX_IDD_NEWTYPEDLG 30721
#define AFX_IDD_PRINTDLG 30722
#define AFX_IDD_PREVIEW_TOOLBAR 30723
// Dialogs defined for OLE2UI library
#define AFX_IDD_INSERTOBJECT 30724
#define AFX_IDD_CHANGEICON 30725
#define AFX_IDD_CONVERT 30726
#define AFX_IDD_PASTESPECIAL 30727
#define AFX_IDD_EDITLINKS 30728
#define AFX_IDD_FILEBROWSE 30729
#define AFX_IDD_BUSY 30730
#define AFX_IDD_OBJECTPROPERTIES 30732
#define AFX_IDD_CHANGESOURCE 30733
//WinForms
#define AFX_IDD_EMPTYDIALOG 30734
// Standard cursors (0x7901->)
// AFX_IDC = Cursor resources
#define AFX_IDC_CONTEXTHELP 30977 // context sensitive help
#define AFX_IDC_MAGNIFY 30978 // print preview zoom
#define AFX_IDC_SMALLARROWS 30979 // splitter
#define AFX_IDC_HSPLITBAR 30980 // splitter
#define AFX_IDC_VSPLITBAR 30981 // splitter
#define AFX_IDC_NODROPCRSR 30982 // No Drop Cursor
#define AFX_IDC_TRACKNWSE 30983 // tracker
#define AFX_IDC_TRACKNESW 30984 // tracker
#define AFX_IDC_TRACKNS 30985 // tracker
#define AFX_IDC_TRACKWE 30986 // tracker
#define AFX_IDC_TRACK4WAY 30987 // tracker
#define AFX_IDC_MOVE4WAY 30988 // resize bar (server only)
// Wheel mouse cursors
// NOTE: values must be in this order! See CScrollView::OnTimer()
#define AFX_IDC_MOUSE_PAN_NW 30998 // pan east
#define AFX_IDC_MOUSE_PAN_N 30999 // pan northeast
#define AFX_IDC_MOUSE_PAN_NE 31000 // pan north
#define AFX_IDC_MOUSE_PAN_W 31001 // pan northwest
#define AFX_IDC_MOUSE_PAN_HV 31002 // pan both axis
#define AFX_IDC_MOUSE_PAN_E 31003 // pan west
#define AFX_IDC_MOUSE_PAN_SW 31004 // pan south-west
#define AFX_IDC_MOUSE_PAN_S 31005 // pan south
#define AFX_IDC_MOUSE_PAN_SE 31006 // pan south-east
#define AFX_IDC_MOUSE_PAN_HORZ 31007 // pan X-axis
#define AFX_IDC_MOUSE_PAN_VERT 31008 // pan Y-axis
// Wheel mouse bitmaps
#define AFX_IDC_MOUSE_ORG_HORZ 31009 // anchor for horz only
#define AFX_IDC_MOUSE_ORG_VERT 31010 // anchor for vert only
#define AFX_IDC_MOUSE_ORG_HV 31011 // anchor for horz/vert
#define AFX_IDC_MOUSE_MASK 31012
// Mini frame window bitmap ID
#define AFX_IDB_MINIFRAME_MENU 30994
// CheckListBox checks bitmap ID
#define AFX_IDB_CHECKLISTBOX_95 30996
// AFX standard accelerator resources
#define AFX_IDR_PREVIEW_ACCEL 30997
// AFX standard ICON IDs (for MFC V1 apps) (0x7A01->)
#define AFX_IDI_STD_MDIFRAME 31233
#define AFX_IDI_STD_FRAME 31234
/////////////////////////////////////////////////////////////////////////////
// AFX OLE control implementation - control IDs (AFX_IDC)
// Font property page
#define AFX_IDC_FONTPROP 1000
#define AFX_IDC_FONTNAMES 1001
#define AFX_IDC_FONTSTYLES 1002
#define AFX_IDC_FONTSIZES 1003
#define AFX_IDC_STRIKEOUT 1004
#define AFX_IDC_UNDERLINE 1005
#define AFX_IDC_SAMPLEBOX 1006
// Color property page
#define AFX_IDC_COLOR_BLACK 1100
#define AFX_IDC_COLOR_WHITE 1101
#define AFX_IDC_COLOR_RED 1102
#define AFX_IDC_COLOR_GREEN 1103
#define AFX_IDC_COLOR_BLUE 1104
#define AFX_IDC_COLOR_YELLOW 1105
#define AFX_IDC_COLOR_MAGENTA 1106
#define AFX_IDC_COLOR_CYAN 1107
#define AFX_IDC_COLOR_GRAY 1108
#define AFX_IDC_COLOR_LIGHTGRAY 1109
#define AFX_IDC_COLOR_DARKRED 1110
#define AFX_IDC_COLOR_DARKGREEN 1111
#define AFX_IDC_COLOR_DARKBLUE 1112
#define AFX_IDC_COLOR_LIGHTBROWN 1113
#define AFX_IDC_COLOR_DARKMAGENTA 1114
#define AFX_IDC_COLOR_DARKCYAN 1115
#define AFX_IDC_COLORPROP 1116
#define AFX_IDC_SYSTEMCOLORS 1117
// Picture porperty page
#define AFX_IDC_PROPNAME 1201
#define AFX_IDC_PICTURE 1202
#define AFX_IDC_BROWSE 1203
#define AFX_IDC_CLEAR 1204
/////////////////////////////////////////////////////////////////////////////
// IDRs for OLE control standard components
// Standard propery page dialogs app should leave alone (0x7E01->)
#define AFX_IDD_PROPPAGE_COLOR 32257
#define AFX_IDD_PROPPAGE_FONT 32258
#define AFX_IDD_PROPPAGE_PICTURE 32259
#define AFX_IDB_TRUETYPE 32384
/////////////////////////////////////////////////////////////////////////////
// Standard OLE control strings
// OLE Control page strings
#define AFX_IDS_PROPPAGE_UNKNOWN 0xFE01
#define AFX_IDS_COLOR_DESKTOP 0xFE04
#define AFX_IDS_COLOR_APPWORKSPACE 0xFE05
#define AFX_IDS_COLOR_WNDBACKGND 0xFE06
#define AFX_IDS_COLOR_WNDTEXT 0xFE07
#define AFX_IDS_COLOR_MENUBAR 0xFE08
#define AFX_IDS_COLOR_MENUTEXT 0xFE09
#define AFX_IDS_COLOR_ACTIVEBAR 0xFE0A
#define AFX_IDS_COLOR_INACTIVEBAR 0xFE0B
#define AFX_IDS_COLOR_ACTIVETEXT 0xFE0C
#define AFX_IDS_COLOR_INACTIVETEXT 0xFE0D
#define AFX_IDS_COLOR_ACTIVEBORDER 0xFE0E
#define AFX_IDS_COLOR_INACTIVEBORDER 0xFE0F
#define AFX_IDS_COLOR_WNDFRAME 0xFE10
#define AFX_IDS_COLOR_SCROLLBARS 0xFE11
#define AFX_IDS_COLOR_BTNFACE 0xFE12
#define AFX_IDS_COLOR_BTNSHADOW 0xFE13
#define AFX_IDS_COLOR_BTNTEXT 0xFE14
#define AFX_IDS_COLOR_BTNHIGHLIGHT 0xFE15
#define AFX_IDS_COLOR_DISABLEDTEXT 0xFE16
#define AFX_IDS_COLOR_HIGHLIGHT 0xFE17
#define AFX_IDS_COLOR_HIGHLIGHTTEXT 0xFE18
#define AFX_IDS_REGULAR 0xFE19
#define AFX_IDS_BOLD 0xFE1A
#define AFX_IDS_ITALIC 0xFE1B
#define AFX_IDS_BOLDITALIC 0xFE1C
#define AFX_IDS_SAMPLETEXT 0xFE1D
#define AFX_IDS_DISPLAYSTRING_FONT 0xFE1E
#define AFX_IDS_DISPLAYSTRING_COLOR 0xFE1F
#define AFX_IDS_DISPLAYSTRING_PICTURE 0xFE20
#define AFX_IDS_PICTUREFILTER 0xFE21
#define AFX_IDS_PICTYPE_UNKNOWN 0xFE22
#define AFX_IDS_PICTYPE_NONE 0xFE23
#define AFX_IDS_PICTYPE_BITMAP 0xFE24
#define AFX_IDS_PICTYPE_METAFILE 0xFE25
#define AFX_IDS_PICTYPE_ICON 0xFE26
#define AFX_IDS_COLOR_PPG 0xFE28
#define AFX_IDS_COLOR_PPG_CAPTION 0xFE29
#define AFX_IDS_FONT_PPG 0xFE2A
#define AFX_IDS_FONT_PPG_CAPTION 0xFE2B
#define AFX_IDS_PICTURE_PPG 0xFE2C
#define AFX_IDS_PICTURE_PPG_CAPTION 0xFE2D
#define AFX_IDS_PICTUREBROWSETITLE 0xFE30
#define AFX_IDS_BORDERSTYLE_0 0xFE31
#define AFX_IDS_BORDERSTYLE_1 0xFE32
// OLE Control verb names
#define AFX_IDS_VERB_EDIT 0xFE40
#define AFX_IDS_VERB_PROPERTIES 0xFE41
// OLE Control internal error messages
#define AFX_IDP_PICTURECANTOPEN 0xFE83
#define AFX_IDP_PICTURECANTLOAD 0xFE84
#define AFX_IDP_PICTURETOOLARGE 0xFE85
#define AFX_IDP_PICTUREREADFAILED 0xFE86
// Standard OLE Control error strings
#define AFX_IDP_E_ILLEGALFUNCTIONCALL 0xFEA0
#define AFX_IDP_E_OVERFLOW 0xFEA1
#define AFX_IDP_E_OUTOFMEMORY 0xFEA2
#define AFX_IDP_E_DIVISIONBYZERO 0xFEA3
#define AFX_IDP_E_OUTOFSTRINGSPACE 0xFEA4
#define AFX_IDP_E_OUTOFSTACKSPACE 0xFEA5
#define AFX_IDP_E_BADFILENAMEORNUMBER 0xFEA6
#define AFX_IDP_E_FILENOTFOUND 0xFEA7
#define AFX_IDP_E_BADFILEMODE 0xFEA8
#define AFX_IDP_E_FILEALREADYOPEN 0xFEA9
#define AFX_IDP_E_DEVICEIOERROR 0xFEAA
#define AFX_IDP_E_FILEALREADYEXISTS 0xFEAB
#define AFX_IDP_E_BADRECORDLENGTH 0xFEAC
#define AFX_IDP_E_DISKFULL 0xFEAD
#define AFX_IDP_E_BADRECORDNUMBER 0xFEAE
#define AFX_IDP_E_BADFILENAME 0xFEAF
#define AFX_IDP_E_TOOMANYFILES 0xFEB0
#define AFX_IDP_E_DEVICEUNAVAILABLE 0xFEB1
#define AFX_IDP_E_PERMISSIONDENIED 0xFEB2
#define AFX_IDP_E_DISKNOTREADY 0xFEB3
#define AFX_IDP_E_PATHFILEACCESSERROR 0xFEB4
#define AFX_IDP_E_PATHNOTFOUND 0xFEB5
#define AFX_IDP_E_INVALIDPATTERNSTRING 0xFEB6
#define AFX_IDP_E_INVALIDUSEOFNULL 0xFEB7
#define AFX_IDP_E_INVALIDFILEFORMAT 0xFEB8
#define AFX_IDP_E_INVALIDPROPERTYVALUE 0xFEB9
#define AFX_IDP_E_INVALIDPROPERTYARRAYINDEX 0xFEBA
#define AFX_IDP_E_SETNOTSUPPORTEDATRUNTIME 0xFEBB
#define AFX_IDP_E_SETNOTSUPPORTED 0xFEBC
#define AFX_IDP_E_NEEDPROPERTYARRAYINDEX 0xFEBD
#define AFX_IDP_E_SETNOTPERMITTED 0xFEBE
#define AFX_IDP_E_GETNOTSUPPORTEDATRUNTIME 0xFEBF
#define AFX_IDP_E_GETNOTSUPPORTED 0xFEC0
#define AFX_IDP_E_PROPERTYNOTFOUND 0xFEC1
#define AFX_IDP_E_INVALIDCLIPBOARDFORMAT 0xFEC2
#define AFX_IDP_E_INVALIDPICTURE 0xFEC3
#define AFX_IDP_E_PRINTERERROR 0xFEC4
#define AFX_IDP_E_CANTSAVEFILETOTEMP 0xFEC5
#define AFX_IDP_E_SEARCHTEXTNOTFOUND 0xFEC6
#define AFX_IDP_E_REPLACEMENTSTOOLONG 0xFEC7
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#endif //__AFXRES_H__
/////////////////////////////////////////////////////////////////////////////