char buf[512];
snprintf (buf, std::min(info_scroller_count,sizeof(buf)-1), "%s", ARDOUR_UI::instance()->announce_string().c_str() );
- buf[info_scroller_count] = NULL;
+ buf[info_scroller_count] = 0;
info_scroller_label.set_text (buf);
info_scroller_label.show();
/* FT2 rendering - used by GnomeCanvas, sigh */
- pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_for_display(), val/1024, val/1024);
+ pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_new(), val/1024, val/1024);
/* Cairo rendering, in case there is any */
assert (src.type() == DataType::MIDI);
assert (&src != this);
- const MidiBuffer& msrc = (MidiBuffer&) src;
+ const MidiBuffer& msrc = (const MidiBuffer&) src;
assert (_capacity >= msrc.size());
s->clamp_u = lrintf(s->scale);
s->clamp_l = lrintf(-s->scale);
break;
- case 23:
+ case GDitherPerformanceTest:
/* special performance test case */
s->scale = SCALE_S24;
s->post_scale = 256;
GDither16bit = 16,
GDither32bit = 32,
GDitherFloat = 25,
- GDitherDouble = 54
+ GDitherDouble = 54,
+ GDitherPerformanceTest = 23
} GDitherSize;
typedef void *GDither;
GDither16bit = 16,
GDither32bit = 32,
GDitherFloat = 25,
- GDitherDouble = 54
+ GDitherDouble = 54,
+ GDitherPerformanceTest = 23
} GDitherSize;
typedef struct {
static gint
events_array_compare_function(gconstpointer aa, gconstpointer bb)
{
- smf_event_t *a, *b;
+ const smf_event_t *a, *b;
/* "The comparison function for g_ptr_array_sort() doesn't take the pointers
from the array as arguments, it takes pointers to the pointers in the array." */
- a = (smf_event_t *)*(gpointer *)aa;
- b = (smf_event_t *)*(gpointer *)bb;
+ a = (const smf_event_t *)*(const gpointer *)aa;
+ b = (const smf_event_t *)*(const gpointer *)bb;
if (a->time_pulses < b->time_pulses)
return (-1);
int MathUtilities::compareInt (const void * a, const void * b)
{
- return ( *(int*)a - *(int*)b );
+ return ( *(const int*)a - *(const int*)b );
}
void MathUtilities::normalise(double *data, int length, NormaliseType type)
double tempo_convert(const char *str)
{
- const char *d = strchr((char *)str, ':');
+ const char *d = strchr(str, ':');
if (!d || !*d) {
double m = atof(str);