marlin r1334 - trunk/marlin
- From: iain svn gnome org
- To: svn-commits-list gnome org
- Subject: marlin r1334 - trunk/marlin
- Date: Tue, 4 Nov 2008 01:14:50 +0000 (UTC)
Author: iain
Date: Tue Nov 4 01:14:50 2008
New Revision: 1334
URL: http://svn.gnome.org/viewvc/marlin?rev=1334&view=rev
Log:
Conflicts:
marlin/marlin-jack-play.c
Modified:
trunk/marlin/marlin-jack-play.c
Modified: trunk/marlin/marlin-jack-play.c
==============================================================================
--- trunk/marlin/marlin-jack-play.c (original)
+++ trunk/marlin/marlin-jack-play.c Tue Nov 4 01:14:50 2008
@@ -2,7 +2,7 @@
/*
* Authors: Iain Holmes <iain gnome org>
*
- * Copyright 2002 - 2007 Iain Holmes
+ * Copyright 2002 - 2008 Iain Holmes
*
* This file is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@ -229,12 +229,16 @@
"sample-rate", &priv->sample_rate,
NULL);
+ /* sample rate has changed so we need to change the
+ resample ratio */
priv->src_ratio = calculate_rate_ratio (priv->sample_rate,
priv->jack_rate);
return;
}
if (strcmp (pspec->name, "channels") == 0) {
+ /* Channels have changed, so we need to tear down the ports
+ and rebuild them */
free_ports (jack);
g_object_get (object,
"channels", &priv->channels,
@@ -253,6 +257,8 @@
priv = GET_PRIVATE (jack);
if (priv->sample) {
+ /* Sample is changed, so tear down ports. They will be built
+ up once we've setup the new sample */
free_ports ((MarlinJackPlay *) jack);
g_signal_handler_disconnect (priv->sample,
@@ -313,6 +319,8 @@
size_t bytes_avail;
guint frames_avail, blank;
+ /* Check if we have enough frames in the ringbuffer to
+ fill the buffer */
bytes_avail = jack_ringbuffer_read_space (pd->rb);
frames_avail = bytes_avail / frame_size;
frames_needed = MIN (frames_avail, nframes);
@@ -465,6 +473,11 @@
continue;
}
+<<<<<<< HEAD:marlin/marlin-jack-play.c
+=======
+ /* Left and right do not always require the
+ same number of frames */
+>>>>>>> work:marlin/marlin-jack-play.c
gen_frames[i] = src_callback_read (pd->state, priv->src_ratio,
frames_needed,
pd->rb_buffer);
@@ -477,7 +490,8 @@
gen_frames[i] * frame_size);
}
- if (generated > 0) {
+ /* If any frames were generated, calculate the levels */
+ if (gen_frames[0] > 0 || gen_frames[1] > 0) {
marlin_jack_emit_levels ((MarlinJack *) jack,
(float **) tmp_frames, gen_frames);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]