Skip to content

Commit 2a752e4

Browse files
author
James Morris
committed
preparatory work for 0.1.3 release
1 parent 4b0db92 commit 2a752e4

15 files changed

+68
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Makefile.in
1515
*.wav
1616
*.petri-foo
1717
*.orig
18+
*.bz2
1819

1920
aclocal.m4
2021
autom4te.cache/

CMakeLists.txt

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ endif (COMMAND CMAKE_POLICY)
66

77
project(Petri-Foo)
88

9-
set(Petri-Foo_VERSION_MAJOR 0)
9+
set(Petri-Foo_VERSION_MAJOR 1)
1010
set(Petri-Foo_VERSION_MINOR 3)
1111
set(BINDIR "bin" CACHE STRING "Where to install binaries")
1212
set(DATADIR "share/petri-foo" CACHE STRING "Where to install data files")
@@ -15,12 +15,15 @@ set(PIXMAPS_DIR "share/pixmaps" CACHE STRING "Where to install icons")
1515
set(MIME_DIR "share/mime" CACHE STRING "Where MIME definitions are located")
1616
set(UpdateMime "ON" CACHE BOOL "Update Mime Database")
1717

18+
set(PROJECT_VERSION "0.2.3")
19+
set(ARCHIVE_NAME petri-foo-0.${Petri-Foo_VERSION_MAJOR}.${Petri-Foo_VERSION_MINOR})
20+
1821
mark_as_advanced(EXECUTABLE_OUTPUT_PATH)
1922
mark_as_advanced(LIBRARY_OUTPUT_PATH)
2023
mark_as_advanced(CMAKE_BUILD_TYPE)
2124
mark_as_advanced(CMAKE_INSTALL_PREFIX)
2225

23-
option (BuildForDebug "Include gdb debugging support" ON)
26+
option (BuildForDebug "Include gdb debugging support" OFF)
2427

2528
# DEBUG
2629
set (BuildOptionsDebug "-O0 -ggdb" CACHE STRING "Debug build flags")
@@ -156,4 +159,8 @@ if (UpdateMime)
156159
)
157160
endif (UpdateMime)
158161

162+
add_custom_target(dist
163+
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
164+
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
165+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
159166

ChangeLog

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2012-06-11 James Morris <[email protected]>
2+
3+
Preparatory Work for 0.1.3 Release
4+
==================================
5+
6+
* added dist target
7+
* removed obsolete source files
8+
* changed default build to release
9+
* fixed some warnings caused by not-#defined debug
10+
* fixed some warnings about unused variables/parameters
11+
(grep why is this still here)
12+
113
2012-06-09 James Morris <[email protected]>
214

315
* libpetrifoo/patch_private/patch_data.c, patch_copy:

NEWS

+13-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
See the Changelog and/or mailing list.
1+
After some time a new release of Petri-Foo is now available...
2+
3+
Petri-Foo-0.1.3
4+
5+
* Moved build configuration system to cmake
6+
* Removed external dependency on PHAT and replaced with a custom
7+
version called Phin included with Petri-Foo
8+
* Mousewheel waveform zooming
9+
* Auto-preview (with optional resampling) in sample selector dialog
10+
* Numerous bugs squashed unsquashed and squashed again
11+
* Minor GUI updates/fixes
12+
* Removed obsolete source files
13+

gui/gui.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ void cb_menu_patch_remove(GtkWidget* menu_item, gpointer data)
417417
{
418418
(void)menu_item;(void)data;
419419

420-
int val;
421420
int cp;
422421
int index;
423422

@@ -448,6 +447,8 @@ void cb_menu_view_log_display_showing(gboolean active)
448447

449448
static void cb_menu_view_log_display(GtkWidget* widget, gpointer data)
450449
{
450+
(void)widget; (void)data;
451+
451452
if (gtk_check_menu_item_get_active(
452453
GTK_CHECK_MENU_ITEM(menu_view_log_display)))
453454
{
@@ -803,7 +804,6 @@ gui_menu_check_add(GtkWidget* menu, const char* label, gboolean active,
803804
gpointer data)
804805
{
805806
GtkWidget* item = 0;
806-
GtkWidget* submenu = 0;
807807

808808
item = gtk_check_menu_item_new_with_label(label);
809809
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), active);
@@ -816,12 +816,12 @@ gui_menu_check_add(GtkWidget* menu, const char* label, gboolean active,
816816
/* recent items menu */
817817
void gui_recent_files_load(void)
818818
{
819-
GtkWidget* menuitem_to_append_to = NULL;
820819
GtkRecentFilter *recent_filter;
821820
GtkWidget *menuitem_file_recent_items;
822821
recent_manager = gtk_recent_manager_get_default();
823822
recent_filter = gtk_recent_filter_new();
824-
gtk_recent_filter_add_mime_type(recent_filter, "application/x-petri-foo");
823+
gtk_recent_filter_add_mime_type(recent_filter,
824+
"application/x-petri-foo");
825825
menuitem_file_recent_items =
826826
gtk_recent_chooser_menu_new_for_manager(recent_manager);
827827
gtk_recent_chooser_add_filter(
@@ -837,7 +837,8 @@ void gui_recent_files_load(void)
837837
GTK_RECENT_CHOOSER(menuitem_file_recent_items), FALSE);
838838
gtk_recent_chooser_menu_set_show_numbers(
839839
GTK_RECENT_CHOOSER_MENU(menuitem_file_recent_items), TRUE);
840-
g_signal_connect(GTK_OBJECT(menuitem_file_recent_items), "item-activated",
840+
g_signal_connect(GTK_OBJECT(menuitem_file_recent_items),
841+
"item-activated",
841842
G_CALLBACK(cb_recent_chooser_item_activated), window);
842843
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem_file_recent),
843844
menuitem_file_recent_items);

gui/lfotab.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ static void update_lfo(LfoTabPrivate* p)
545545
{
546546
LFOShape lfoshape;
547547
int shape;
548-
float freq, beats, delay, attack;
548+
float freq, beats, delay = 0, attack = 0;
549549
bool active, sync, positive;
550550
GtkTreeIter iter;
551551

gui/log_display.c

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void log_display_hide(void)
8989

9090
void log_display_init(GtkWidget* parent)
9191
{
92+
(void)parent; /* why is this still here? */
9293
GtkWidget* swindow;
9394
GtkWidget* vbox;
9495

gui/mod_section.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,10 @@ GtkWidget* mod_section_new(void)
438438
void mod_section_set_patch(ModSection* self, int patch_id)
439439
{
440440
ModSectionPrivate* p = MOD_SECTION_GET_PRIVATE(self);
441-
float param1;
441+
float param1 = 0;
442442
float param2 = 0;
443-
float vel_amt;
444-
float key_trk;
443+
float vel_amt = 0;
444+
float key_trk = 0;
445445

446446
int i;
447447
int last_slot = MAX_MOD_SLOTS;

libpetrifoo/adsr.c

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ void adsr_init(ADSR* env)
123123

124124
void adsr_trigger(ADSR* env, float key, float vel)
125125
{
126+
(void)vel; /* why is this still here? */
126127
env->state = ADSR_STATE_DELAY;
127128
env->ticks = 0;
128129
env->aval = env->val;

libpetrifoo/jackdriver.c

+8
Original file line numberDiff line numberDiff line change
@@ -326,20 +326,28 @@ static int start(void)
326326
if (ports[0] != NULL)
327327
{
328328
if (jack_connect(client, jack_port_name(lport), ports[0]) == 0)
329+
{
329330
debug("JACK failed to connect left output port\n");
331+
}
330332

331333
if (ports[1] != NULL)
332334
{
333335
if (jack_connect(client, jack_port_name (rport), ports[1]))
336+
{
334337
debug("JACK failed to connect right output port\n");
338+
}
335339
}
336340
else
341+
{
337342
debug("JACK failed to connect right output port\n");
343+
}
338344

339345
free (ports);
340346
}
341347
else
348+
{
342349
debug("JACK failed to connect output ports\n");
350+
}
343351
}
344352

345353
debug("JACK Initialization complete\n");

libpetrifoo/patch.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ pitchscale (Patch * p, PatchVoice * v, float *l, float *r)
491491
inline static void
492492
pan (Patch * p, PatchVoice * v, int index, float *l, float *r)
493493
{
494+
(void)index; /* how come this is no longer used? why is it here? */
494495
int i;
495496
float pan;
496497

@@ -535,8 +536,9 @@ pan (Patch * p, PatchVoice * v, int index, float *l, float *r)
535536
inline static void
536537
filter (Patch* p, PatchVoice* v, int index, float* l, float* r)
537538
{
539+
(void)index; /* how come this is no longer used? why is it here? */
538540
int i;
539-
float ffreq, freso, logreso;
541+
float ffreq, freso;
540542

541543
/* get filter cutoff frequency */
542544
ffreq = p->ffreq.val;
@@ -612,9 +614,10 @@ filter (Patch* p, PatchVoice* v, int index, float* l, float* r)
612614
inline static int
613615
gain (Patch* p, PatchVoice* v, int index, float* l, float* r)
614616
{
617+
(void)index; /* how come this is no longer used? why is it here? */
615618
int i;
616619
float amp = 0.0;
617-
float logamp = 0.0;
620+
/*float logamp = 0.0;*/
618621

619622
/* first, we use our set value as a base */
620623
amp = p->amp.val;
@@ -717,6 +720,7 @@ inline static void advance_fwd(int* posi, uint32_t* posf,
717720
* returned if we are out of samples after doing our work) */
718721
inline static int advance (Patch* p, PatchVoice* v, int index)
719722
{
723+
(void)index; /* how come this is no longer used? why is it here? */
720724
int i,j;
721725
double pitch;
722726
double scale;

libpetrifoo/patch_util.c

-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ int patch_create(void)
167167

168168
int patch_duplicate(int src_id)
169169
{
170-
Patch* p;
171170
int id;
172171

173172
assert(patchok(src_id));

libpetrifoo/sample.c

+4
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ static SNDFILE* open_sample(SF_INFO* sfinfo, const char* name,
255255

256256
if (raw)
257257
{
258+
#if DEBUG
258259
id_name* idnames = names_sample_raw_format_get();
259260
char* fmt_name = 0;
260261
int i;
@@ -271,6 +272,7 @@ static SNDFILE* open_sample(SF_INFO* sfinfo, const char* name,
271272
name, raw_samplerate,
272273
(raw_channels == 2)? "stereo" : "mono",
273274
fmt_name);
275+
#endif
274276

275277
if (!sf_format_check(sfinfo))
276278
{
@@ -279,7 +281,9 @@ static SNDFILE* open_sample(SF_INFO* sfinfo, const char* name,
279281
}
280282
}
281283
else
284+
{
282285
debug("Reading sample %s\n", name);
286+
}
283287

284288
if ((sfp = sf_open(name, SFM_READ, sfinfo)) == NULL)
285289
{

petri-foo.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Summary: A midi controlled audio sampler
22
Name: petri-foo
3-
Version: 0.0.2
3+
Version: 0.1.3
44
Release: 1
55
License: GPL
66
Group: Applications/Multimedia
7-
URL: http://www.gazuga.net
7+
URL: http://petri-foo.sourceforge.net
88
Source0: %{name}-%{version}.tar.gz
99
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
1010
Requires: libsamplerate libsndfile gtk2 libxml2 alsa-lib jack-audio-connection-kit

petri-foo.spec.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Version: @VERSION@
44
Release: 1
55
License: GPL
66
Group: Applications/Multimedia
7-
URL: http://www.gazuga.net
7+
URL: http://petri-foo.sourceforge.net
88
Source0: %{name}-%{version}.tar.gz
99
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
1010
Requires: libsamplerate libsndfile gtk2 libxml2 alsa-lib jack-audio-connection-kit

0 commit comments

Comments
 (0)