MusicMod: Fixed the build
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3507 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
1 parent
35a9f15efa
commit
c66c54814c
21 files changed
+446
-219
No files matched your search
+11
-11
@@ -34,7 +34,7 @@ const TCHAR * SECTION = TEXT( "Plainamp" );
|
||||
ConfVar::ConfVar( TCHAR * szKey, ConfMode mode )
|
||||
{
|
||||
// MessageBox( 0, TEXT( "no const @ ConfVar" ), TEXT( "" ), 0 );
|
||||
//INFO_LOG(AUDIO,"ConfVar::ConfVar(TCHAR) > Got <%s>\n", szKey);
|
||||
//NOTICE_LOG(AUDIO,"ConfVar::ConfVar(TCHAR) > Got <%s>\n", szKey);
|
||||
|
||||
// Init
|
||||
const int iLen = ( int )_tcslen( szKey );
|
||||
@@ -59,7 +59,7 @@ ConfVar::ConfVar( TCHAR * szKey, ConfMode mode )
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
ConfVar::ConfVar( const TCHAR * szKey, ConfMode mode )
|
||||
{
|
||||
//INFO_LOG(AUDIO,"ConfVar::ConfVar(const TCHAR) > Got <%s>\n", szKey);
|
||||
//NOTICE_LOG(AUDIO,"ConfVar::ConfVar(const TCHAR) > Got <%s>\n", szKey);
|
||||
|
||||
// Init
|
||||
m_szKey = ( TCHAR * )szKey;
|
||||
@@ -73,7 +73,7 @@ ConfVar::ConfVar( const TCHAR * szKey, ConfMode mode )
|
||||
if( !conf_map ) conf_map = new map<TCHAR *, ConfVar *>;
|
||||
conf_map->insert( pair<TCHAR *, ConfVar *>( m_szKey, this ) );
|
||||
|
||||
//INFO_LOG(AUDIO,"ConfVar::ConfVar(const TCHAR) > Insert <%s>\n", ConfVar::m_szKey);
|
||||
//NOTICE_LOG(AUDIO,"ConfVar::ConfVar(const TCHAR) > Insert <%s>\n", ConfVar::m_szKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ ConfVar::~ConfVar()
|
||||
ConfBool::ConfBool( bool * pbData, TCHAR * szKey, ConfMode mode, bool bDefault ) : ConfVar( szKey, mode )
|
||||
{
|
||||
// MessageBox( 0, TEXT( "no const @ ConfBool" ), TEXT( "" ), 0 );
|
||||
//INFO_LOG(AUDIO,"ConfBool(TCHAR) > Get <%s>\n", szKey);
|
||||
//NOTICE_LOG(AUDIO,"ConfBool(TCHAR) > Get <%s>\n", szKey);
|
||||
|
||||
m_pbData = pbData;
|
||||
m_bDefault = bDefault;
|
||||
@@ -112,7 +112,7 @@ ConfBool::ConfBool( bool * pbData, TCHAR * szKey, ConfMode mode, bool bDefault )
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
ConfBool::ConfBool( bool * pbData, const TCHAR * szKey, ConfMode mode, bool bDefault ) : ConfVar( szKey, mode )
|
||||
{
|
||||
//INFO_LOG(AUDIO,"ConfBool(TCHAR) > Get <%s>\n", szKey);
|
||||
//NOTICE_LOG(AUDIO,"ConfBool(TCHAR) > Get <%s>\n", szKey);
|
||||
|
||||
m_pbData = pbData;
|
||||
m_bDefault = bDefault;
|
||||
@@ -127,7 +127,7 @@ ConfBool::ConfBool( bool * pbData, const TCHAR * szKey, ConfMode mode, bool bDef
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void ConfBool::Read()
|
||||
{
|
||||
//INFO_LOG(AUDIO,"ConfBool::Read() > Begin <m_bRead:%i> and <szIniPath:%s>\n", m_bRead, szIniPath);
|
||||
//NOTICE_LOG(AUDIO,"ConfBool::Read() > Begin <m_bRead:%i> and <szIniPath:%s>\n", m_bRead, szIniPath);
|
||||
|
||||
if( m_bRead || !szIniPath ) return;
|
||||
|
||||
@@ -507,13 +507,13 @@ ConfString::ConfString( TCHAR * szData, const TCHAR * szKey, ConfMode mode, TCHA
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void ConfString::Read()
|
||||
{
|
||||
//INFO_LOG(AUDIO, "ConfString::Read() > Begin\n");
|
||||
//NOTICE_LOG(AUDIO, "ConfString::Read() > Begin\n");
|
||||
|
||||
if( m_bRead || !szIniPath ) return;
|
||||
|
||||
GetPrivateProfileString( SECTION, m_szKey, m_szDefault, m_szData, m_iMaxLen, szIniPath );
|
||||
|
||||
//INFO_LOG(AUDIO, "ConfString::Read() > GetPrivateProfileString <%s> <%s> <%s>\n", m_szKey, m_szData, szIniPath);
|
||||
//NOTICE_LOG(AUDIO, "ConfString::Read() > GetPrivateProfileString <%s> <%s> <%s>\n", m_szKey, m_szData, szIniPath);
|
||||
|
||||
m_bRead = true;
|
||||
}
|
||||
@@ -567,7 +567,7 @@ void ConfCurDir::Read()
|
||||
// Apply
|
||||
//SetCurrentDirectory( m_szData );
|
||||
|
||||
//INFO_LOG(AUDIO,"ConfCurDir::Read > End <%s>\n", m_szData);
|
||||
//NOTICE_LOG(AUDIO,"ConfCurDir::Read > End <%s>\n", m_szData);
|
||||
}
|
||||
// ==============================================================================
|
||||
|
||||
@@ -581,7 +581,7 @@ void ConfCurDir::Write()
|
||||
GetCurrentDirectory( MAX_PATH, m_szData ); // Note: without trailing slash
|
||||
|
||||
// MessageBox( 0, m_szData, TEXT( "CurDir" ), 0 );
|
||||
//INFO_LOG(AUDIO,"ConfCurDir::Read <%s>\n", m_szData);
|
||||
//NOTICE_LOG(AUDIO,"ConfCurDir::Read <%s>\n", m_szData);
|
||||
|
||||
ConfString::Write();
|
||||
}
|
||||
@@ -645,7 +645,7 @@ void Conf::Init()
|
||||
//_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" ) );
|
||||
|
||||
INFO_LOG(AUDIO,"DLL > Ini path <%s>\n", szIniPath);
|
||||
NOTICE_LOG(AUDIO,"DLL > Ini path <%s>\n", szIniPath);
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ InputPlugin::InputPlugin( TCHAR * szDllpath, bool bKeepLoaded ) : Plugin( szDllp
|
||||
iFiltersLen = 0;
|
||||
plugin = NULL;
|
||||
|
||||
//INFO_LOG(AUDIO,"\InputPlugin::InputPlugin > Begin\n");
|
||||
//NOTICE_LOG(AUDIO,"\InputPlugin::InputPlugin > Begin\n");
|
||||
|
||||
if( !Load() )
|
||||
{
|
||||
|
||||
+1
-1
@@ -371,7 +371,7 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
|
||||
static bool bRemoveIcon = false;
|
||||
|
||||
#ifdef NOGUI
|
||||
//INFO_LOG(AUDIO,"DLL > Main.cpp:WndprocMain() was called. But nothing will be done. \n");
|
||||
//NOTICE_LOG(AUDIO,"DLL > Main.cpp:WndprocMain() was called. But nothing will be done. \n");
|
||||
#else
|
||||
Console::Append( TEXT( "Main.cpp:WndprocMain was called" ) );
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -266,7 +266,7 @@ void Output_SetVolume( int volume )
|
||||
//_stprintf( szBuffer, TEXT( "DLL > Output_SetVolume <%i>" ), volume );
|
||||
//Console::Append( szBuffer );
|
||||
//Console::Append( TEXT( " " ) );
|
||||
//INFO_LOG(AUDIO, "DLL > Output_SetVolume <%i>\n", volume );
|
||||
//NOTICE_LOG(AUDIO, "DLL > Output_SetVolume <%i>\n", volume );
|
||||
// =======================================================================================
|
||||
|
||||
for( int i = 0; i < active_output_count; i++ )
|
||||
|
||||
+2
-2
@@ -248,7 +248,7 @@ bool OutputPlugin::Config( HWND hParent )
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool OutputPlugin::Start()
|
||||
{
|
||||
//INFO_LOG(AUDIO, "OutputPlugin::Start() > Begin <IsLoaded():%i> <bActive:%i> <active_output_count:%i>\n",
|
||||
//NOTICE_LOG(AUDIO, "OutputPlugin::Start() > Begin <IsLoaded():%i> <bActive:%i> <active_output_count:%i>\n",
|
||||
// IsLoaded(), bActive, active_output_count );
|
||||
|
||||
if( !IsLoaded() ) return false;
|
||||
@@ -275,7 +275,7 @@ bool OutputPlugin::Start()
|
||||
Console::Append( szBuffer );
|
||||
Console::Append( TEXT( " " ) );
|
||||
#else
|
||||
INFO_LOG(AUDIO, "\n >>> Output plugin '%s' activated\n\n" , GetFilename() );
|
||||
NOTICE_LOG(AUDIO, "\n >>> Output plugin '%s' activated\n\n" , GetFilename() );
|
||||
#endif
|
||||
|
||||
bActive = true;
|
||||
|
||||
+12
-12
@@ -60,14 +60,14 @@ void EnableTimer( bool bEnabled )
|
||||
if( bEnabled )
|
||||
{
|
||||
SetTimer( WindowMain, TIMER_SEEK_UPDATE, 1000, NULL );
|
||||
INFO_LOG(AUDIO, "EnableTimer > Activated\n" );
|
||||
NOTICE_LOG(AUDIO, "EnableTimer > Activated\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
KillTimer( WindowMain, TIMER_SEEK_UPDATE );
|
||||
StatusReset();
|
||||
|
||||
INFO_LOG(AUDIO, "EnableTimer > Killed\n" );
|
||||
NOTICE_LOG(AUDIO, "EnableTimer > Killed\n" );
|
||||
}
|
||||
|
||||
bTimerRunning = bEnabled;
|
||||
@@ -82,7 +82,7 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
|
||||
{
|
||||
// =======================================================================================
|
||||
#ifdef NOGUI
|
||||
//INFO_LOG(AUDIO, "Playback.cpp: OpenPlay > Begin <%i> <%s>\n" , iNumber, szFilename );
|
||||
//NOTICE_LOG(AUDIO, "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 );
|
||||
@@ -121,14 +121,14 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
|
||||
{
|
||||
Console::Append( TEXT( "ERROR: Extension not supported" ) );
|
||||
Console::Append( " " );
|
||||
INFO_LOG(AUDIO,"OpenPlay > ERROR: Extension not supported\n");
|
||||
NOTICE_LOG(AUDIO,"OpenPlay > ERROR: Extension not supported\n");
|
||||
return false;
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// 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;
|
||||
INFO_LOG(AUDIO,"OpenPlay > Input plugin '%s' activated\n", active_input_plugin->GetFilename());
|
||||
NOTICE_LOG(AUDIO,"OpenPlay > Input plugin '%s' activated\n", active_input_plugin->GetFilename());
|
||||
// =======================================================================================
|
||||
|
||||
if( old_input )
|
||||
@@ -145,12 +145,12 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
|
||||
{
|
||||
Console::Append( TEXT( "ERROR: Input plugin is NULL" ) );
|
||||
Console::Append( " " );
|
||||
INFO_LOG(AUDIO,"OpenPlay > ERROR: Input plugin is NULL\n");
|
||||
NOTICE_LOG(AUDIO,"OpenPlay > ERROR: Input plugin is NULL\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Connect
|
||||
//INFO_LOG(AUDIO, "OpenPlay > OutMod\n" );
|
||||
//NOTICE_LOG(AUDIO, "OpenPlay > OutMod\n" );
|
||||
active_input_plugin->plugin->outMod = &output_server; // output->plugin;
|
||||
|
||||
// =======================================================================================
|
||||
@@ -190,10 +190,10 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
|
||||
TCHAR szTitle[ 2000 ] = TEXT( "\0" );
|
||||
int length_in_ms;
|
||||
|
||||
//INFO_LOG(AUDIO, "OpenPlay > GetFileInfo\n" );
|
||||
//NOTICE_LOG(AUDIO, "OpenPlay > GetFileInfo\n" );
|
||||
active_input_plugin->plugin->GetFileInfo( szFilename, szTitle, &length_in_ms );
|
||||
|
||||
//INFO_LOG(AUDIO, "OpenPlay > Play\n" );
|
||||
//NOTICE_LOG(AUDIO, "OpenPlay > Play\n" );
|
||||
active_input_plugin->plugin->Play( szFilename );
|
||||
// =======================================================================================
|
||||
#endif
|
||||
@@ -218,7 +218,7 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
|
||||
// Timer ON
|
||||
//EnableTimer( true );
|
||||
|
||||
//INFO_LOG(AUDIO, "OpenPlay > End\n" );
|
||||
//NOTICE_LOG(AUDIO, "OpenPlay > End\n" );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ bool Playback::Play()
|
||||
Console::Append( sszBuffer );
|
||||
Console::Append( TEXT( " " ) );
|
||||
#else
|
||||
//INFO_LOG(AUDIO, "Playback::Play() > Begin <%i>\n" , bPlaying );
|
||||
//NOTICE_LOG(AUDIO, "Playback::Play() > Begin <%i>\n" , bPlaying );
|
||||
#endif
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
@@ -393,7 +393,7 @@ bool Playback::Play()
|
||||
Console::Append( szBuffer );
|
||||
//Console::Append( TEXT( " " ) );
|
||||
#else
|
||||
//INFO_LOG(AUDIO, "Playback::Play() > Filename <%s>\n", szFilename);
|
||||
//NOTICE_LOG(AUDIO, "Playback::Play() > Filename <%s>\n", szFilename);
|
||||
#endif
|
||||
|
||||
// Play
|
||||
|
||||
+21
-21
@@ -119,15 +119,15 @@ void Player_Main(bool Console)
|
||||
//g_hInstance = hInstance;
|
||||
// =======================================================================================
|
||||
|
||||
//printf( "DLL > main_dll() opened\n" );
|
||||
//printf( "DLL > main_dll() opened" );
|
||||
|
||||
if (Console) Player_Console(true);
|
||||
|
||||
//MessageBox(0, "main() opened", "", 0);
|
||||
//printf( "main() opened\n" );
|
||||
INFO_LOG(AUDIO,"\n=========================================================\n\n\n" );
|
||||
//INFO_LOG(AUDIO, "DLL > Player_Main() > Begin\n" );
|
||||
INFO_LOG(AUDIO, "DLL > Settings:\n", bLoop);
|
||||
NOTICE_LOG(AUDIO,"\n=========================================================\n\n\n" );
|
||||
//NOTICE_LOG(AUDIO, "DLL > Player_Main() > Begin\n" );
|
||||
NOTICE_LOG(AUDIO, "DLL > Settings:", bLoop);
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
@@ -137,8 +137,8 @@ void Player_Main(bool Console)
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
INFO_LOG(AUDIO, "DLL > Loop: %i\n", bLoop);
|
||||
INFO_LOG(AUDIO, "DLL > WarnPluginsMissing: %i\n", bWarnPluginsMissing);
|
||||
NOTICE_LOG(AUDIO, "DLL > Loop: %i", bLoop);
|
||||
NOTICE_LOG(AUDIO, "DLL > WarnPluginsMissing: %i", bWarnPluginsMissing);
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
// =======================================================================================
|
||||
@@ -170,7 +170,7 @@ void Player_Main(bool Console)
|
||||
memcpy( szPluginDir, szHomeDir, iHomeDirLen * sizeof( TCHAR ) );
|
||||
memcpy( szPluginDir + iHomeDirLen, TEXT( "PluginsMusic" ), 12 * sizeof( TCHAR ) );
|
||||
szPluginDir[ iHomeDirLen + 12 ] = TEXT( '\0' );
|
||||
INFO_LOG(AUDIO,"DLL > Plugindir: %s\n", szPluginDir);
|
||||
NOTICE_LOG(AUDIO,"DLL > Plugindir: %s", szPluginDir);
|
||||
// =======================================================================================
|
||||
#ifndef NOGUI
|
||||
Font::Create();
|
||||
@@ -183,7 +183,7 @@ void Player_Main(bool Console)
|
||||
//GlobalVolume = Playback::Volume::Get(); // Don't bother with this for now
|
||||
//GlobalCurrentVolume = GlobalVolume;
|
||||
//Output_SetVolume( GlobalVolume );
|
||||
INFO_LOG(AUDIO,"DLL > Volume: %i\n\n", GlobalVolume);
|
||||
NOTICE_LOG(AUDIO,"DLL > Volume: %i\n", GlobalVolume);
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -206,10 +206,10 @@ void Player_Main(bool Console)
|
||||
Plugin::FindAll<DspPlugin> ( szPluginDir, TEXT( "dsp_*.dll" ), false );
|
||||
Plugin::FindAll<GenPlugin> ( szPluginDir, TEXT( "gen_*.dll" ), true );
|
||||
|
||||
//INFO_LOG(AUDIO, "Winmain.cpp > PluginManager::Fill()\n" );
|
||||
//NOTICE_LOG(AUDIO, "Winmain.cpp > PluginManager::Fill()\n" );
|
||||
PluginManager::Fill();
|
||||
|
||||
//INFO_LOG(AUDIO, "Winmain.cpp > PluginManager::Fill()\n" );
|
||||
//NOTICE_LOG(AUDIO, "Winmain.cpp > PluginManager::Fill()\n" );
|
||||
|
||||
|
||||
|
||||
@@ -251,26 +251,26 @@ void Player_Main(bool Console)
|
||||
// Check the plugins
|
||||
if( input_plugins.empty() )
|
||||
{
|
||||
INFO_LOG(AUDIO,"\n *** Warning: No valid input plugins found\n\n");
|
||||
NOTICE_LOG(AUDIO,"\n *** Warning: No valid input plugins found\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(AUDIO," >>> These valid input plugins were found:\n");
|
||||
NOTICE_LOG(AUDIO," >>> These valid input plugins were found:");
|
||||
for(int i = 0; i < input_plugins.size(); i++)
|
||||
INFO_LOG(AUDIO," %i: %s\n", (i + 1), input_plugins.at(i)->GetFilename());
|
||||
INFO_LOG(AUDIO,"\n");
|
||||
NOTICE_LOG(AUDIO," %i: %s", (i + 1), input_plugins.at(i)->GetFilename());
|
||||
NOTICE_LOG(AUDIO,"\n");
|
||||
}
|
||||
|
||||
// The input plugins are never activated here, they are activate for each file
|
||||
if( !active_input_plugin || !active_input_plugin->plugin )
|
||||
{
|
||||
// INFO_LOG(AUDIO,"The input plugin is not activated yet\n");
|
||||
// NOTICE_LOG(AUDIO,"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();
|
||||
//INFO_LOG(AUDIO,"We are at <%i of %i>\n", ms_cur, ms_len);
|
||||
//NOTICE_LOG(AUDIO,"We are at <%i of %i>\n", ms_cur, ms_len);
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------
|
||||
if( active_output_count > 0 )
|
||||
@@ -281,11 +281,11 @@ void Player_Main(bool Console)
|
||||
{
|
||||
res_temp = active_output_plugins[ i ]->plugin->GetOutputTime();
|
||||
}
|
||||
INFO_LOG(AUDIO,"Playback progress <%i>\n", res_temp);*/
|
||||
NOTICE_LOG(AUDIO,"Playback progress <%i>\n", res_temp);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(AUDIO,"\n *** Warning: The output plugin is not working\n\n");
|
||||
NOTICE_LOG(AUDIO,"\n *** Warning: The output plugin is not working\n\n");
|
||||
}
|
||||
// =======================================================================================
|
||||
|
||||
@@ -293,14 +293,14 @@ void Player_Main(bool Console)
|
||||
// Start the timer
|
||||
if(!TimerCreated && bLoop) // Only create this the first time
|
||||
{
|
||||
//INFO_LOG(AUDIO,"Created the timer\n");
|
||||
//NOTICE_LOG(AUDIO,"Created the timer\n");
|
||||
MakeTime();
|
||||
TimerCreated = true;
|
||||
}
|
||||
// =======================================================================================
|
||||
|
||||
INFO_LOG(AUDIO, "\n=========================================================\n\n" );
|
||||
//INFO_LOG(AUDIO, "DLL > main_dll() > End\n\n\n" );
|
||||
NOTICE_LOG(AUDIO, "\n=========================================================\n\n" );
|
||||
//NOTICE_LOG(AUDIO, "DLL > main_dll() > End\n\n\n" );
|
||||
|
||||
//std::cin.get();
|
||||
}
|
||||
|
||||
+17
-15
@@ -60,21 +60,21 @@ void AddFileToPlaylist(char * a)
|
||||
|
||||
void Player_Play(char * FileName)
|
||||
{
|
||||
INFO_LOG(AUDIO,"Play file <%s>\n", FileName);
|
||||
NOTICE_LOG(AUDIO,"Play file '%s'", FileName);
|
||||
|
||||
// Check if the file exists
|
||||
if(GetFileAttributes(FileName) == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
INFO_LOG(AUDIO,"Warning: The file <%s> does not exist. Something is wrong.\n", FileName);
|
||||
NOTICE_LOG(AUDIO,"Warning: The file '%s' does not exist. Something is wrong.", FileName);
|
||||
return;
|
||||
}
|
||||
|
||||
Playback::Stop();
|
||||
//INFO_LOG(AUDIO,"Stop\n");
|
||||
//NOTICE_LOG(AUDIO,"Stop\n");
|
||||
playlist->RemoveAll();
|
||||
//INFO_LOG(AUDIO,"RemoveAll\n");
|
||||
//NOTICE_LOG(AUDIO,"RemoveAll\n");
|
||||
AddFileToPlaylist(FileName);
|
||||
//INFO_LOG(AUDIO,"addfiletoplaylist\n");
|
||||
//NOTICE_LOG(AUDIO,"addfiletoplaylist\n");
|
||||
|
||||
// Play the file
|
||||
Playback::Play();
|
||||
@@ -84,7 +84,7 @@ void Player_Play(char * FileName)
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Set volume. This must probably be done after the dll is loaded.
|
||||
//Output_SetVolume( Playback::Volume::Get() );
|
||||
//INFO_LOG(AUDIO,"Volume(%i)\n", Playback::Volume::Get());
|
||||
//NOTICE_LOG(AUDIO,"Volume(%i)\n", Playback::Volume::Get());
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
GlobalPause = false;
|
||||
@@ -93,7 +93,7 @@ void Player_Play(char * FileName)
|
||||
void Player_Stop()
|
||||
{
|
||||
Playback::Stop();
|
||||
//INFO_LOG(AUDIO,"Stop\n");
|
||||
//NOTICE_LOG(AUDIO,"Stop\n");
|
||||
playlist->RemoveAll();
|
||||
|
||||
CurrentlyPlayingFile = "";
|
||||
@@ -106,13 +106,13 @@ void Player_Pause()
|
||||
{
|
||||
if (!GlobalPause)
|
||||
{
|
||||
INFO_LOG(AUDIO,"DLL > Pause\n");
|
||||
NOTICE_LOG(AUDIO,"DLL > Pause\n");
|
||||
Playback::Pause();
|
||||
GlobalPause = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(AUDIO,"DLL > UnPause from Pause\n");
|
||||
NOTICE_LOG(AUDIO,"DLL > UnPause from Pause\n");
|
||||
Player_Unpause();
|
||||
GlobalPause = false;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void Player_Pause()
|
||||
|
||||
void Player_Unpause()
|
||||
{
|
||||
INFO_LOG(AUDIO,"DLL > UnPause\n");
|
||||
NOTICE_LOG(AUDIO,"DLL > UnPause\n");
|
||||
Playback::Play();
|
||||
GlobalPause = false;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ void Player_Unpause()
|
||||
void Player_Mute(int Vol)
|
||||
{
|
||||
if(GlobalVolume == -1) GlobalVolume = Vol;
|
||||
INFO_LOG(AUDIO,"DLL > Mute <%i> <%i>\n", GlobalVolume, GlobalMute);
|
||||
NOTICE_LOG(AUDIO,"DLL > Mute <%i> <%i>\n", GlobalVolume, GlobalMute);
|
||||
|
||||
GlobalMute = !GlobalMute;
|
||||
|
||||
@@ -144,15 +144,15 @@ void Player_Mute(int Vol)
|
||||
if(GlobalMute)
|
||||
{
|
||||
Output_SetVolume( 0 );
|
||||
INFO_LOG(AUDIO,"DLL > Volume <%i>\n", GlobalMute);
|
||||
NOTICE_LOG(AUDIO,"DLL > Volume <%i>\n", GlobalMute);
|
||||
}
|
||||
else
|
||||
{
|
||||
Output_SetVolume( GlobalVolume );
|
||||
INFO_LOG(AUDIO,"DLL > Volume <%i>\n", GlobalMute);
|
||||
NOTICE_LOG(AUDIO,"DLL > Volume <%i>\n", GlobalMute);
|
||||
}
|
||||
|
||||
//INFO_LOG(AUDIO,"Volume(%i)\n", Playback::Volume::Get());
|
||||
//NOTICE_LOG(AUDIO,"Volume(%i)\n", Playback::Volume::Get());
|
||||
}
|
||||
///////////////////////////////////////
|
||||
|
||||
@@ -161,11 +161,13 @@ void Player_Volume(int Vol)
|
||||
{
|
||||
GlobalVolume = Vol;
|
||||
Output_SetVolume( GlobalVolume );
|
||||
//INFO_LOG(AUDIO,"DLL > Volume <%i> <%i>\n", GlobalVolume, GlobalCurrentVolume);
|
||||
//NOTICE_LOG(AUDIO,"DLL > Volume <%i> <%i>\n", GlobalVolume, GlobalCurrentVolume);
|
||||
}
|
||||
|
||||
void ShowConsole()
|
||||
{
|
||||
ConsoleListener *console = LogManager::GetInstance()->getConsoleListener();
|
||||
console->Open(100, 2000, "MusicMod");
|
||||
// Console::Open(100, 2000, "MusicMod", true); // give room for 2000 rows
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
if( 0 > iIndex || iIndex >= ( int )_database.size() )
|
||||
{
|
||||
INFO_LOG(AUDIO,"SetCurIndex > Return");
|
||||
NOTICE_LOG(AUDIO,"SetCurIndex > Return");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -48,7 +48,7 @@ extern bool GlobalPause;
|
||||
void CALLBACK Update(unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)
|
||||
#endif
|
||||
{
|
||||
//INFO_LOG(AUDIO,"DLL > Update() > Begin (%i)\n", active_input_plugin);
|
||||
//NOTICE_LOG(AUDIO,"DLL > Update() > Begin (%i)\n", active_input_plugin);
|
||||
|
||||
// --------------------------------
|
||||
// Manage restart when playback for a file has reached the end of the file
|
||||
@@ -56,7 +56,7 @@ extern bool GlobalPause;
|
||||
// Check if the input plugin is activated
|
||||
if(!active_input_plugin || !active_input_plugin->plugin)
|
||||
{
|
||||
//INFO_LOG(AUDIO,"The input plugin is not activated yet\n");
|
||||
//NOTICE_LOG(AUDIO,"The input plugin is not activated yet\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -73,20 +73,20 @@ extern bool GlobalPause;
|
||||
if ( progress > 0.7 ) // Only show this if we are getting close to the end, for bugtesting
|
||||
// basically
|
||||
{
|
||||
//INFO_LOG(AUDIO,"Playback progress <%i of %i>\n", ms_cur, ms_len);
|
||||
//NOTICE_LOG(AUDIO,"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
|
||||
{
|
||||
INFO_LOG(AUDIO,"Restart <%s>\n", CurrentlyPlayingFile.c_str());
|
||||
NOTICE_LOG(AUDIO,"Restart <%s>\n", CurrentlyPlayingFile.c_str());
|
||||
Player_Play((char *)CurrentlyPlayingFile.c_str());
|
||||
}
|
||||
}
|
||||
// --------------
|
||||
|
||||
//INFO_LOG(AUDIO,"Make new time\n");
|
||||
//NOTICE_LOG(AUDIO,"Make new time\n");
|
||||
MakeTime(); // Make a new one
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ int MainTimer()
|
||||
// cout << ".";
|
||||
//}
|
||||
|
||||
//INFO_LOG(AUDIO,"MakeTime\n");
|
||||
//NOTICE_LOG(AUDIO,"MakeTime\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user