File: gui_data.h

package info (click to toggle)
xsynth-dssi 0.9.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 2,152 kB
  • ctags: 776
  • sloc: sh: 10,156; ansic: 10,132; makefile: 77
file content (54 lines) | stat: -rw-r--r-- 2,090 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* Xsynth DSSI software synthesizer GUI
 *
 * Copyright (C) 2004, 2009, 2010 Sean Bolton and others.
 *
 * 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; either version 2 of
 * the License, or (at your option) any later version.
 *
 * 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 for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
 */

#ifndef _GUI_DATA_H
#define _GUI_DATA_H

#include <stdio.h>

#include "xsynth_types.h"
#include "xsynth_voice.h"

#define XSYNTH_OLD_PATCH_SIZE_PACKED     209  /* Steve Brookes' original patch save file format */
#define XSYNTH_OLD_PATCH_SIZE_WITH_NAME  224  /* the above followed by 15 characters of name */

/* gui_data.c */
void gui_data_import_patch(xsynth_patch_t *xsynth_patch,
                           unsigned char *old_patch, int unpack_name);
int  gui_data_write_patch(FILE *file, xsynth_patch_t *patch);
int  gui_data_save(char *filename, int start, int end, char **message);
void gui_data_mark_dirty_patch_sections(int start_patch, int end_patch);
int  gui_data_load(const char *filename, int position, char **message);
void gui_data_friendly_patches(void);
void gui_data_send_dirty_patch_sections(void);
int  gui_data_patch_compare(xsynth_patch_t *patch1, xsynth_patch_t *patch2);

/* gui_friendly_patches.c */
extern int            xsynth_friendly_patch_count;
extern xsynth_patch_t xsynth_friendly_patches[];

/* xsynth_data.c */
extern xsynth_patch_t xsynth_init_voice;

int   xsynth_data_read_patch(FILE *file, xsynth_patch_t *patch);
int   xsynth_data_decode_patches(const char *encoded, xsynth_patch_t *patches);

#endif /* _GUI_DATA_H */