From 4a1c77859566b8e63f300700c04485f67ac034c1 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Tue, 26 Dec 2006 02:05:35 +0000 Subject: [PATCH] Implemented option to set audio HD cache location Originally committed to SVN as r620. --- core/audio_provider_hd.cpp | 10 +++++++++- core/changelog.txt | 1 + core/options.cpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/audio_provider_hd.cpp b/core/audio_provider_hd.cpp index 538ba438d..1073c6cad 100644 --- a/core/audio_provider_hd.cpp +++ b/core/audio_provider_hd.cpp @@ -36,9 +36,12 @@ /////////// // Headers +#include #include "dialog_progress.h" #include "audio_provider_hd.h" #include "main.h" +#include "options.h" +#include "utils.h" /////////////// @@ -135,7 +138,12 @@ void HDAudioProvider::GetAudio(void *buf, __int64 start, __int64 count) { /////////////////////////// // Get disk cache path wxString HDAudioProvider::DiskCachePath() { - return AegisubApp::folderName; + // Default + wxString path = Options.AsText(_T("Audio HD Cache Location")); + if (path == _T("default")) return AegisubApp::folderName; + + // Specified + return DecodeRelativePath(path,AegisubApp::folderName); } diff --git a/core/changelog.txt b/core/changelog.txt index 1be6a620a..609e2f773 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -43,6 +43,7 @@ Please visit http://aegisub.net to download latest version - Improved Syntax Highlighter to include more features of ASS. (AMZ) - Added an inline Hunspell-based Spell Checker. (AMZ) - Added an inline MyThes-based Thesaurus. (AMZ) +- Added an option ("Audio HD Cache Location") that allows you to specify where to keep the audio cache. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/core/options.cpp b/core/options.cpp index 8f83a2fae..1ff222522 100644 --- a/core/options.cpp +++ b/core/options.cpp @@ -243,6 +243,7 @@ void OptionsManager::LoadDefaults() { SetInt(_T("Audio Display Height"),100); SetBool(_T("Audio Spectrum"),false); + SetText(_T("Audio HD Cache Location"),_T("default")); SetInt(_T("Timing processor key start before thres"),5); SetInt(_T("Timing processor key start after thres"),4);