Commit 6d1f750c authored by Jaromír Mikeš's avatar Jaromír Mikeš

Merge tag 'upstream/0.1.5'

Upstream version 0.1.5
# gpg: Signature made Fri 29 Jun 2012 12:43:08 AM CEST using RSA key ID E2B84FA5
# gpg: Good signature from "Jaromír Mikeš <mira.mikes@seznam.cz>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 4A54 3513 D2DF 6351 A817  8EA3 5B01 9455 E2B8 4FA5
parents a244fade ff917613
......@@ -7,7 +7,7 @@ endif (COMMAND CMAKE_POLICY)
project(Petri-Foo)
set(Petri-Foo_VERSION_MAJOR 1)
set(Petri-Foo_VERSION_MINOR 4)
set(Petri-Foo_VERSION_MINOR 5)
set(BINDIR "bin" CACHE STRING "Where to install binaries")
set(DATADIR "share/petri-foo" CACHE STRING "Where to install data files")
set(APPLICATIONS_DIR "share/applications" CACHE STRING "Where to install desktop files")
......@@ -17,6 +17,8 @@ set(UpdateMime "ON" CACHE BOOL "Update Mime Database")
set(ARCHIVE_NAME petri-foo-0.${Petri-Foo_VERSION_MAJOR}.${Petri-Foo_VERSION_MINOR})
include (CheckCSourceCompiles)
mark_as_advanced(EXECUTABLE_OUTPUT_PATH)
mark_as_advanced(LIBRARY_OUTPUT_PATH)
mark_as_advanced(CMAKE_BUILD_TYPE)
......@@ -130,6 +132,19 @@ else (LIBXML2_FOUND)
message(FATAL_ERROR "libxml2 was not found")
endif (LIBXML2_FOUND)
# Check for CAIRO_OPERATOR_HSL_LUMINOSITY
check_c_source_compiles (
"#include <cairo/cairo.h>
int main(int argc, char **argv)
{
cairo_operator_t op = CAIRO_OPERATOR_HSL_LUMINOSITY;
return 0;
}" HasCairoOperatorHSL
)
if (HasCairoOperatorHSL)
add_definitions (-DCAIRO_HAS_OPERATOR_HSL)
endif (HasCairoOperatorHSL)
INCLUDE (CheckIncludeFiles)
CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
......@@ -148,11 +163,14 @@ ADD_SUBDIRECTORY( libpetrifui )
ADD_SUBDIRECTORY( libphin )
ADD_SUBDIRECTORY( gui )
if (BuildForDebug)
ADD_SUBDIRECTORY( sandbox )
if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sandbox )
message( STATUS "Will build sandbox test target" )
ADD_SUBDIRECTORY( sandbox )
endif (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sandbox )
endif (BuildForDebug)
#ADD_SUBDIRECTORY( pixmaps )
install (DIRECTORY pixmaps/ DESTINATION ${DATADIR}/pixmaps
......
2012-06-28 James Morris <james@jwm-art.net>
* Fixed dish-file load of a bank containing a patch
without a sample file specified.
* Change status from error to warning for "Failed to
parse" message.
* Add check for sandbox directory for debug build.
2012-06-27 James Morris <james@jwm-art.net>
* Fixed build for older Cairo versions which do
not support CAIRO_OPERATOR_HSL_LUMINOSITY.
* Fixed build for older JACK versions without
session support.
* Fixed a few uninitialized warnings.
2012-06-22 James Morris <james@jwm-art.net>
* Restored sliders visual aspect to pre-cairo days.
......
......@@ -93,7 +93,7 @@ int settings_read(const char* path)
if (doc == NULL)
{
msg_log(MSG_ERROR, "Failed to parse %s\n", path);
msg_log(MSG_WARNING, "Failed to parse %s\n", path);
return -1;
}
......
......@@ -47,7 +47,10 @@
#include "sync.h"
#include "lfo.h"
#include "midi_control.h"
#ifdef HAVE_JACK_SESSION_H
void audio_settings_session_cb(jack_session_event_t *event, void *arg);
#endif /* HAVE_JACK_SESSION_H */
/* prototypes */
......
......@@ -312,7 +312,7 @@ patch_trigger_patch (Patch* p, int note, float vel, Tick ticks)
}
else /* mono w/o legato, or poly */
{
int oldest;
int oldest = 0;
Tick oldestticks = ticks;
/* find a free voice slot and determine the oldest running voice */
......
......@@ -110,8 +110,8 @@ dish_file_write_param(xmlNodePtr nodeparent, int patch_id,
const char* prop1 = 0;
const char* prop2 = 0;
float val1;
float val2;
float val1 = 0;
float val2 = 0;
float vel_amt;
float key_trk;
int modsrc;
......@@ -480,35 +480,38 @@ int dish_file_write(const char *name)
/* raw samplerate, raw channels, sndfile format */
dish_file_write_sample_raw(node1, patch_id[i]);
/* sample play */
node2 = xmlNewTextChild(node1, NULL, BAD_CAST "Play", NULL);
if (patch_get_sample(patch_id[i]))
{
/* sample play */
node2 = xmlNewTextChild(node1, NULL, BAD_CAST "Play", NULL);
snprintf(buf, CHARBUFSIZE, "%d",
snprintf(buf, CHARBUFSIZE, "%d",
patch_get_mark_frame(patch_id[i], WF_MARK_PLAY_START));
xmlNewProp(node2, BAD_CAST "start", BAD_CAST buf);
xmlNewProp(node2, BAD_CAST "start", BAD_CAST buf);
snprintf(buf, CHARBUFSIZE, "%d",
snprintf(buf, CHARBUFSIZE, "%d",
patch_get_mark_frame(patch_id[i], WF_MARK_PLAY_STOP));
xmlNewProp(node2, BAD_CAST "stop", BAD_CAST buf);
xmlNewProp(node2, BAD_CAST "stop", BAD_CAST buf);
snprintf(buf, CHARBUFSIZE, "%d",
snprintf(buf, CHARBUFSIZE, "%d",
patch_get_fade_samples(patch_id[i]));
xmlNewProp(node2, BAD_CAST "fade_samples", BAD_CAST buf);
xmlNewProp(node2, BAD_CAST "fade_samples", BAD_CAST buf);
/* sample loop */
node2 = xmlNewTextChild(node1, NULL, BAD_CAST "Loop", NULL);
/* sample loop */
node2 = xmlNewTextChild(node1, NULL, BAD_CAST "Loop", NULL);
snprintf(buf, CHARBUFSIZE, "%d",
snprintf(buf, CHARBUFSIZE, "%d",
patch_get_mark_frame(patch_id[i], WF_MARK_LOOP_START));
xmlNewProp(node2, BAD_CAST "start", BAD_CAST buf);
xmlNewProp(node2, BAD_CAST "start", BAD_CAST buf);
snprintf(buf, CHARBUFSIZE, "%d",
snprintf(buf, CHARBUFSIZE, "%d",
patch_get_mark_frame(patch_id[i], WF_MARK_LOOP_STOP));
xmlNewProp(node2, BAD_CAST "stop", BAD_CAST buf);
xmlNewProp(node2, BAD_CAST "stop", BAD_CAST buf);
snprintf(buf, CHARBUFSIZE, "%d",
snprintf(buf, CHARBUFSIZE, "%d",
patch_get_xfade_samples(patch_id[i]));
xmlNewProp(node2, BAD_CAST "xfade_samples", BAD_CAST buf);
xmlNewProp(node2, BAD_CAST "xfade_samples", BAD_CAST buf);
}
/* sample note */
node2 = xmlNewTextChild(node1, NULL, BAD_CAST "Note", NULL);
......@@ -633,12 +636,15 @@ int dish_file_read_sample(xmlNodePtr node, int patch_id)
&& dish_file_samplerate != patch_get_samplerate())
sr_ratio = patch_get_samplerate() / (double)dish_file_samplerate;
debug("sr_ratio:%f\n",sr_ratio);
debug("sr_ratio:%f\n",sr_ratio);
int mode = PATCH_PLAY_SINGLESHOT;
if ((prop = xmlGetProp(node, BAD_CAST "file")))
if ((prop = xmlGetProp(node, BAD_CAST "file"))
&& strlen((const char*)prop) > 0)
{
filename = strdup((const char*)prop);
}
if ((prop = xmlGetProp(node, BAD_CAST "mode")))
{
......@@ -673,7 +679,7 @@ debug("sr_ratio:%f\n",sr_ratio);
if (node1->type != XML_ELEMENT_NODE)
continue;
if (!sample_loaded)
if (!sample_loaded && filename)
{
int n;
int raw_samplerate = 0;
......
......@@ -799,8 +799,12 @@ static void draw_rectangle(cairo_t* cr, double x, double y,
cairo_stroke_preserve(cr);
cairo_fill(cr);
#ifdef CAIRO_HAS_OPERATOR_HSL
cairo_set_operator(cr, CAIRO_OPERATOR_HSL_LUMINOSITY);
cairo_set_source_rgb(cr, f, f, f);
#else
cairo_set_source_rgb(cr, r * f, g * f, b * f);
#endif
cairo_rectangle(cr, x, y, w, h);
cairo_stroke(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment