Permalink
Browse files

v1.6wip. multiple changes, check modizer_changes.txt

  • Loading branch information...
1 parent 7b58e43 commit 9fd7763a2aee233e08888422b364e87547ab3950 @yoyofr committed Feb 15, 2012
View
@@ -1330,9 +1330,12 @@ DUH *dumb_read_it_quick(DUMBFILE *f)
return NULL;
{
- const char *tag[1][2];
+ const char *tag[2][2];
tag[0][0] = "TITLE";
tag[0][1] = ((DUMB_IT_SIGDATA *)sigdata)->name;
- return make_duh(-1, 1, (const char *const (*)[2])tag, 1, &descptr, &sigdata);
+ tag[1][0] = "FORMAT";
+ tag[1][1] = "IT";
+
+ return make_duh(-1, 2, (const char *const (*)[2])tag, 1, &descptr, &sigdata);
}
}
@@ -67,7 +67,7 @@ ControlMode ctl=
{
"dumb interface", 'd',
"dumb",
- 1,0,0,
+ VERB_VERBOSE,0,0,
0,
ctl_open,
ctl_close,
View
@@ -87,6 +87,7 @@ MBlockList tmpbuffer;
char *output_text_code = NULL;
int open_file_noise_mode = OF_NORMAL;
+#undef DEFAULT_PATH
#ifdef DEFAULT_PATH
/* The paths in this list will be tried whenever we're reading a file */
static PathList defaultpathlist={DEFAULT_PATH,0};
@@ -794,8 +795,8 @@ void add_to_pathlist(char *s)
{
PathList *cur, *prev, *plp;
//MODIZER
- pathlist->path=s;
- return;
+ //pathlist->path=s;
+ //return;
/* Check duplicated path in the pathlist. */
plp = prev = NULL;
@@ -262,7 +262,7 @@ void add_soundfont(char *sf_file,
int amp)
{
SFInsts *sf;
-
+
if((sf = find_soundfont(sf_file)) == NULL)
{
sf = new_soundfont(sf_file);
View
@@ -2524,15 +2524,15 @@ static int read_user_config_file(void)
{
ctl->cmsg(CMSG_INFO, VERB_NOISY,
"Warning: HOME environment is not defined.");
- return 0;
+ return -1;
}
- sprintf(path, "%s" PATH_STRING ".timidity.cfg", home);
+ sprintf(path, "%s" PATH_STRING "Documents/timidity.cfg", home);
if((opencheck = open(path, 0)) < 0)
{
ctl->cmsg(CMSG_INFO, VERB_NOISY, "%s: %s",
path, strerror(errno));
- return 0;
+ return -2;
}
close(opencheck);
@@ -5298,18 +5298,23 @@ MAIN_INTERFACE void timidity_start_initialize(void)
MAIN_INTERFACE int timidity_pre_load_configuration(void)
{
/* UNIX */
- if(!read_config_file(CONFIG_FILE, 0))
- got_a_configuration = 1;
-
/* Try read configuration file which is in the
* $HOME (or %HOME% for DOS) directory.
* Please setup each user preference in $HOME/.timidity.cfg
* (or %HOME%/timidity.cfg for DOS)
*/
- if(read_user_config_file())
- ctl->cmsg(CMSG_INFO, VERB_NOISY,
+ if(read_user_config_file()) {
+ ctl->cmsg(CMSG_INFO, VERB_NOISY,
"Warning: Can't read ~/.timidity.cfg correctly");
+ } else {
+ got_a_configuration = 1;
+ }
+
+ if (got_a_configuration==0) {
+ if(!read_config_file(CONFIG_FILE, 0))
+ got_a_configuration = 1;
+ }
return 0;
}
@@ -5666,7 +5671,7 @@ extern PlayMode ios_play_mode;
extern volatile int mSlowDevice;
int tim_init(char *path) {
-
+// printf("initpath:%s\n",path);
add_to_pathlist(path);
return 0;
@@ -126,7 +126,7 @@ class CGLString;
IBOutlet UISegmentedControl *sc_checkBeforeRedownload,*sc_AfterDownload,*sc_EnqueueMode,*sc_DefaultAction,*segcont_randFx,*sc_allowPopup,*sc_titleFilename;
IBOutlet UISegmentedControl *segcont_spectrum,*segcont_shownote,*segcont_mpSampling,*segcont_forceMono,*sc_bgPlay,*sc_showDebug;
- IBOutlet UISegmentedControl *segcont_mpMB,*segcont_mpReverb,*segcont_mpSUR,*segcont_fx1,*segcont_fx2,*segcont_fx3,*segcont_fx4,*segcont_fx5,*segcont_FxBeat,*sc_cflow,*sc_AOSDKDSFDSP,*sc_AOSDKDSFEmuRatio,*sc_AOSDKSSFDSP,*sc_AOSDKSSFEmuRatio;
+ IBOutlet UISegmentedControl *segcont_mpMB,*segcont_mpReverb,*segcont_mpSUR,*segcont_fx1,*segcont_fx2,*segcont_fx3,*segcont_fx4,*segcont_fx5,*segcont_FxBeat,*sc_cflow,*sc_AOSDKDSFDSP,*sc_AOSDKDSFEmuRatio,*sc_AOSDKSSFDSP,*sc_AOSDKSSFEmuRatio,*sc_AOSDKDSF22KHZ;
IBOutlet UISegmentedControl *segcont_oscillo;
//,*segcont_resumeLaunch
IBOutlet UISegmentedControl *sc_UADE_Led,*sc_UADE_Norm,*sc_UADE_PostFX,*sc_UADE_Pan,*sc_UADE_Head,*sc_UADE_Gain,*sc_FXDetail,*sc_Panning;
@@ -330,7 +330,7 @@ class CGLString;
@property (nonatomic, retain) IBOutlet UISlider *surDepSld,*surDelSld,*revDepSld,*revDelSld,*bassAmoSld,*bassRanSld,*mastVolSld,*mpPanningSld,*sldFxAlpha,*sldDUMBMastVol,*sldPanning;
@property (nonatomic, retain) IBOutlet UITextView *textMessage;
-@property (nonatomic, retain) IBOutlet UISegmentedControl *segcont_fx1,*segcont_fx2,*segcont_fx3,*segcont_fx4,*segcont_fx5,*segcont_randFx,*segcont_FxBeat,*sc_cflow,*sc_AOSDKDSFDSP,*sc_AOSDKDSFEmuRatio,*sc_AOSDKSSFDSP,*sc_AOSDKSSFEmuRatio;
+@property (nonatomic, retain) IBOutlet UISegmentedControl *segcont_fx1,*segcont_fx2,*segcont_fx3,*segcont_fx4,*segcont_fx5,*segcont_randFx,*segcont_FxBeat,*sc_cflow,*sc_AOSDKDSFDSP,*sc_AOSDKDSFEmuRatio,*sc_AOSDKSSFDSP,*sc_AOSDKSSFEmuRatio,*sc_AOSDKDSF22KHZ;
@property (nonatomic, retain) IBOutlet UISegmentedControl *segcont_spectrum,*segcont_shownote,*segcont_forceMono,*sc_checkBeforeRedownload,*sc_AfterDownload,*sc_EnqueueMode;
@property (nonatomic, retain) IBOutlet UISegmentedControl *segcont_mpSampling,*segcont_mpMB,*segcont_mpReverb,*segcont_mpSUR;
@property (nonatomic, retain) IBOutlet UISegmentedControl *segcont_oscillo,*sc_DefaultAction,*sc_bgPlay,*sc_showDebug;
@@ -354,6 +354,7 @@ class CGLString;
-(IBAction) optTIM_Polyphony;
-(IBAction) optFX_Alpha;
+-(IBAction) optAOSDK_DSF22KHZ;
-(IBAction) optAOSDK_DSFDSP;
-(IBAction) optAOSDK_DSFEmuRatio;
-(IBAction) optAOSDK_SSFDSP;
@@ -141,7 +141,7 @@ @implementation DetailViewControllerIphone
@synthesize segcont_oscillo,segcont_forceMono,sc_checkBeforeRedownload,sc_bgPlay,sc_StatsUpload,sc_SpokenTitle,sc_showDebug;
//segcont_resumeLaunch
@synthesize segcont_spectrum,segcont_shownote,segcont_mpSampling;
-@synthesize segcont_mpMB,segcont_mpReverb,segcont_mpSUR,segcont_fx1,segcont_fx2,segcont_fx3,segcont_fx4,segcont_fx5,segcont_FxBeat,sc_FXDetail,sc_cflow,sc_AOSDKDSFDSP,sc_AOSDKDSFEmuRatio,sc_AOSDKSSFDSP,sc_AOSDKSSFEmuRatio;
+@synthesize segcont_mpMB,segcont_mpReverb,segcont_mpSUR,segcont_fx1,segcont_fx2,segcont_fx3,segcont_fx4,segcont_fx5,segcont_FxBeat,sc_FXDetail,sc_cflow,sc_AOSDKDSFDSP,sc_AOSDKDSFEmuRatio,sc_AOSDKSSFDSP,sc_AOSDKSSFEmuRatio,sc_AOSDKDSF22KHZ;
@synthesize sc_SEXYPSF_Reverb,sc_SEXYPSF_Interpol;
@synthesize sc_AOSDK_Reverb,sc_AOSDK_Interpol;
@synthesize sc_ADPLUG_opltype;
@@ -331,7 +331,9 @@ -(IBAction) optDUMBResampling {
[mplayer optDUMB_Resampling:sc_DUMBResampling.selectedSegmentIndex];
}
-
+-(IBAction) optAOSDK_DSF22KHZ {
+ [mplayer optAOSDK_22KHZ:sc_AOSDKDSF22KHZ.selectedSegmentIndex];
+}
-(IBAction) optAOSDK_DSFDSP {
[mplayer optAOSDK_DSFDSP:sc_AOSDKDSFDSP.selectedSegmentIndex];
}
@@ -2937,6 +2939,7 @@ -(void) updateAllSettingsAfterChange {
[self optAOSDK_DSFEmuRatio];
[self optAOSDK_DSFDSP];
+ [self optAOSDK_DSF22KHZ];
[self optAOSDK_SSFEmuRatio];
[self optAOSDK_SSFDSP];
@@ -3006,6 +3009,7 @@ -(void) loadDefaultSettings {
sc_AOSDK_Reverb.selectedSegmentIndex = 1;
sc_AOSDK_Interpol.selectedSegmentIndex = 2;
sc_AOSDKDSFDSP.selectedSegmentIndex = 0;
+ sc_AOSDKDSF22KHZ.selectedSegmentIndex = 1;
sc_AOSDKDSFEmuRatio.selectedSegmentIndex = 2;
sc_AOSDKSSFDSP.selectedSegmentIndex = 0;
sc_AOSDKSSFEmuRatio.selectedSegmentIndex = 2;
@@ -3105,6 +3109,7 @@ -(void) loadHighSettings {
///////////////////////////////////////
sc_AOSDK_Reverb.selectedSegmentIndex = 1;
sc_AOSDK_Interpol.selectedSegmentIndex = 2;
+ sc_AOSDKDSF22KHZ.selectedSegmentIndex = 0;
sc_AOSDKDSFDSP.selectedSegmentIndex = 1;
sc_AOSDKDSFEmuRatio.selectedSegmentIndex = 0;
sc_AOSDKSSFDSP.selectedSegmentIndex = 1;
@@ -3210,6 +3215,7 @@ -(void) loadMedSettings {
///////////////////////////////////////
sc_AOSDK_Reverb.selectedSegmentIndex = 1;
sc_AOSDK_Interpol.selectedSegmentIndex = 1;
+ sc_AOSDKDSF22KHZ.selectedSegmentIndex = 1;
sc_AOSDKDSFDSP.selectedSegmentIndex = 0;
sc_AOSDKDSFEmuRatio.selectedSegmentIndex = 2;
sc_AOSDKSSFDSP.selectedSegmentIndex = 0;
@@ -3315,6 +3321,7 @@ -(void) loadLowSettings {
///////////////////////////////////////
sc_AOSDK_Reverb.selectedSegmentIndex = 0;
sc_AOSDK_Interpol.selectedSegmentIndex = 0;
+ sc_AOSDKDSF22KHZ.selectedSegmentIndex = 1;
sc_AOSDKDSFDSP.selectedSegmentIndex = 0;
sc_AOSDKDSFEmuRatio.selectedSegmentIndex = 3;
sc_AOSDKSSFDSP.selectedSegmentIndex = 0;
@@ -3538,6 +3545,9 @@ -(void)loadSettings:(int)safe_mode{
valNb=[prefs objectForKey:@"AOSDKReverb"];if (safe_mode) valNb=nil;
if (valNb == nil) sc_AOSDK_Reverb.selectedSegmentIndex = 1;
else sc_AOSDK_Reverb.selectedSegmentIndex = [valNb intValue];
+ valNb=[prefs objectForKey:@"AOSDKDSF22KHZ"];if (safe_mode) valNb=nil;
+ if (valNb == nil) sc_AOSDKDSF22KHZ.selectedSegmentIndex = 1;
+ else sc_AOSDKDSF22KHZ.selectedSegmentIndex = [valNb intValue];
valNb=[prefs objectForKey:@"AOSDKInterp"];if (safe_mode) valNb=nil;
if (valNb == nil) sc_AOSDK_Interpol.selectedSegmentIndex = 2;
else sc_AOSDK_Interpol.selectedSegmentIndex = [valNb intValue];
@@ -3829,6 +3839,8 @@ -(void)saveSettings{
valNb=[[NSNumber alloc] initWithInt:sc_AOSDK_Interpol.selectedSegmentIndex];
[prefs setObject:valNb forKey:@"AOSDKInterp"];[valNb autorelease];
+ valNb=[[NSNumber alloc] initWithInt:sc_AOSDKDSF22KHZ.selectedSegmentIndex];
+ [prefs setObject:valNb forKey:@"AOSDKDSF22KHZ"];[valNb autorelease];
valNb=[[NSNumber alloc] initWithInt:sc_AOSDKDSFDSP.selectedSegmentIndex];
[prefs setObject:valNb forKey:@"AOSDKDSFDSP"];[valNb autorelease];
valNb=[[NSNumber alloc] initWithInt:sc_AOSDKDSFEmuRatio.selectedSegmentIndex];
@@ -207,6 +207,7 @@ extern "C" {
-(void) optSEXYPSF:(int)reverb interpol:(int)interpol;
-(void) optAOSDK:(int)reverb interpol:(int)interpol;
-(void) optADPLUG:(int)opltype;
+-(void) optAOSDK_22KHZ:(int)value;
-(void) optAOSDK_DSFDSP:(int)value;
-(void) optAOSDK_DSFEmuRatio:(int)value;
-(void) optAOSDK_SSFDSP:(int)value;
@@ -1435,6 +1435,9 @@ -(void)timThread {
char *argv[1];
argv[0]=tim_filepath;
+ //timidity
+ tim_init((char*)[[NSHomeDirectory() stringByAppendingPathComponent:@"modizer.app/timidity"] UTF8String]);
+ tim_init((char*)[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] UTF8String]);
//tim_init((char*)[[NSHomeDirectory() stringByAppendingPathComponent:@"modizer.app/timidity"] UTF8String]);
tim_main(1, argv);
@@ -1916,8 +1919,6 @@ -(void) generateSoundThread {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
if ([[NSThread currentThread] respondsToSelector:@selector(setThreadPriority)]) [[NSThread currentThread] setThreadPriority:0.9f];
- //timidity
- tim_init((char*)[[NSHomeDirectory() stringByAppendingPathComponent:@"modizer.app/timidity"] UTF8String]);
while (1) {
[NSThread sleepForTimeInterval:DEFAULT_WAIT_TIME_MS];
@@ -5616,7 +5617,9 @@ -(void) optAOSDK:(int)reverb interpol:(int)interpol {
AOSDK_setInterpolation(interpol);
}
-
+-(void) optAOSDK_22KHZ:(int)value{
+ aosdk_dsf_22khz=value;
+}
-(void) optAOSDK_DSFDSP:(int)value{
aosdk_dsfdsp=value;
}
Binary file not shown.
Oops, something went wrong.

0 comments on commit 9fd7763

Please sign in to comment.