static void gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *,
guint32);
-static gint32 gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview,
+static guint32 gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview,
gulong start_sample,
gulong end_sample);
#undef CACHE_MEMMOVE_OPTIMIZATION
/** @return cache index of start_sample within the cache */
-static gint32
+static guint32
gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_sample, gulong end_sample)
{
gulong required_cache_entries;
out:
#if DEBUG_CACHE
fprintf (stderr, "return cache index = %d\n",
- (gint32) floor ((((double) (start_sample - cache->start)) / waveview->samples_per_unit) + 0.5));
+ (guint32) floor ((((double) (start_sample - cache->start)) / waveview->samples_per_unit) + 0.5));
#endif
- return (gint32) floor ((((double) (start_sample - cache->start)) / waveview->samples_per_unit) + 0.5);
+ return (guint32) floor ((((double) (start_sample - cache->start)) / waveview->samples_per_unit) + 0.5);
}
GParamSpec *pspec)
{
+ (void) pspec;
+
GnomeCanvasItem *item;
GnomeCanvasWaveView *waveview;
int redraw = FALSE;
waveview->length_function = g_value_get_pointer(value);
redraw = TRUE;
break;
+
case PROP_SOURCEFILE_LENGTH_FUNCTION:
waveview->sourcefile_length_function = g_value_get_pointer(value);
redraw = TRUE;
gulong s1, s2;
int clip_length = 0;
int pymin, pymax;
- int cache_index;
+ guint cache_index;
double half_height;
int x;
char rectify;
}
if(last_pymax != last_pymin) {
/* take the index of one sample right of what we render */
- int index = cache_index + (end - begin);
+ guint index = cache_index + (end - begin);
if (index >= waveview->cache->data_size) {
unsigned char zero_r, zero_g, zero_b, zero_a;
UINT_TO_RGBA( waveview->zero_color, &zero_r, &zero_g, &zero_b, &zero_a );
int zeroline_y = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
- PAINT_HORIZA(buf, zero_r, zero_g, zero_b, zero_a, zbegin, end, zeroline_y);
+ PAINT_HORIZA(buf, zero_r, zero_g, zero_b, zero_a, zbegin, zend, zeroline_y);
}
#undef origin
static double
gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
{
+ (void) item;
+ (void) x;
+ (void) y;
+ (void) cx;
+ (void) cy;
+ (void) actual_item;
+
/* XXX for now, point is never inside the wave
GnomeCanvasWaveView *waveview;
double x1, y1, x2, y2;