Subversion Repositories svn.mios32

Rev

Rev 1868 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1868 Rev 2635
Line 1... Line 1...
1
// $Id: seq_file.c 1868 2013-11-25 20:32:00Z tk $
1
// $Id: seq_file.c 2635 2019-01-06 17:14:01Z tk $
2
/*
2
/*
3
 * File access functions
3
 * File access functions
4
 *
4
 *
5
 * NOTE: before accessing the SD Card, the upper level function should
5
 * NOTE: before accessing the SD Card, the upper level function should
6
 * synchronize with the SD Card semaphore!
6
 * synchronize with the SD Card semaphore!
Line 41... Line 41...
41
#include "seq_file_t.h"
41
#include "seq_file_t.h"
42
#include "seq_file_hw.h"
42
#include "seq_file_hw.h"
43
#include "seq_file_s.h"
43
#include "seq_file_s.h"
44
#include "seq_file_m.h"
44
#include "seq_file_m.h"
45
#include "seq_file_bm.h"
45
#include "seq_file_bm.h"
-
 
46
#include "seq_file_presets.h"
46
47
47
#include "seq_mixer.h"
48
#include "seq_mixer.h"
48
#include "seq_pattern.h"
49
#include "seq_pattern.h"
49
#include "seq_song.h"
50
#include "seq_song.h"
50
51
Line 116... Line 117...
116
  status |= SEQ_FILE_B_Init(0); // pattern file access
117
  status |= SEQ_FILE_B_Init(0); // pattern file access
117
  status |= SEQ_FILE_T_Init(0); // track preset file access
118
  status |= SEQ_FILE_T_Init(0); // track preset file access
118
  status |= SEQ_FILE_M_Init(0); // mixer file access
119
  status |= SEQ_FILE_M_Init(0); // mixer file access
119
  status |= SEQ_FILE_S_Init(0); // song file access
120
  status |= SEQ_FILE_S_Init(0); // song file access
120
  status |= SEQ_FILE_BM_Init(0); // bookmarks file access
121
  status |= SEQ_FILE_BM_Init(0); // bookmarks file access
-
 
122
  status |= SEQ_FILE_PRESETS_Init(0); // presets file access
121
123
122
  return status;
124
  return status;
123
}
125
}
124
126
125
127
Line 133... Line 135...
133
  if( including_hw ) {
135
  if( including_hw ) {
134
    status |= SEQ_FILE_HW_Load();
136
    status |= SEQ_FILE_HW_Load();
135
137
136
    // ignore status if global setup file doesn't exist
138
    // ignore status if global setup file doesn't exist
137
    SEQ_FILE_GC_Load();
139
    SEQ_FILE_GC_Load();
-
 
140
-
 
141
    SEQ_FILE_PRESETS_Load();
138
  }
142
  }
139
143
140
  status |= SEQ_FILE_B_LoadAllBanks(seq_file_session_name);
144
  status |= SEQ_FILE_B_LoadAllBanks(seq_file_session_name);
141
  status |= SEQ_FILE_M_LoadAllBanks(seq_file_session_name);
145
  status |= SEQ_FILE_M_LoadAllBanks(seq_file_session_name);
142
  status |= SEQ_FILE_S_LoadAllBanks(seq_file_session_name);
146
  status |= SEQ_FILE_S_LoadAllBanks(seq_file_session_name);
Line 178... Line 182...
178
  status |= SEQ_FILE_G_Unload();
182
  status |= SEQ_FILE_G_Unload();
179
  status |= SEQ_FILE_C_Unload();
183
  status |= SEQ_FILE_C_Unload();
180
  status |= SEQ_FILE_GC_Unload();
184
  status |= SEQ_FILE_GC_Unload();
181
  status |= SEQ_FILE_BM_Unload(0);
185
  status |= SEQ_FILE_BM_Unload(0);
182
  status |= SEQ_FILE_BM_Unload(1);
186
  status |= SEQ_FILE_BM_Unload(1);
-
 
187
  status |= SEQ_FILE_PRESETS_Unload();
183
  status |= SEQ_FILE_HW_Unload();
188
  status |= SEQ_FILE_HW_Unload();
184
189
185
  // invalidate session
190
  // invalidate session
186
  strcpy(seq_file_session_name, "DEFAULT");
191
  strcpy(seq_file_session_name, "DEFAULT");
187
  seq_file_new_session_name[0] = 0; // invalidate
192
  seq_file_new_session_name[0] = 0; // invalidate